diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserEntry.java b/app/src/main/java/io/xpipe/app/browser/BrowserEntry.java index 8d5e50f19..bafc2e49f 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserEntry.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserEntry.java @@ -2,8 +2,8 @@ package io.xpipe.app.browser; import io.xpipe.app.browser.icon.DirectoryType; import io.xpipe.app.browser.icon.FileType; -import io.xpipe.core.store.FileNames; import io.xpipe.core.store.FileKind; +import io.xpipe.core.store.FileNames; import io.xpipe.core.store.FileSystem; import lombok.Getter; diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserFileListComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserFileListComp.java index 093018be4..c37828f03 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserFileListComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserFileListComp.java @@ -12,9 +12,9 @@ import io.xpipe.app.fxcomps.util.PlatformThread; import io.xpipe.app.util.BooleanScope; import io.xpipe.app.util.HumanReadableFormat; import io.xpipe.app.util.ThreadHelper; -import io.xpipe.core.store.FileNames; import io.xpipe.core.process.OsType; import io.xpipe.core.store.FileKind; +import io.xpipe.core.store.FileNames; import io.xpipe.core.store.FileSystem; import javafx.application.Platform; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserSelectionListComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserSelectionListComp.java index 40eba748e..cc7265bf9 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserSelectionListComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserSelectionListComp.java @@ -33,6 +33,7 @@ public class BrowserSelectionListComp extends SimpleComp { ObservableList list; Function> nameTransformation; + public BrowserSelectionListComp(ObservableList list) { this(list, entry -> new SimpleStringProperty(FileNames.getFileName(entry.getPath()))); } diff --git a/app/src/main/java/io/xpipe/app/browser/OpenFileSystemSavedState.java b/app/src/main/java/io/xpipe/app/browser/OpenFileSystemSavedState.java index ca21e618b..780fae2b0 100644 --- a/app/src/main/java/io/xpipe/app/browser/OpenFileSystemSavedState.java +++ b/app/src/main/java/io/xpipe/app/browser/OpenFileSystemSavedState.java @@ -35,9 +35,12 @@ public class OpenFileSystemSavedState { private static final Timer TIMEOUT_TIMER = new Timer(true); private static final int STORED = 10; + @Setter private OpenFileSystemModel model; + private String lastDirectory; + @NonNull private ObservableList recentDirectories; diff --git a/app/src/main/java/io/xpipe/app/browser/icon/DirectoryType.java b/app/src/main/java/io/xpipe/app/browser/icon/DirectoryType.java index 868165fda..0204e2cd6 100644 --- a/app/src/main/java/io/xpipe/app/browser/icon/DirectoryType.java +++ b/app/src/main/java/io/xpipe/app/browser/icon/DirectoryType.java @@ -9,7 +9,10 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.nio.file.Files; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; import java.util.stream.Collectors; public interface DirectoryType { diff --git a/app/src/main/java/io/xpipe/app/comp/base/LoadingOverlayComp.java b/app/src/main/java/io/xpipe/app/comp/base/LoadingOverlayComp.java index 8ba58d756..dd38eeb9f 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/LoadingOverlayComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/LoadingOverlayComp.java @@ -21,6 +21,7 @@ public class LoadingOverlayComp extends Comp> { private final Comp comp; private final ObservableValue showLoading; private final ObservableValue progress; + public LoadingOverlayComp(Comp comp, ObservableValue loading, ObservableValue progress) { this.comp = comp; this.showLoading = PlatformThread.sync(loading); diff --git a/app/src/main/java/io/xpipe/app/comp/base/OsLogoComp.java b/app/src/main/java/io/xpipe/app/comp/base/OsLogoComp.java index e16caac80..4293638de 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/OsLogoComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/OsLogoComp.java @@ -29,6 +29,7 @@ public class OsLogoComp extends SimpleComp { public OsLogoComp(StoreEntryWrapper wrapper) { this(wrapper, new SimpleObjectProperty<>(SystemStateComp.State.SUCCESS)); } + public OsLogoComp(StoreEntryWrapper wrapper, ObservableValue state) { this.wrapper = wrapper; this.state = state; diff --git a/app/src/main/java/io/xpipe/app/comp/base/TileButtonComp.java b/app/src/main/java/io/xpipe/app/comp/base/TileButtonComp.java index bb6f9c387..b688b5676 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/TileButtonComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/TileButtonComp.java @@ -32,6 +32,7 @@ public class TileButtonComp extends Comp { private final ObservableValue description; private final ObservableValue icon; private final Consumer action; + public TileButtonComp(String nameKey, String descriptionKey, String icon, Consumer action) { this.name = AppI18n.observable(nameKey); this.description = AppI18n.observable(descriptionKey); diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryWrapper.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryWrapper.java index b18c603ec..d09c643bc 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryWrapper.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryWrapper.java @@ -65,8 +65,7 @@ public class StoreCategoryWrapper { } public boolean contains(StoreEntryWrapper entry) { - return entry.getEntry().getCategoryUuid().equals(category.getUuid()) - || containedEntries.contains(entry); + return entry.getEntry().getCategoryUuid().equals(category.getUuid()) || containedEntries.contains(entry); } public void select() { @@ -124,7 +123,11 @@ public class StoreCategoryWrapper { containedEntries.setAll(StoreViewState.get().getAllEntries().stream() .filter(entry -> { return entry.getEntry().getCategoryUuid().equals(category.getUuid()) - || (AppPrefs.get().showChildCategoriesInParentCategory().get() && children.stream().anyMatch(storeCategoryWrapper -> storeCategoryWrapper.contains(entry))); + || (AppPrefs.get() + .showChildCategoriesInParentCategory() + .get() + && children.stream() + .anyMatch(storeCategoryWrapper -> storeCategoryWrapper.contains(entry))); }) .toList()); children.setAll(StoreViewState.get().getCategories().stream() diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java index 6a771812f..59c2d5fda 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationComp.java @@ -173,7 +173,10 @@ public class StoreCreationComp extends DialogComp { e -> { try { DataStorage.get().addStoreEntryIfNotPresent(e); - if (e.getProvider().shouldHaveChildren() && AppPrefs.get().openConnectionSearchWindowOnConnectionCreation().get()) { + if (e.getProvider().shouldHaveChildren() + && AppPrefs.get() + .openConnectionSearchWindowOnConnectionCreation() + .get()) { ScanAlert.showAsync(e); } } catch (Exception ex) { diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java index de715bb9e..386ef456a 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java @@ -48,6 +48,7 @@ public abstract class StoreEntryComp extends SimpleComp { App.getApp().getStage().widthProperty().divide(2.2).add(-200); protected final StoreEntryWrapper wrapper; protected final Comp content; + public StoreEntryComp(StoreEntryWrapper wrapper, Comp content) { this.wrapper = wrapper; this.content = content; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java index 61cd76226..a2e685425 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java @@ -24,6 +24,7 @@ public class StoreSection { ObservableList shownChildren; int depth; ObservableBooleanValue showDetails; + public StoreSection( StoreEntryWrapper wrapper, ObservableList allChildren, diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java index bb44082ad..cb1388ca6 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java @@ -32,6 +32,7 @@ public class StoreSectionMiniComp extends Comp> { private static final PseudoClass ODD = PseudoClass.getPseudoClass("odd-depth"); private static final PseudoClass EVEN = PseudoClass.getPseudoClass("even-depth"); private final StoreSection section; + @Builder.Default private final BiConsumer>> augment = (section1, buttonComp) -> {}; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreViewState.java b/app/src/main/java/io/xpipe/app/comp/store/StoreViewState.java index 0a39d60f8..8b6d019b0 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreViewState.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreViewState.java @@ -25,14 +25,18 @@ public class StoreViewState { private static StoreViewState INSTANCE; private final StringProperty filter = new SimpleStringProperty(); + @Getter private final ObservableList allEntries = FXCollections.observableList(new CopyOnWriteArrayList<>()); + @Getter private final ObservableList categories = FXCollections.observableList(new CopyOnWriteArrayList<>()); + @Getter private final Property activeCategory = new SimpleObjectProperty<>(); + @Getter private StoreSection currentTopLevelSection; diff --git a/app/src/main/java/io/xpipe/app/core/AppLayoutModel.java b/app/src/main/java/io/xpipe/app/core/AppLayoutModel.java index 8ec55cdec..8860ef334 100644 --- a/app/src/main/java/io/xpipe/app/core/AppLayoutModel.java +++ b/app/src/main/java/io/xpipe/app/core/AppLayoutModel.java @@ -22,10 +22,13 @@ import java.util.List; public class AppLayoutModel { private static AppLayoutModel INSTANCE; + @Getter private final SavedState savedState; + @Getter private final List entries; + private final Property selected; private final ObservableValue selectedWrapper; diff --git a/app/src/main/java/io/xpipe/app/core/AppTheme.java b/app/src/main/java/io/xpipe/app/core/AppTheme.java index 967b46cef..729c6ddbe 100644 --- a/app/src/main/java/io/xpipe/app/core/AppTheme.java +++ b/app/src/main/java/io/xpipe/app/core/AppTheme.java @@ -207,8 +207,10 @@ public class AppTheme { public static final List ALL = List.of(PRIMER_LIGHT, PRIMER_DARK, NORD_LIGHT, NORD_DARK, CUPERTINO_LIGHT, CUPERTINO_DARK, DRACULA); protected final String id; + @Getter protected final String cssId; + protected final atlantafx.base.theme.Theme theme; static Theme getDefaultLightTheme() { diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/ChoiceComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/ChoiceComp.java index 7cc3a2735..779c5732f 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/ChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/ChoiceComp.java @@ -28,6 +28,7 @@ public class ChoiceComp extends Comp>> { Property value; ObservableValue>> range; boolean includeNone; + public ChoiceComp(Property value, Map> range, boolean includeNone) { this.value = value; this.range = new SimpleObjectProperty<>(range); diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/TextAreaComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/TextAreaComp.java index 51952042c..9f0ffe0c1 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/TextAreaComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/TextAreaComp.java @@ -19,6 +19,7 @@ public class TextAreaComp extends Comp { private final Property currentValue; private final Property lastAppliedValue; private final boolean lazy; + public TextAreaComp(Property value) { this(value, false); } diff --git a/app/src/main/java/io/xpipe/app/issue/ErrorEvent.java b/app/src/main/java/io/xpipe/app/issue/ErrorEvent.java index ea2845a5b..e921d4be5 100644 --- a/app/src/main/java/io/xpipe/app/issue/ErrorEvent.java +++ b/app/src/main/java/io/xpipe/app/issue/ErrorEvent.java @@ -16,6 +16,7 @@ public class ErrorEvent { private static final Map EVENT_BASES = new ConcurrentHashMap<>(); private static final Set HANDLED = new CopyOnWriteArraySet<>(); + @Builder.Default private final boolean omitted = false; @@ -23,14 +24,19 @@ public class ErrorEvent { private final boolean reportable = true; private final Throwable throwable; + @Singular private final List customActions; + private String description; private boolean terminal; + @Setter private boolean shouldSendDiagnostics; + @Singular private List attachments; + private String email; private String userReport; private boolean unhandled; diff --git a/app/src/main/java/io/xpipe/app/launcher/LauncherCommand.java b/app/src/main/java/io/xpipe/app/launcher/LauncherCommand.java index 323c5a9eb..88ca112fa 100644 --- a/app/src/main/java/io/xpipe/app/launcher/LauncherCommand.java +++ b/app/src/main/java/io/xpipe/app/launcher/LauncherCommand.java @@ -33,6 +33,7 @@ public class LauncherCommand implements Callable { @CommandLine.Parameters(paramLabel = "") final List inputs = List.of(); + @CommandLine.Option( names = {"--mode"}, description = "The mode to launch the daemon in or switch too", diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index 32e9c532b..f13e28f6f 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -106,22 +106,29 @@ public class AppPrefs { bindDeveloperTrue(developerDisableGuiRestrictions); private final ObjectProperty language = map(new SimpleObjectProperty<>(SupportedLocale.ENGLISH), "language", SupportedLocale.class); + @Getter private final Property lockPassword = new SimpleObjectProperty<>(); + @Getter private final StringProperty lockCrypt = mapVaultSpecific(new SimpleStringProperty(), "workspaceLock", String.class); + private final IntegerProperty editorReloadTimeout = map(new SimpleIntegerProperty(1000), "editorReloadTimeout", Integer.class); private final BooleanProperty confirmDeletions = map(new SimpleBooleanProperty(true), "confirmDeletions", Boolean.class); + @Getter private final List categories; + private final AppPrefsStorageHandler globalStorageHandler = new AppPrefsStorageHandler( AppProperties.get().getDataDir().resolve("settings").resolve("preferences.json")); private final Map, Comp> customEntries = new LinkedHashMap<>(); + @Getter private final Property selectedCategory; + private final PrefsHandler extensionHandler = new PrefsHandlerImpl(); private AppPrefs() { diff --git a/app/src/main/java/io/xpipe/app/prefs/AppearanceCategory.java b/app/src/main/java/io/xpipe/app/prefs/AppearanceCategory.java index 9f9c3d05f..2b85895c1 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppearanceCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppearanceCategory.java @@ -33,13 +33,11 @@ public class AppearanceCategory extends AppPrefsCategory { .nameAndDescription("condenseConnectionDisplay") .addToggle(prefs.condenseConnectionDisplay) .nameAndDescription("showChildCategoriesInParentCategory") - .addToggle(prefs.showChildCategoriesInParentCategory) - ) + .addToggle(prefs.showChildCategoriesInParentCategory)) .addTitle("workflow") .sub(new OptionsBuilder() .nameAndDescription("openConnectionSearchWindowOnConnectionCreation") - .addToggle(prefs.openConnectionSearchWindowOnConnectionCreation) - ) + .addToggle(prefs.openConnectionSearchWindowOnConnectionCreation)) .addTitle("windowOptions") .sub(new OptionsBuilder() .nameAndDescription("windowOpacity") diff --git a/app/src/main/java/io/xpipe/app/prefs/ExternalApplicationType.java b/app/src/main/java/io/xpipe/app/prefs/ExternalApplicationType.java index 9bc5bbf00..87bac1c6f 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ExternalApplicationType.java +++ b/app/src/main/java/io/xpipe/app/prefs/ExternalApplicationType.java @@ -84,13 +84,13 @@ public abstract class ExternalApplicationType implements PrefsChoiceValue { } @Override - public boolean isSelectable() { - return OsType.getLocal().equals(OsType.MACOS); + public boolean isAvailable() { + return getApplicationPath().isPresent(); } @Override - public boolean isAvailable() { - return getApplicationPath().isPresent(); + public boolean isSelectable() { + return OsType.getLocal().equals(OsType.MACOS); } } @@ -173,11 +173,6 @@ public abstract class ExternalApplicationType implements PrefsChoiceValue { return Optional.empty(); } - @Override - public boolean isSelectable() { - return OsType.getLocal().equals(OsType.WINDOWS); - } - @Override public boolean isAvailable() { var path = determineFromPath(); @@ -188,5 +183,10 @@ public abstract class ExternalApplicationType implements PrefsChoiceValue { var installation = determineInstallation(); return installation.isPresent() && Files.exists(installation.get()); } + + @Override + public boolean isSelectable() { + return OsType.getLocal().equals(OsType.WINDOWS); + } } } diff --git a/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java b/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java index b8239f3ef..6b154c9d9 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java +++ b/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java @@ -127,6 +127,7 @@ public interface ExternalEditorType extends PrefsChoiceValue { List.of(VSCODIUM_LINUX, VSCODE_LINUX, KATE, GEDIT, PLUMA, LEAFPAD, MOUSEPAD, GNOME); List MACOS_EDITORS = List.of(BBEDIT, VSCODIUM_MACOS, VSCODE_MACOS, SUBLIME_MACOS, TEXT_EDIT); List CROSS_PLATFORM_EDITORS = List.of(FLEET, INTELLIJ, PYCHARM, WEBSTORM, CLION); + @SuppressWarnings("TrivialFunctionalExpressionUsage") List ALL = ((Supplier>) () -> { var all = new ArrayList(); diff --git a/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java b/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java index 609d36583..364d81f3b 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java +++ b/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java @@ -847,12 +847,12 @@ public interface ExternalTerminalType extends PrefsChoiceValue { } @Override - public boolean isSelectable() { + public boolean isAvailable() { return true; } @Override - public boolean isAvailable() { + public boolean isSelectable() { return true; } } diff --git a/app/src/main/java/io/xpipe/app/prefs/TroubleshootCategory.java b/app/src/main/java/io/xpipe/app/prefs/TroubleshootCategory.java index d9838aa78..70fcdb35e 100644 --- a/app/src/main/java/io/xpipe/app/prefs/TroubleshootCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/TroubleshootCategory.java @@ -6,7 +6,10 @@ import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.fxcomps.Comp; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.UserReportComp; -import io.xpipe.app.util.*; +import io.xpipe.app.util.DesktopHelper; +import io.xpipe.app.util.FileOpener; +import io.xpipe.app.util.OptionsBuilder; +import io.xpipe.app.util.TerminalLauncher; import io.xpipe.core.process.OsType; import io.xpipe.core.store.FileNames; import io.xpipe.core.store.LocalStore; diff --git a/app/src/main/java/io/xpipe/app/storage/ContextualFileReference.java b/app/src/main/java/io/xpipe/app/storage/ContextualFileReference.java index 7e9661459..13b3eeb92 100644 --- a/app/src/main/java/io/xpipe/app/storage/ContextualFileReference.java +++ b/app/src/main/java/io/xpipe/app/storage/ContextualFileReference.java @@ -16,6 +16,7 @@ import java.util.regex.Matcher; public class ContextualFileReference { private static String lastDataDir; + @NonNull private final String path; diff --git a/app/src/main/java/io/xpipe/app/storage/DataStorage.java b/app/src/main/java/io/xpipe/app/storage/DataStorage.java index dc032ddfd..af4075f0c 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStorage.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStorage.java @@ -40,17 +40,25 @@ public abstract class DataStorage { private static DataStorage INSTANCE; protected final Path dir; + @Getter protected final List storeCategories; + protected final Map storeEntries; + @Getter protected final Set storeEntriesSet; + protected final ReentrantLock busyIo = new ReentrantLock(); + @Getter private final List listeners = new CopyOnWriteArrayList<>(); + private final Map storeEntriesInProgress = new ConcurrentHashMap<>(); + @Getter protected boolean loaded; + @Getter @Setter protected DataStoreCategory selectedCategory; diff --git a/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java b/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java index 8288b48f7..e2d11d949 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java @@ -26,26 +26,35 @@ import java.util.stream.Collectors; public class DataStoreEntry extends StorageElement { Map storeCache = new LinkedHashMap<>(); + @NonFinal Validity validity; + @NonFinal @Setter JsonNode storeNode; + @Getter @NonFinal DataStore store; + @NonFinal Configuration configuration; + @NonFinal boolean expanded; + @NonFinal boolean inRefresh; + @NonFinal @Setter boolean observing; + @Getter @NonFinal DataStoreProvider provider; + @NonFinal UUID categoryUuid; diff --git a/app/src/main/java/io/xpipe/app/storage/DataStoreSecret.java b/app/src/main/java/io/xpipe/app/storage/DataStoreSecret.java index 2039e83a3..6efbfd90a 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStoreSecret.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStoreSecret.java @@ -18,6 +18,7 @@ public class DataStoreSecret { InPlaceSecretValue internalSecret; String usedPasswordLockCrypt; + @Setter @NonFinal TreeNode originalNode; diff --git a/app/src/main/java/io/xpipe/app/update/AppInstaller.java b/app/src/main/java/io/xpipe/app/update/AppInstaller.java index 478a5b6e2..e9a739197 100644 --- a/app/src/main/java/io/xpipe/app/update/AppInstaller.java +++ b/app/src/main/java/io/xpipe/app/update/AppInstaller.java @@ -6,7 +6,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import io.xpipe.app.core.AppProperties; import io.xpipe.app.util.ScriptHelper; import io.xpipe.app.util.TerminalLauncher; -import io.xpipe.core.process.*; +import io.xpipe.core.process.OsType; +import io.xpipe.core.process.ShellDialects; import io.xpipe.core.store.FileNames; import io.xpipe.core.store.LocalStore; import io.xpipe.core.util.XPipeInstallation; diff --git a/app/src/main/java/io/xpipe/app/update/XPipeDistributionType.java b/app/src/main/java/io/xpipe/app/update/XPipeDistributionType.java index 593d49e5b..1b33b8570 100644 --- a/app/src/main/java/io/xpipe/app/update/XPipeDistributionType.java +++ b/app/src/main/java/io/xpipe/app/update/XPipeDistributionType.java @@ -23,10 +23,13 @@ public enum XPipeDistributionType { CHOCO("choco", true, () -> new ChocoUpdater()); private static XPipeDistributionType type; + @Getter private final String id; + @Getter private final boolean supportsUrls; + private final Supplier updateHandlerSupplier; private UpdateHandler updateHandler; diff --git a/app/src/main/java/io/xpipe/app/update/XPipeInstanceHelper.java b/app/src/main/java/io/xpipe/app/update/XPipeInstanceHelper.java index bbe311d7e..0c42c420b 100644 --- a/app/src/main/java/io/xpipe/app/update/XPipeInstanceHelper.java +++ b/app/src/main/java/io/xpipe/app/update/XPipeInstanceHelper.java @@ -8,7 +8,10 @@ import io.xpipe.core.store.ShellStore; import java.io.IOException; import java.nio.file.Files; -import java.util.*; +import java.util.Collection; +import java.util.Map; +import java.util.Optional; +import java.util.UUID; import java.util.stream.Collectors; public class XPipeInstanceHelper { diff --git a/app/src/main/java/io/xpipe/app/util/BooleanScope.java b/app/src/main/java/io/xpipe/app/util/BooleanScope.java index 08f49d187..6e4c71910 100644 --- a/app/src/main/java/io/xpipe/app/util/BooleanScope.java +++ b/app/src/main/java/io/xpipe/app/util/BooleanScope.java @@ -10,6 +10,7 @@ public class BooleanScope implements AutoCloseable { private boolean invert; private boolean forcePlatform; private boolean wait; + public BooleanScope(BooleanProperty prop) { this.prop = prop; } diff --git a/core/src/main/java/io/xpipe/core/process/CommandBuilder.java b/core/src/main/java/io/xpipe/core/process/CommandBuilder.java index f9a446643..3fb6b6be4 100644 --- a/core/src/main/java/io/xpipe/core/process/CommandBuilder.java +++ b/core/src/main/java/io/xpipe/core/process/CommandBuilder.java @@ -11,11 +11,15 @@ import java.util.function.Function; public class CommandBuilder { private final List elements = new ArrayList<>(); + @Getter private final Map environmentVariables = new LinkedHashMap<>(); + private final List> setup = new ArrayList<>(); + @Getter private CountDown countDown; + @Getter private UUID uuid; diff --git a/core/src/main/java/io/xpipe/core/process/CountDown.java b/core/src/main/java/io/xpipe/core/process/CountDown.java index c2a893a3e..e2d243218 100644 --- a/core/src/main/java/io/xpipe/core/process/CountDown.java +++ b/core/src/main/java/io/xpipe/core/process/CountDown.java @@ -7,8 +7,10 @@ public class CountDown { private long lastMillis = -1; private long millisecondsLeft; + @Setter private boolean active; + @Getter private long maxMillis; diff --git a/core/src/main/java/io/xpipe/core/store/FileSystem.java b/core/src/main/java/io/xpipe/core/store/FileSystem.java index b6daad8c5..b1e6b7c2c 100644 --- a/core/src/main/java/io/xpipe/core/store/FileSystem.java +++ b/core/src/main/java/io/xpipe/core/store/FileSystem.java @@ -81,13 +81,17 @@ public interface FileSystem extends Closeable, AutoCloseable { Boolean executable; long size; String mode; + @NonNull FileKind kind; + @NonNull @NonFinal String path; + @NonFinal String extension; + @NonFinal String name; diff --git a/core/src/main/java/io/xpipe/core/util/SecretReference.java b/core/src/main/java/io/xpipe/core/util/SecretReference.java index 281ca7172..f6ae9f56a 100644 --- a/core/src/main/java/io/xpipe/core/util/SecretReference.java +++ b/core/src/main/java/io/xpipe/core/util/SecretReference.java @@ -11,6 +11,7 @@ public class SecretReference { UUID secretId; int subId; + public SecretReference(Object store) { this.secretId = UuidHelper.generateFromObject(store); this.subId = 0; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/PredefinedScriptStore.java b/ext/base/src/main/java/io/xpipe/ext/base/script/PredefinedScriptStore.java index 46be8027c..89d6c54c9 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/PredefinedScriptStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/PredefinedScriptStore.java @@ -64,6 +64,7 @@ public enum PredefinedScriptStore { private final String name; private final Supplier scriptStore; private final UUID uuid; + @Setter private DataStoreEntryRef entry; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptStore.java b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptStore.java index a8e6ebd7b..5faa8abf0 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptStore.java @@ -27,8 +27,10 @@ import java.util.*; public abstract class ScriptStore extends JacksonizedValue implements DataStore, StatefulDataStore { protected final DataStoreEntryRef group; + @Singular protected final List> scripts; + protected final String description; public static ShellControl controlWithDefaultScripts(ShellControl pc) {