feat(studio): refine Play workspace and project preferences (WRK-001D)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package p.studio.api.preferences;
|
||||
|
||||
/** Machine-local Studio default, separate from frontend appearance and project overrides. */
|
||||
public interface RuntimeSettingsStore {
|
||||
String load();
|
||||
void save(String installation);
|
||||
/** Validate a nonempty installation without starting a runtime. Implementations perform IO off the UI thread. */
|
||||
default void validate(String installation) { }
|
||||
default String resolve(String projectOverride) {
|
||||
String effective = projectOverride == null || projectOverride.isBlank() ? load() : projectOverride.trim();
|
||||
if (effective == null || effective.isBlank()) throw new IllegalArgumentException("Runtime installation is missing");
|
||||
validate(effective);
|
||||
return effective;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,10 @@ import p.studio.api.project.ProjectReference;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface WindowStateStore {
|
||||
default Optional<WindowGeometry> loadLauncher() { return Optional.empty(); }
|
||||
|
||||
default void saveLauncher(WindowGeometry geometry) { }
|
||||
|
||||
Optional<WindowGeometry> load(ProjectReference projectReference);
|
||||
|
||||
void save(ProjectReference projectReference, WindowGeometry geometry);
|
||||
|
||||
@@ -7,4 +7,10 @@ import java.util.function.Consumer;
|
||||
|
||||
public interface Shipper {
|
||||
OperationHandle<ShipperPrepareResult> prepare(ProjectReference project, Consumer<ShipperLogEntry> logSink);
|
||||
|
||||
/** Freeze the selected execution configuration for interactive build admission without persisting inherited defaults. */
|
||||
default OperationHandle<ShipperPrepareResult> prepare(ProjectReference project,
|
||||
p.studio.api.project.ProjectLocalStudioSetup effectiveSetup, Consumer<ShipperLogEntry> logSink) {
|
||||
return prepare(project,logSink);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user