Validate preview sessions against real classpath and module-path fixtures
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package de.neitzel.fxdesigner.preview;
|
||||
|
||||
import java.util.concurrent.*;
|
||||
|
||||
/** Owned example state. The NeitzelLib adapter requires C to be an ApplicationContext. */
|
||||
public interface PreviewSession<M, C> extends AutoCloseable {
|
||||
M model();
|
||||
|
||||
C context();
|
||||
|
||||
/**
|
||||
* Called after View loading/CSS/layout, on FX. Never block FX; complete asynchronously if needed.
|
||||
*/
|
||||
default CompletionStage<Void> ready() {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Release owned services/timers/listeners. Called once on FX, including load/readiness failure.
|
||||
*/
|
||||
@Override
|
||||
void close() throws Exception;
|
||||
}
|
||||
Reference in New Issue
Block a user