From 3211ef39ce74f9c8c27d3fc59adb089f935202d9 Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 7 Nov 2024 19:40:29 +0000 Subject: [PATCH] Reformat --- .../impl/ConnectionTerminalExchangeImpl.java | 2 - .../beacon/impl/DaemonOpenExchangeImpl.java | 2 +- .../BrowserFileChooserSessionComp.java | 10 +- .../BrowserFileChooserSessionModel.java | 2 +- .../app/browser/BrowserFullSessionComp.java | 23 +-- .../app/browser/BrowserFullSessionModel.java | 46 +++--- .../xpipe/app/browser/BrowserSessionTab.java | 2 +- .../app/browser/BrowserSessionTabsComp.java | 30 ++-- .../app/browser/BrowserStoreSessionTab.java | 4 +- .../file/BrowserConnectionListComp.java | 4 +- .../file/BrowserConnectionListFilterComp.java | 6 +- .../app/browser/file/BrowserFileListComp.java | 13 +- .../browser/file/BrowserFileListModel.java | 3 +- .../browser/file/BrowserFileListNameCell.java | 72 +++++--- .../browser/file/BrowserFileOverviewComp.java | 4 +- .../file/BrowserFileSelectionListComp.java | 6 +- .../file/BrowserFileSystemTabComp.java | 6 +- .../file/BrowserFileSystemTabModel.java | 8 +- .../app/browser/file/BrowserGreetingComp.java | 2 +- .../browser/file/BrowserHistoryTabComp.java | 14 +- .../browser/file/BrowserHistoryTabModel.java | 2 +- .../app/browser/file/BrowserNavBarComp.java | 5 +- .../app/browser/file/BrowserOverviewComp.java | 6 +- .../file/BrowserQuickAccessContextMenu.java | 3 +- .../browser/file/BrowserStatusBarComp.java | 2 +- .../file/BrowserTerminalDockTabModel.java | 28 +++- .../app/browser/file/BrowserTransferComp.java | 154 +++++++++--------- .../browser/file/BrowserTransferModel.java | 3 +- app/src/main/java/io/xpipe/app/comp/Comp.java | 2 +- .../io/xpipe/app/comp/base/ChoiceComp.java | 2 +- .../ContextualFileReferenceChoiceComp.java | 4 +- .../io/xpipe/app/comp/base/DialogComp.java | 4 +- .../io/xpipe/app/comp/base/FilterComp.java | 4 +- .../xpipe/app/comp/base/ListSelectorComp.java | 2 +- .../app/comp/base/LoadingOverlayComp.java | 2 +- .../io/xpipe/app/comp/base/MarkdownComp.java | 4 +- .../xpipe/app/comp/base/ModalOverlayComp.java | 4 +- .../io/xpipe/app/comp/base/OptionsComp.java | 2 +- .../app/comp/base/PopupMenuButtonComp.java | 2 +- .../xpipe/app/comp/base/PrettyImageComp.java | 2 +- .../app/comp/base/PrettyImageHelper.java | 4 +- .../io/xpipe/app/comp/base/PrettySvgComp.java | 2 +- .../xpipe/app/comp/base/SecretFieldComp.java | 2 +- .../xpipe/app/comp/base/SideMenuBarComp.java | 6 +- .../java/io/xpipe/app/comp/base/SvgView.java | 4 +- .../xpipe/app/comp/base/TileButtonComp.java | 4 +- .../xpipe/app/comp/base/TooltipAugment.java | 2 +- .../io/xpipe/app/comp/store/OsLogoComp.java | 2 +- .../comp/store/StandardStoreEntryComp.java | 2 +- .../app/comp/store/StoreCategoryComp.java | 10 +- .../app/comp/store/StoreCategoryListComp.java | 2 +- .../app/comp/store/StoreCategoryWrapper.java | 2 +- .../xpipe/app/comp/store/StoreChoiceComp.java | 4 +- .../app/comp/store/StoreCreationComp.java | 5 +- .../app/comp/store/StoreCreationMenu.java | 2 +- .../xpipe/app/comp/store/StoreEntryComp.java | 12 +- .../app/comp/store/StoreEntryListComp.java | 4 +- .../store/StoreEntryListOverviewComp.java | 6 +- .../app/comp/store/StoreEntryWrapper.java | 2 +- .../comp/store/StoreIconChoiceDialogComp.java | 8 +- .../xpipe/app/comp/store/StoreIntroComp.java | 4 +- .../xpipe/app/comp/store/StoreLayoutComp.java | 2 +- .../app/comp/store/StoreListChoiceComp.java | 2 +- .../xpipe/app/comp/store/StoreNotesComp.java | 8 +- .../comp/store/StoreProviderChoiceComp.java | 4 +- .../store/StoreQuickAccessButtonComp.java | 2 +- .../app/comp/store/StoreScriptsIntroComp.java | 2 +- .../io/xpipe/app/comp/store/StoreSection.java | 4 +- .../app/comp/store/StoreSectionComp.java | 4 +- .../app/comp/store/StoreSectionMiniComp.java | 9 +- .../xpipe/app/comp/store/StoreToggleComp.java | 4 +- .../xpipe/app/comp/store/StoreViewState.java | 4 +- app/src/main/java/io/xpipe/app/core/App.java | 2 +- .../xpipe/app/core/AppActionLinkDetector.java | 2 +- .../xpipe/app/core/AppDesktopIntegration.java | 2 +- .../java/io/xpipe/app/core/AppGreetings.java | 2 +- .../main/java/io/xpipe/app/core/AppI18n.java | 2 +- .../io/xpipe/app/core/AppLayoutModel.java | 20 +-- .../java/io/xpipe/app/core/AppProperties.java | 17 +- .../main/java/io/xpipe/app/core/AppTheme.java | 7 +- .../app/core/check/AppTestCommandCheck.java | 16 +- .../java/io/xpipe/app/core/mode/GuiMode.java | 2 +- .../io/xpipe/app/core/mode/OperationMode.java | 2 +- .../io/xpipe/app/core/mode/PlatformMode.java | 3 +- .../java/io/xpipe/app/core/mode/TrayMode.java | 2 +- .../xpipe/app/core/window/AppMainWindow.java | 2 +- .../app/core/window/AppWindowHelper.java | 2 +- .../xpipe/app/core/window/ModifiedStage.java | 2 +- .../core/window/NativeWinWindowControl.java | 50 +++--- .../io/xpipe/app/ext/DataStoreProvider.java | 2 +- .../app/ext/EnabledParentStoreProvider.java | 4 +- .../ext/SingletonSessionStoreProvider.java | 6 +- .../io/xpipe/app/issue/ErrorDetailsComp.java | 2 +- .../io/xpipe/app/issue/ErrorHandlerComp.java | 6 +- .../xpipe/app/issue/TerminalErrorHandler.java | 5 +- .../io/xpipe/app/issue/UserReportComp.java | 4 +- .../io/xpipe/app/prefs/AboutCategory.java | 6 +- .../java/io/xpipe/app/prefs/AppPrefs.java | 45 +++-- .../java/io/xpipe/app/prefs/AppPrefsComp.java | 2 +- .../xpipe/app/prefs/AppPrefsSidebarComp.java | 7 +- .../xpipe/app/prefs/AppearanceCategory.java | 6 +- .../io/xpipe/app/prefs/DeveloperCategory.java | 2 +- .../io/xpipe/app/prefs/EditorCategory.java | 6 +- .../xpipe/app/prefs/LocalShellCategory.java | 4 +- .../io/xpipe/app/prefs/LockChangeAlert.java | 4 +- .../io/xpipe/app/prefs/LoggingCategory.java | 2 +- .../app/prefs/PasswordManagerCategory.java | 8 +- .../java/io/xpipe/app/prefs/RdpCategory.java | 2 +- .../java/io/xpipe/app/prefs/SyncCategory.java | 6 +- .../io/xpipe/app/prefs/SystemCategory.java | 2 +- .../io/xpipe/app/prefs/TerminalCategory.java | 14 +- .../prefs/ThirdPartyDependencyListComp.java | 2 +- .../xpipe/app/prefs/TroubleshootCategory.java | 4 +- .../io/xpipe/app/prefs/UpdateCheckComp.java | 4 +- .../io/xpipe/app/prefs/VaultCategory.java | 2 +- .../io/xpipe/app/prefs/WorkflowCategory.java | 4 +- .../xpipe/app/prefs/WorkspacesCategory.java | 2 +- .../xpipe/app/terminal/CmdTerminalType.java | 4 +- .../app/terminal/ExternalTerminalType.java | 1 - .../app/terminal/PowerShellTerminalType.java | 25 ++- .../xpipe/app/terminal/PwshTerminalType.java | 20 ++- .../xpipe/app/terminal/TerminalDockComp.java | 16 +- .../xpipe/app/terminal/TerminalDockModel.java | 32 ++-- .../xpipe/app/terminal/TerminalLauncher.java | 3 +- .../io/xpipe/app/terminal/TerminalView.java | 23 +-- .../app/terminal/TerminalViewInstance.java | 5 +- .../terminal/WindowsTerminalViewInstance.java | 5 +- .../io/xpipe/app/update/AppDownloads.java | 2 +- .../io/xpipe/app/update/AppInstaller.java | 2 +- .../io/xpipe/app/update/UpdateHandler.java | 14 +- .../java/io/xpipe/app/util/AskpassAlert.java | 2 +- .../java/io/xpipe/app/util/AsktextAlert.java | 2 +- .../app/util/DataStoreCategoryChoiceComp.java | 2 +- .../java/io/xpipe/app/util/JfxHelper.java | 2 +- .../io/xpipe/app/util/LicenseProvider.java | 2 +- .../io/xpipe/app/util/OptionsBuilder.java | 2 +- .../java/io/xpipe/app/util/ScanDialog.java | 4 +- .../util/SecretRetrievalStrategyHelper.java | 2 +- app/src/main/java/module-info.java | 2 +- .../ext/base/action/RunScriptActionMenu.java | 1 - .../io/xpipe/ext/base/browser/CopyAction.java | 2 +- .../ext/base/browser/CopyPathAction.java | 20 ++- .../ext/base/browser/EditFileAction.java | 2 +- .../ext/base/browser/MultiExecuteAction.java | 9 +- .../browser/MultiExecuteSelectionAction.java | 6 +- .../xpipe/ext/base/browser/NewItemAction.java | 13 +- .../browser/OpenDirectoryInNewTabAction.java | 2 +- .../base/browser/OpenFileDefaultAction.java | 2 +- .../ext/base/browser/OpenFileWithAction.java | 2 +- .../ext/base/browser/OpenTerminalAction.java | 10 +- .../xpipe/ext/base/browser/PasteAction.java | 4 +- .../browser/compress/BaseCompressAction.java | 2 +- .../DesktopApplicationStoreProvider.java | 2 +- .../desktop/DesktopCommandStoreProvider.java | 2 +- .../DesktopEnvironmentStoreProvider.java | 8 +- .../ext/base/script/RunScriptAction.java | 13 +- .../base/script/ScriptGroupStoreProvider.java | 8 +- .../script/SimpleScriptStoreProvider.java | 8 +- .../AbstractServiceGroupStoreProvider.java | 9 +- .../base/service/AbstractServiceStore.java | 5 +- .../service/AbstractServiceStoreProvider.java | 8 +- .../service/CustomServiceStoreProvider.java | 2 +- .../ext/base/store/ShellStoreProvider.java | 12 +- 163 files changed, 668 insertions(+), 584 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionTerminalExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionTerminalExchangeImpl.java index 733afa018..d88fa48e1 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionTerminalExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionTerminalExchangeImpl.java @@ -8,8 +8,6 @@ import io.xpipe.beacon.api.ConnectionTerminalExchange; import com.sun.net.httpserver.HttpExchange; -import java.util.UUID; - public class ConnectionTerminalExchangeImpl extends ConnectionTerminalExchange { @Override diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/DaemonOpenExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/DaemonOpenExchangeImpl.java index b4585264c..75f9e4b7f 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/DaemonOpenExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/DaemonOpenExchangeImpl.java @@ -1,7 +1,7 @@ package io.xpipe.app.beacon.impl; -import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.core.launcher.LauncherInput; +import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.util.PlatformState; import io.xpipe.beacon.BeaconServerException; import io.xpipe.beacon.api.DaemonOpenExchange; diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserFileChooserSessionComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserFileChooserSessionComp.java index ce419eea3..b0f6c25c4 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserFileChooserSessionComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserFileChooserSessionComp.java @@ -5,19 +5,19 @@ import io.xpipe.app.browser.file.BrowserConnectionListFilterComp; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabComp; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.DialogComp; import io.xpipe.app.comp.base.LeftSplitPaneComp; +import io.xpipe.app.comp.base.StackComp; +import io.xpipe.app.comp.base.VerticalComp; import io.xpipe.app.comp.store.StoreEntryWrapper; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppLayoutModel; import io.xpipe.app.ext.ShellStore; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.base.StackComp; -import io.xpipe.app.comp.base.VerticalComp; -import io.xpipe.app.util.BindingsHelper; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.storage.DataStoreEntryRef; +import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.FileReference; +import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.store.FileSystemStore; diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserFileChooserSessionModel.java b/app/src/main/java/io/xpipe/app/browser/BrowserFileChooserSessionModel.java index d5e49c99e..bfcca2008 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserFileChooserSessionModel.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserFileChooserSessionModel.java @@ -2,9 +2,9 @@ package io.xpipe.app.browser; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; -import io.xpipe.app.util.DerivedObservableList; import io.xpipe.app.storage.DataStoreEntryRef; import io.xpipe.app.util.BooleanScope; +import io.xpipe.app.util.DerivedObservableList; import io.xpipe.app.util.FileReference; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.store.FileNames; diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserFullSessionComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserFullSessionComp.java index 13d40a424..e68c7391b 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserFullSessionComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserFullSessionComp.java @@ -3,17 +3,17 @@ package io.xpipe.app.browser; import io.xpipe.app.browser.file.BrowserConnectionListComp; import io.xpipe.app.browser.file.BrowserConnectionListFilterComp; import io.xpipe.app.browser.file.BrowserTransferComp; -import io.xpipe.app.comp.base.LoadingOverlayComp; -import io.xpipe.app.comp.base.LeftSplitPaneComp; -import io.xpipe.app.comp.store.StoreEntryWrapper; -import io.xpipe.app.core.AppLayoutModel; -import io.xpipe.app.ext.ShellStore; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.AnchorComp; +import io.xpipe.app.comp.base.LeftSplitPaneComp; +import io.xpipe.app.comp.base.LoadingOverlayComp; import io.xpipe.app.comp.base.StackComp; import io.xpipe.app.comp.base.VerticalComp; +import io.xpipe.app.comp.store.StoreEntryWrapper; +import io.xpipe.app.core.AppLayoutModel; +import io.xpipe.app.ext.ShellStore; import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ThreadHelper; @@ -80,10 +80,10 @@ public class BrowserFullSessionComp extends SimpleComp { leftSplit.set(d); }); splitPane.apply(struc -> { - struc.getLeft().setMinWidth(200); - struc.getLeft().setMaxWidth(500); - struc.get().setPickOnBounds(false); - }); + struc.getLeft().setMinWidth(200); + struc.getLeft().setMaxWidth(500); + struc.get().setPickOnBounds(false); + }); splitPane.apply(struc -> { struc.get().skinProperty().subscribe(newValue -> { @@ -173,7 +173,7 @@ public class BrowserFullSessionComp extends SimpleComp { var cache = new HashMap(); var pinnedStack = new StackComp(List.of()); pinnedStack.apply(struc -> { - model.getEffectiveRightTab().subscribe( (newValue) -> { + model.getEffectiveRightTab().subscribe((newValue) -> { PlatformThread.runLaterIfNeeded(() -> { var all = model.getAllTabs(); cache.keySet().removeIf(browserSessionTab -> !all.contains(browserSessionTab)); @@ -204,6 +204,7 @@ public class BrowserFullSessionComp extends SimpleComp { tabs.getHeaderHeight().subscribe(number -> { AnchorPane.setTopAnchor(struc.get(), number.doubleValue()); }); - }); return pinnedStack; + }); + return pinnedStack; } } diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserFullSessionModel.java b/app/src/main/java/io/xpipe/app/browser/BrowserFullSessionModel.java index ae57fb3c9..5df06abad 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserFullSessionModel.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserFullSessionModel.java @@ -1,10 +1,10 @@ package io.xpipe.app.browser; -import io.xpipe.app.browser.file.BrowserHistoryTabModel; +import io.xpipe.app.browser.file.BrowserFileSystemTabModel; import io.xpipe.app.browser.file.BrowserHistorySavedState; import io.xpipe.app.browser.file.BrowserHistorySavedStateImpl; +import io.xpipe.app.browser.file.BrowserHistoryTabModel; import io.xpipe.app.browser.file.BrowserTransferModel; -import io.xpipe.app.browser.file.BrowserFileSystemTabModel; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntryRef; import io.xpipe.app.util.BooleanScope; @@ -12,6 +12,7 @@ import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.store.FileNames; import io.xpipe.core.store.FileSystemStore; import io.xpipe.core.util.FailableFunction; + import javafx.beans.binding.Bindings; import javafx.beans.property.BooleanProperty; import javafx.beans.property.Property; @@ -21,6 +22,7 @@ import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableMap; + import lombok.Getter; import java.util.*; @@ -41,28 +43,32 @@ public class BrowserFullSessionModel extends BrowserAbstractSessionModel effectiveRightTab = createEffectiveRightTab(); private ObservableValue createEffectiveRightTab() { - return Bindings.createObjectBinding(() -> { - var current = selectedEntry.getValue(); - if (!current.isCloseable()) { - return null; - } + return Bindings.createObjectBinding( + () -> { + var current = selectedEntry.getValue(); + if (!current.isCloseable()) { + return null; + } - var split = splits.get(current); - if (split != null) { - return split; - } + var split = splits.get(current); + if (split != null) { + return split; + } - var global = globalPinnedTab.getValue(); - if (global == null) { - return null; - } + var global = globalPinnedTab.getValue(); + if (global == null) { + return null; + } - if (global == selectedEntry.getValue()) { - return null; - } + if (global == selectedEntry.getValue()) { + return null; + } - return global; - }, globalPinnedTab, selectedEntry, splits); + return global; + }, + globalPinnedTab, + selectedEntry, + splits); } public BrowserFullSessionModel() { diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserSessionTab.java b/app/src/main/java/io/xpipe/app/browser/BrowserSessionTab.java index 13426b34d..b0d3d9584 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserSessionTab.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserSessionTab.java @@ -6,8 +6,8 @@ import io.xpipe.app.storage.DataColor; import javafx.beans.property.BooleanProperty; import javafx.beans.property.Property; import javafx.beans.property.SimpleBooleanProperty; - import javafx.beans.property.SimpleObjectProperty; + import lombok.Getter; @Getter diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserSessionTabsComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserSessionTabsComp.java index dbb2bf148..97864dd3c 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserSessionTabsComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserSessionTabsComp.java @@ -1,14 +1,14 @@ package io.xpipe.app.browser; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.PrettyImageHelper; -import io.xpipe.app.util.LabelGraphic; -import io.xpipe.app.util.PlatformThread; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.util.BooleanScope; import io.xpipe.app.util.ContextMenuHelper; +import io.xpipe.app.util.LabelGraphic; +import io.xpipe.app.util.PlatformThread; import javafx.application.Platform; import javafx.beans.binding.Bindings; @@ -45,7 +45,8 @@ public class BrowserSessionTabsComp extends SimpleComp { @Getter private final DoubleProperty headerHeight; - public BrowserSessionTabsComp(BrowserFullSessionModel model, ObservableDoubleValue leftPadding, DoubleProperty rightPadding) { + public BrowserSessionTabsComp( + BrowserFullSessionModel model, ObservableDoubleValue leftPadding, DoubleProperty rightPadding) { this.model = model; this.leftPadding = leftPadding; this.rightPadding = rightPadding; @@ -263,9 +264,13 @@ public class BrowserSessionTabsComp extends SimpleComp { if (tabModel.isCloseable()) { var unsplit = ContextMenuHelper.item(LabelGraphic.none(), AppI18n.get("unpinTab")); - unsplit.visibleProperty().bind(PlatformThread.sync(Bindings.createBooleanBinding(() -> { - return model.getGlobalPinnedTab().getValue() != null && model.getGlobalPinnedTab().getValue().equals(tabModel); - }, model.getGlobalPinnedTab()))); + unsplit.visibleProperty() + .bind(PlatformThread.sync(Bindings.createBooleanBinding( + () -> { + return model.getGlobalPinnedTab().getValue() != null + && model.getGlobalPinnedTab().getValue().equals(tabModel); + }, + model.getGlobalPinnedTab()))); unsplit.setOnAction(event -> { model.unpinTab(tabModel); event.consume(); @@ -396,9 +401,14 @@ public class BrowserSessionTabsComp extends SimpleComp { if (tabModel.getBrowserModel() instanceof BrowserFullSessionModel sessionModel) { var global = PlatformThread.sync(sessionModel.getGlobalPinnedTab()); - tab.textProperty().bind(Bindings.createStringBinding(() -> { - return tabModel.getName() + (global.getValue() == tabModel ? " (" + AppI18n.get("pinned") + ")" : ""); - }, global, AppPrefs.get().language())); + tab.textProperty() + .bind(Bindings.createStringBinding( + () -> { + return tabModel.getName() + + (global.getValue() == tabModel ? " (" + AppI18n.get("pinned") + ")" : ""); + }, + global, + AppPrefs.get().language())); } else { tab.setText(tabModel.getName()); } diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserStoreSessionTab.java b/app/src/main/java/io/xpipe/app/browser/BrowserStoreSessionTab.java index defa1b213..a9320fa15 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserStoreSessionTab.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserStoreSessionTab.java @@ -14,9 +14,7 @@ public abstract class BrowserStoreSessionTab extends Browse protected final DataStoreEntryRef entry; public BrowserStoreSessionTab(BrowserAbstractSessionModel browserModel, DataStoreEntryRef entry) { - super( - browserModel, - DataStorage.get().getStoreEntryDisplayName(entry.get())); + super(browserModel, DataStorage.get().getStoreEntryDisplayName(entry.get())); this.entry = entry; } diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserConnectionListComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserConnectionListComp.java index 58f705a9e..0926b5499 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserConnectionListComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserConnectionListComp.java @@ -1,11 +1,11 @@ package io.xpipe.app.browser.file; -import io.xpipe.app.comp.store.*; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.util.PlatformThread; +import io.xpipe.app.comp.store.*; import io.xpipe.app.storage.DataStoreEntry; +import io.xpipe.app.util.PlatformThread; import javafx.beans.binding.Bindings; import javafx.beans.property.*; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserConnectionListFilterComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserConnectionListFilterComp.java index 128b10ae1..1a9f5688e 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserConnectionListFilterComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserConnectionListFilterComp.java @@ -1,11 +1,11 @@ package io.xpipe.app.browser.file; -import io.xpipe.app.comp.store.StoreCategoryWrapper; -import io.xpipe.app.comp.store.StoreViewState; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.FilterComp; import io.xpipe.app.comp.base.HorizontalComp; +import io.xpipe.app.comp.store.StoreCategoryWrapper; +import io.xpipe.app.comp.store.StoreViewState; +import io.xpipe.app.core.AppFont; import io.xpipe.app.util.DataStoreCategoryChoiceComp; import javafx.beans.property.Property; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListComp.java index ab171d37e..78784f670 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListComp.java @@ -1,10 +1,10 @@ package io.xpipe.app.browser.file; import io.xpipe.app.browser.action.BrowserAction; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.util.PlatformThread; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.util.*; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.process.OsType; import io.xpipe.core.store.FileEntry; import io.xpipe.core.store.FileInfo; @@ -72,7 +72,8 @@ public final class BrowserFileListComp extends SimpleComp { : null)); filenameCol.setComparator(Comparator.comparing(String::toLowerCase)); filenameCol.setSortType(ASCENDING); - filenameCol.setCellFactory(col -> new BrowserFileListNameCell(fileList, typedSelection, fileList.getEditing(), col.getTableView())); + filenameCol.setCellFactory(col -> + new BrowserFileListNameCell(fileList, typedSelection, fileList.getEditing(), col.getTableView())); filenameCol.setReorderable(false); filenameCol.setResizable(false); @@ -153,7 +154,10 @@ public final class BrowserFileListComp extends SimpleComp { }); } - private void prepareColumnVisibility(TableView table, TableColumn ownerCol, TableColumn filenameCol) { + private void prepareColumnVisibility( + TableView table, + TableColumn ownerCol, + TableColumn filenameCol) { var os = fileList.getFileSystemModel() .getFileSystem() .getShell() @@ -628,5 +632,4 @@ public final class BrowserFileListComp extends SimpleComp { } } } - } diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListModel.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListModel.java index 3187c9ba6..cfcdb5999 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListModel.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListModel.java @@ -39,7 +39,8 @@ public final class BrowserFileListModel { private final Property draggedOverEmpty = new SimpleBooleanProperty(); private final Property editing = new SimpleObjectProperty<>(); - public BrowserFileListModel(BrowserFileSystemTabModel.SelectionMode selectionMode, BrowserFileSystemTabModel fileSystemModel) { + public BrowserFileListModel( + BrowserFileSystemTabModel.SelectionMode selectionMode, BrowserFileSystemTabModel fileSystemModel) { this.selectionMode = selectionMode; this.fileSystemModel = fileSystemModel; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListNameCell.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListNameCell.java index b4858aa0a..865cc099e 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListNameCell.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListNameCell.java @@ -1,14 +1,14 @@ package io.xpipe.app.browser.file; -import atlantafx.base.controls.Spacer; import io.xpipe.app.comp.base.LazyTextFieldComp; import io.xpipe.app.comp.base.PrettyImageHelper; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.BooleanScope; import io.xpipe.app.util.ContextMenuHelper; import io.xpipe.app.util.InputHelper; +import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.store.FileKind; + import javafx.application.Platform; import javafx.beans.binding.Bindings; import javafx.beans.property.*; @@ -28,6 +28,8 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.scene.layout.Region; +import atlantafx.base.controls.Spacer; + class BrowserFileListNameCell extends TableCell { private final BrowserFileListModel fileList; @@ -37,16 +39,26 @@ class BrowserFileListNameCell extends TableCell { private final BooleanProperty updating = new SimpleBooleanProperty(); - public BrowserFileListNameCell(BrowserFileListModel fileList, ObservableStringValue typedSelection, Property editing, TableView tableView) { + public BrowserFileListNameCell( + BrowserFileListModel fileList, + ObservableStringValue typedSelection, + Property editing, + TableView tableView) { this.fileList = fileList; this.typedSelection = typedSelection; - accessibleTextProperty().bind(Bindings.createStringBinding(() -> { - return getItem() != null ? getItem() : null; - }, itemProperty())); + accessibleTextProperty() + .bind(Bindings.createStringBinding( + () -> { + return getItem() != null ? getItem() : null; + }, + itemProperty())); setAccessibleRole(AccessibleRole.TEXT); - var textField = new LazyTextFieldComp(text).minWidth(USE_PREF_SIZE).createStructure().get(); + var textField = new LazyTextFieldComp(text) + .minWidth(USE_PREF_SIZE) + .createStructure() + .get(); var quickAccess = createQuickAccessButton(); setupShortcuts(tableView, (ButtonBase) quickAccess); setupRename(fileList, textField, editing); @@ -62,16 +74,22 @@ class BrowserFileListNameCell extends TableCell { } private Region createQuickAccessButton() { - var quickAccess = new BrowserQuickAccessButtonComp(() -> getTableRow().getItem(), fileList.getFileSystemModel()).hide(Bindings.createBooleanBinding(() -> { - if (getTableRow() == null) { - return true; - } + var quickAccess = new BrowserQuickAccessButtonComp(() -> getTableRow().getItem(), fileList.getFileSystemModel()) + .hide(Bindings.createBooleanBinding( + () -> { + if (getTableRow() == null) { + return true; + } - var item = getTableRow().getItem(); - var notDir = item.getRawFileEntry().resolved().getKind() != FileKind.DIRECTORY; - var isParentLink = item.getRawFileEntry().equals(fileList.getFileSystemModel().getCurrentParentDirectory()); - return notDir || isParentLink; - }, itemProperty())).focusTraversable(false).createRegion(); + var item = getTableRow().getItem(); + var notDir = item.getRawFileEntry().resolved().getKind() != FileKind.DIRECTORY; + var isParentLink = item.getRawFileEntry() + .equals(fileList.getFileSystemModel().getCurrentParentDirectory()); + return notDir || isParentLink; + }, + itemProperty())) + .focusTraversable(false) + .createRegion(); return quickAccess; } @@ -85,7 +103,10 @@ class BrowserFileListNameCell extends TableCell { }); InputHelper.onExactKeyCode(tableView, KeyCode.SPACE, true, event -> { var selection = typedSelection.get() + " "; - var found = fileList.getShown().getValue().stream().filter(browserEntry -> browserEntry.getFileName().toLowerCase().startsWith(selection)).findFirst(); + var found = fileList.getShown().getValue().stream() + .filter(browserEntry -> + browserEntry.getFileName().toLowerCase().startsWith(selection)) + .findFirst(); // Ugly fix to prevent space from showing the menu when there is a file matching // Due to the table view input map, these events always get sent and consumed, not allowing us to // differentiate between these cases @@ -96,7 +117,8 @@ class BrowserFileListNameCell extends TableCell { var selected = fileList.getSelection(); // Only show one menu across all selected entries if (selected.size() > 0 && selected.getLast() == getTableRow().getItem()) { - var cm = new BrowserContextMenu(fileList.getFileSystemModel(), getTableRow().getItem(), false); + var cm = new BrowserContextMenu( + fileList.getFileSystemModel(), getTableRow().getItem(), false); ContextMenuHelper.toggleShow(cm, this, Side.RIGHT); event.consume(); } @@ -159,11 +181,17 @@ class BrowserFileListNameCell extends TableCell { var isDirectory = getTableRow().getItem().getRawFileEntry().getKind() == FileKind.DIRECTORY; pseudoClassStateChanged(PseudoClass.getPseudoClass("folder"), isDirectory); - var normalName = getTableRow().getItem().getRawFileEntry().getKind() == FileKind.LINK ? - getTableRow().getItem().getFileName() + " -> " + getTableRow().getItem().getRawFileEntry().resolved().getPath() : - getTableRow().getItem().getFileName(); + var normalName = getTableRow().getItem().getRawFileEntry().getKind() == FileKind.LINK + ? getTableRow().getItem().getFileName() + " -> " + + getTableRow() + .getItem() + .getRawFileEntry() + .resolved() + .getPath() + : getTableRow().getItem().getFileName(); var fileName = normalName; - var hidden = getTableRow().getItem().getRawFileEntry().getInfo().explicitlyHidden() || fileName.startsWith("."); + var hidden = getTableRow().getItem().getRawFileEntry().getInfo().explicitlyHidden() + || fileName.startsWith("."); getTableRow().pseudoClassStateChanged(PseudoClass.getPseudoClass("hidden"), hidden); text.set(fileName); // Visibility seems to be bugged, so use opacity diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileOverviewComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileOverviewComp.java index 7540d2320..e6bba8efa 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileOverviewComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileOverviewComp.java @@ -1,12 +1,12 @@ package io.xpipe.app.browser.file; import io.xpipe.app.browser.icon.BrowserIcons; -import io.xpipe.app.comp.base.ListBoxViewComp; -import io.xpipe.app.comp.base.VBoxViewComp; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.augment.GrowAugment; import io.xpipe.app.comp.base.HorizontalComp; +import io.xpipe.app.comp.base.ListBoxViewComp; +import io.xpipe.app.comp.base.VBoxViewComp; import io.xpipe.core.store.FileEntry; import javafx.collections.ObservableList; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSelectionListComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSelectionListComp.java index 154279167..d87ca9a4a 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSelectionListComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSelectionListComp.java @@ -1,11 +1,11 @@ package io.xpipe.app.browser.file; -import io.xpipe.app.comp.base.ListBoxViewComp; -import io.xpipe.app.core.AppStyle; -import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.comp.base.ListBoxViewComp; import io.xpipe.app.comp.base.PrettyImageHelper; +import io.xpipe.app.core.AppStyle; +import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.PlatformThread; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabComp.java index 8993a10c8..d603faa4e 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabComp.java @@ -1,15 +1,15 @@ package io.xpipe.app.browser.file; import io.xpipe.app.browser.action.BrowserAction; -import io.xpipe.app.comp.base.ModalOverlayComp; -import io.xpipe.app.comp.base.MultiContentComp; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.SimpleCompStructure; import io.xpipe.app.comp.augment.ContextMenuAugment; +import io.xpipe.app.comp.base.ModalOverlayComp; +import io.xpipe.app.comp.base.MultiContentComp; import io.xpipe.app.comp.base.TooltipAugment; import io.xpipe.app.comp.base.VerticalComp; +import io.xpipe.app.core.AppFont; import io.xpipe.app.util.InputHelper; import javafx.geometry.Pos; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabModel.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabModel.java index d0d0b46fa..6a69d3f65 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabModel.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabModel.java @@ -1,17 +1,17 @@ package io.xpipe.app.browser.file; -import io.xpipe.app.browser.action.BrowserAction; import io.xpipe.app.browser.BrowserAbstractSessionModel; import io.xpipe.app.browser.BrowserStoreSessionTab; +import io.xpipe.app.browser.action.BrowserAction; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.ModalOverlayComp; import io.xpipe.app.ext.ProcessControlProvider; import io.xpipe.app.ext.ShellStore; -import io.xpipe.app.comp.Comp; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntryRef; -import io.xpipe.app.util.BooleanScope; import io.xpipe.app.terminal.TerminalLauncher; +import io.xpipe.app.util.BooleanScope; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.process.CommandBuilder; import io.xpipe.core.process.ShellControl; @@ -23,9 +23,9 @@ import io.xpipe.core.util.FailableRunnable; import javafx.beans.binding.Bindings; import javafx.beans.property.*; - import javafx.collections.FXCollections; import javafx.collections.ObservableList; + import lombok.Getter; import lombok.SneakyThrows; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserGreetingComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserGreetingComp.java index 1d043f819..280c730e7 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserGreetingComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserGreetingComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.browser.file; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.AppLayoutModel; -import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.util.PlatformThread; import io.xpipe.core.process.OsType; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserHistoryTabComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserHistoryTabComp.java index bdd2adb68..57aa3fce3 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserHistoryTabComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserHistoryTabComp.java @@ -1,20 +1,20 @@ package io.xpipe.app.browser.file; import io.xpipe.app.browser.BrowserFullSessionModel; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.ButtonComp; +import io.xpipe.app.comp.base.HorizontalComp; +import io.xpipe.app.comp.base.LabelComp; import io.xpipe.app.comp.base.ListBoxViewComp; +import io.xpipe.app.comp.base.PrettyImageHelper; +import io.xpipe.app.comp.base.PrettySvgComp; import io.xpipe.app.comp.base.TileButtonComp; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.comp.base.HorizontalComp; -import io.xpipe.app.comp.base.LabelComp; -import io.xpipe.app.comp.base.PrettyImageHelper; -import io.xpipe.app.comp.base.PrettySvgComp; +import io.xpipe.app.storage.DataStorage; import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.DerivedObservableList; -import io.xpipe.app.storage.DataStorage; import io.xpipe.app.util.ThreadHelper; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserHistoryTabModel.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserHistoryTabModel.java index 3f9df43d9..d003e9f80 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserHistoryTabModel.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserHistoryTabModel.java @@ -3,8 +3,8 @@ package io.xpipe.app.browser.file; import io.xpipe.app.browser.BrowserAbstractSessionModel; import io.xpipe.app.browser.BrowserFullSessionModel; import io.xpipe.app.browser.BrowserSessionTab; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.Comp; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.storage.DataColor; public final class BrowserHistoryTabModel extends BrowserSessionTab { diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserNavBarComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserNavBarComp.java index 8c9c77cf1..67fcbd893 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserNavBarComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserNavBarComp.java @@ -123,9 +123,8 @@ public class BrowserNavBarComp extends Comp { }); }); }); - var pathBar = new TextFieldComp(path, true) - .styleClass(Styles.CENTER_PILL) - .styleClass("path-text"); + var pathBar = + new TextFieldComp(path, true).styleClass(Styles.CENTER_PILL).styleClass("path-text"); pathBar.apply(struc -> { struc.get().focusedProperty().subscribe(val -> { struc.get() diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserOverviewComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserOverviewComp.java index 328e2cf74..3b9091fa2 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserOverviewComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserOverviewComp.java @@ -1,12 +1,12 @@ package io.xpipe.app.browser.file; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.SimpleTitledPaneComp; +import io.xpipe.app.comp.base.VerticalComp; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.comp.base.VerticalComp; -import io.xpipe.app.util.DerivedObservableList; import io.xpipe.app.issue.ErrorEvent; +import io.xpipe.app.util.DerivedObservableList; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.process.ShellControl; import io.xpipe.core.store.FileEntry; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserQuickAccessContextMenu.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserQuickAccessContextMenu.java index 08f234aec..5d4c028f1 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserQuickAccessContextMenu.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserQuickAccessContextMenu.java @@ -141,7 +141,8 @@ public class BrowserQuickAccessContextMenu extends ContextMenu { this.menu = new Menu( // Use original name, not the link target browserEntry.getRawFileEntry().getName(), - PrettyImageHelper.ofFixedSize(BrowserIconManager.getFileIcon(browserEntry.getRawFileEntry()), 24, 24) + PrettyImageHelper.ofFixedSize( + BrowserIconManager.getFileIcon(browserEntry.getRawFileEntry()), 24, 24) .createRegion()); createMenu(); addInputListeners(); diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserStatusBarComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserStatusBarComp.java index 7789d3b7d..f61f79963 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserStatusBarComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserStatusBarComp.java @@ -1,12 +1,12 @@ package io.xpipe.app.browser.file; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.SimpleCompStructure; import io.xpipe.app.comp.augment.ContextMenuAugment; import io.xpipe.app.comp.base.HorizontalComp; import io.xpipe.app.comp.base.LabelComp; +import io.xpipe.app.core.AppFont; import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.HumanReadableFormat; diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserTerminalDockTabModel.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserTerminalDockTabModel.java index 82c681445..21760e0fe 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserTerminalDockTabModel.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserTerminalDockTabModel.java @@ -3,14 +3,15 @@ package io.xpipe.app.browser.file; import io.xpipe.app.browser.BrowserAbstractSessionModel; import io.xpipe.app.browser.BrowserFullSessionModel; import io.xpipe.app.browser.BrowserSessionTab; +import io.xpipe.app.comp.Comp; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.AppLayoutModel; -import io.xpipe.app.comp.Comp; import io.xpipe.app.storage.DataColor; import io.xpipe.app.terminal.TerminalDockComp; import io.xpipe.app.terminal.TerminalDockModel; import io.xpipe.app.terminal.TerminalView; import io.xpipe.app.terminal.TerminalViewInstance; + import javafx.application.Platform; import javafx.beans.binding.Bindings; import javafx.beans.value.ObservableBooleanValue; @@ -27,7 +28,10 @@ public final class BrowserTerminalDockTabModel extends BrowserSessionTab { private TerminalView.Listener listener; private ObservableBooleanValue viewActive; - public BrowserTerminalDockTabModel(BrowserAbstractSessionModel browserModel, BrowserSessionTab origin, ObservableList terminalRequests) { + public BrowserTerminalDockTabModel( + BrowserAbstractSessionModel browserModel, + BrowserSessionTab origin, + ObservableList terminalRequests) { super(browserModel, AppI18n.get("terminal")); this.origin = origin; this.terminalRequests = terminalRequests; @@ -55,7 +59,10 @@ public final class BrowserTerminalDockTabModel extends BrowserSessionTab { } sessions.add(session); - var tv = terminals.stream().filter(instance -> sessions.stream().anyMatch(s -> instance.getTerminalProcess().equals(s.getTerminal()))).toList(); + var tv = terminals.stream() + .filter(instance -> sessions.stream() + .anyMatch(s -> instance.getTerminalProcess().equals(s.getTerminal()))) + .toList(); if (tv.isEmpty()) { return; } @@ -88,9 +95,18 @@ public final class BrowserTerminalDockTabModel extends BrowserSessionTab { }; TerminalView.get().addListener(listener); - viewActive = Bindings.createBooleanBinding(() -> { - return this.browserModel.getSelectedEntry().getValue() == origin && AppLayoutModel.get().getEntries().indexOf(AppLayoutModel.get().getSelected().getValue()) == 1; - }, this.browserModel.getSelectedEntry(), AppLayoutModel.get().getSelected()); + viewActive = Bindings.createBooleanBinding( + () -> { + return this.browserModel.getSelectedEntry().getValue() == origin + && AppLayoutModel.get() + .getEntries() + .indexOf(AppLayoutModel.get() + .getSelected() + .getValue()) + == 1; + }, + this.browserModel.getSelectedEntry(), + AppLayoutModel.get().getSelected()); viewActive.subscribe(aBoolean -> { Platform.runLater(() -> { dockModel.toggleView(aBoolean); diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserTransferComp.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserTransferComp.java index 79c274fc6..88b192ff2 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserTransferComp.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserTransferComp.java @@ -1,10 +1,10 @@ package io.xpipe.app.browser.file; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.*; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.util.DerivedObservableList; import io.xpipe.app.util.ThreadHelper; @@ -104,88 +104,84 @@ public class BrowserTransferComp extends SimpleComp { .padding(new Insets(10, 10, 5, 10)) .apply(struc -> struc.get().setMinHeight(200)) .apply(struc -> struc.get().setMaxHeight(200)); - var stack = new StackComp(List.of(backgroundStack, listBox)) - .apply(struc -> { - struc.get().addEventFilter(DragEvent.DRAG_ENTERED, event -> { - struc.get().pseudoClassStateChanged(PseudoClass.getPseudoClass("drag-over"), true); - }); - struc.get().addEventFilter(DragEvent.DRAG_EXITED, event -> struc.get() - .pseudoClassStateChanged(PseudoClass.getPseudoClass("drag-over"), false)); - struc.get().setOnDragOver(event -> { - // Accept drops from inside the app window - if (event.getGestureSource() != null && event.getGestureSource() != struc.get()) { - event.acceptTransferModes(TransferMode.ANY); - event.consume(); - } - }); - struc.get().setOnDragDropped(event -> { - // Accept drops from inside the app window - if (event.getGestureSource() != null) { - var drag = BrowserClipboard.retrieveDrag(event.getDragboard()); - if (drag == null) { - return; + var stack = new StackComp(List.of(backgroundStack, listBox)).apply(struc -> { + struc.get().addEventFilter(DragEvent.DRAG_ENTERED, event -> { + struc.get().pseudoClassStateChanged(PseudoClass.getPseudoClass("drag-over"), true); + }); + struc.get().addEventFilter(DragEvent.DRAG_EXITED, event -> struc.get() + .pseudoClassStateChanged(PseudoClass.getPseudoClass("drag-over"), false)); + struc.get().setOnDragOver(event -> { + // Accept drops from inside the app window + if (event.getGestureSource() != null && event.getGestureSource() != struc.get()) { + event.acceptTransferModes(TransferMode.ANY); + event.consume(); + } + }); + struc.get().setOnDragDropped(event -> { + // Accept drops from inside the app window + if (event.getGestureSource() != null) { + var drag = BrowserClipboard.retrieveDrag(event.getDragboard()); + if (drag == null) { + return; + } + + if (!(model.getBrowserSessionModel().getSelectedEntry().getValue() + instanceof BrowserFileSystemTabModel fileSystemModel)) { + return; + } + + var files = drag.getEntries(); + model.drop(fileSystemModel, files); + event.setDropCompleted(true); + event.consume(); + } + }); + struc.get().setOnDragDetected(event -> { + var items = model.getCurrentItems(); + var selected = + items.stream().map(item -> item.getBrowserEntry()).toList(); + var files = items.stream() + .filter(item -> item.downloadFinished().get()) + .map(item -> { + try { + var file = item.getLocalFile(); + if (!Files.exists(file)) { + return Optional.empty(); + } + + return Optional.of(file.toRealPath().toFile()); + } catch (IOException e) { + throw new RuntimeException(e); } + }) + .flatMap(Optional::stream) + .toList(); + if (files.isEmpty()) { + return; + } - if (!(model.getBrowserSessionModel() - .getSelectedEntry() - .getValue() - instanceof BrowserFileSystemTabModel fileSystemModel)) { - return; - } + var cc = new ClipboardContent(); + cc.putFiles(files); + Dragboard db = struc.get().startDragAndDrop(TransferMode.COPY); + db.setContent(cc); - var files = drag.getEntries(); - model.drop(fileSystemModel, files); - event.setDropCompleted(true); - event.consume(); - } - }); - struc.get().setOnDragDetected(event -> { - var items = model.getCurrentItems(); - var selected = items.stream() - .map(item -> item.getBrowserEntry()) - .toList(); - var files = items.stream() - .filter(item -> item.downloadFinished().get()) - .map(item -> { - try { - var file = item.getLocalFile(); - if (!Files.exists(file)) { - return Optional.empty(); - } + Image image = BrowserFileSelectionListComp.snapshot(FXCollections.observableList(selected)); + db.setDragView(image, -20, 15); - return Optional.of(file.toRealPath().toFile()); - } catch (IOException e) { - throw new RuntimeException(e); - } - }) - .flatMap(Optional::stream) - .toList(); - if (files.isEmpty()) { - return; - } + event.setDragDetect(true); + event.consume(); + }); + struc.get().setOnDragDone(event -> { + if (!event.isAccepted()) { + return; + } - var cc = new ClipboardContent(); - cc.putFiles(files); - Dragboard db = struc.get().startDragAndDrop(TransferMode.COPY); - db.setContent(cc); - - Image image = BrowserFileSelectionListComp.snapshot(FXCollections.observableList(selected)); - db.setDragView(image, -20, 15); - - event.setDragDetect(true); - event.consume(); - }); - struc.get().setOnDragDone(event -> { - if (!event.isAccepted()) { - return; - } - - // The files might not have been transferred yet - // We can't listen to this, so just don't delete them - model.clear(false); - event.consume(); - }); - }); + // The files might not have been transferred yet + // We can't listen to this, so just don't delete them + model.clear(false); + event.consume(); + }); + }); stack.apply(struc -> { model.getBrowserSessionModel().getDraggingFiles().addListener((observable, oldValue, newValue) -> { diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserTransferModel.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserTransferModel.java index 9d1d0e37c..5418145bb 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserTransferModel.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserTransferModel.java @@ -191,7 +191,8 @@ public class BrowserTransferModel { Path localFile; Property progress; - public Item(BrowserFileSystemTabModel openFileSystemModel, String name, BrowserEntry browserEntry, Path localFile) { + public Item( + BrowserFileSystemTabModel openFileSystemModel, String name, BrowserEntry browserEntry, Path localFile) { this.openFileSystemModel = openFileSystemModel; this.name = name; this.browserEntry = browserEntry; diff --git a/app/src/main/java/io/xpipe/app/comp/Comp.java b/app/src/main/java/io/xpipe/app/comp/Comp.java index c574c492c..6d02a00ce 100644 --- a/app/src/main/java/io/xpipe/app/comp/Comp.java +++ b/app/src/main/java/io/xpipe/app/comp/Comp.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.augment.Augment; import io.xpipe.app.comp.augment.GrowAugment; import io.xpipe.app.comp.base.TooltipAugment; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.PlatformThread; diff --git a/app/src/main/java/io/xpipe/app/comp/base/ChoiceComp.java b/app/src/main/java/io/xpipe/app/comp/base/ChoiceComp.java index 3b97540bc..5c44efe63 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ChoiceComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.Translatable; diff --git a/app/src/main/java/io/xpipe/app/comp/base/ContextualFileReferenceChoiceComp.java b/app/src/main/java/io/xpipe/app/comp/base/ContextualFileReferenceChoiceComp.java index fa7827acc..c223e7fb0 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ContextualFileReferenceChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ContextualFileReferenceChoiceComp.java @@ -1,11 +1,11 @@ package io.xpipe.app.comp.base; import io.xpipe.app.browser.BrowserFileChooserSessionComp; -import io.xpipe.app.core.AppLayoutModel; -import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; +import io.xpipe.app.core.AppLayoutModel; +import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.ContextualFileReference; diff --git a/app/src/main/java/io/xpipe/app/comp/base/DialogComp.java b/app/src/main/java/io/xpipe/app/comp/base/DialogComp.java index 719c514c3..f8b01c332 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/DialogComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/DialogComp.java @@ -1,10 +1,10 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppI18n; -import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.core.window.AppWindowHelper; import javafx.application.Platform; import javafx.beans.property.SimpleBooleanProperty; diff --git a/app/src/main/java/io/xpipe/app/comp/base/FilterComp.java b/app/src/main/java/io/xpipe/app/comp/base/FilterComp.java index df7549c52..6e4ee8a14 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/FilterComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/FilterComp.java @@ -1,10 +1,10 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppActionLinkDetector; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; +import io.xpipe.app.core.AppActionLinkDetector; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.util.PlatformThread; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/comp/base/ListSelectorComp.java b/app/src/main/java/io/xpipe/app/comp/base/ListSelectorComp.java index 75a6254cf..81a297460 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ListSelectorComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ListSelectorComp.java @@ -1,7 +1,7 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.core.AppI18n; import javafx.beans.property.ListProperty; import javafx.geometry.Orientation; 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 19f941dbc..af5cfa27d 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 @@ -3,8 +3,8 @@ package io.xpipe.app.comp.base; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.prefs.AppPrefs; +import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ThreadHelper; import javafx.application.Platform; diff --git a/app/src/main/java/io/xpipe/app/comp/base/MarkdownComp.java b/app/src/main/java/io/xpipe/app/comp/base/MarkdownComp.java index 833fe10d1..4388108c0 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/MarkdownComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/MarkdownComp.java @@ -1,15 +1,15 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppProperties; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; -import io.xpipe.app.util.PlatformThread; +import io.xpipe.app.core.AppProperties; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.resources.AppResources; import io.xpipe.app.util.Hyperlinks; import io.xpipe.app.util.MarkdownHelper; +import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ShellTemp; import javafx.application.Platform; diff --git a/app/src/main/java/io/xpipe/app/comp/base/ModalOverlayComp.java b/app/src/main/java/io/xpipe/app/comp/base/ModalOverlayComp.java index 96588f74c..3c3cfb1b2 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ModalOverlayComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ModalOverlayComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppFont; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.core.AppFont; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.util.PlatformThread; import javafx.application.Platform; diff --git a/app/src/main/java/io/xpipe/app/comp/base/OptionsComp.java b/app/src/main/java/io/xpipe/app/comp/base/OptionsComp.java index c46bfc402..b11b7c2d1 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/OptionsComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/OptionsComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; +import io.xpipe.app.core.AppFont; import io.xpipe.app.util.PlatformThread; import javafx.beans.Observable; diff --git a/app/src/main/java/io/xpipe/app/comp/base/PopupMenuButtonComp.java b/app/src/main/java/io/xpipe/app/comp/base/PopupMenuButtonComp.java index ec30f6695..b2639b92b 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/PopupMenuButtonComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/PopupMenuButtonComp.java @@ -1,8 +1,8 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.core.AppFont; import javafx.beans.value.ObservableValue; import javafx.scene.control.Button; diff --git a/app/src/main/java/io/xpipe/app/comp/base/PrettyImageComp.java b/app/src/main/java/io/xpipe/app/comp/base/PrettyImageComp.java index 9d52105ea..9f97cc986 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/PrettyImageComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/PrettyImageComp.java @@ -1,10 +1,10 @@ package io.xpipe.app.comp.base; import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.resources.AppImages; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.store.FileNames; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/comp/base/PrettyImageHelper.java b/app/src/main/java/io/xpipe/app/comp/base/PrettyImageHelper.java index c5a9c1ac6..9f6eb09cf 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/PrettyImageHelper.java +++ b/app/src/main/java/io/xpipe/app/comp/base/PrettyImageHelper.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.App; import io.xpipe.app.comp.Comp; -import io.xpipe.app.util.BindingsHelper; +import io.xpipe.app.core.App; import io.xpipe.app.resources.AppImages; +import io.xpipe.app.util.BindingsHelper; import io.xpipe.core.store.FileNames; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/comp/base/PrettySvgComp.java b/app/src/main/java/io/xpipe/app/comp/base/PrettySvgComp.java index 5864fcdb3..fc0b14cbe 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/PrettySvgComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/PrettySvgComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.base; import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.resources.AppImages; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.store.FileNames; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/comp/base/SecretFieldComp.java b/app/src/main/java/io/xpipe/app/comp/base/SecretFieldComp.java index 5e09f2e30..435300366 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/SecretFieldComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/SecretFieldComp.java @@ -2,8 +2,8 @@ package io.xpipe.app.comp.base; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ClipboardHelper; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.util.InPlaceSecretValue; import javafx.beans.property.Property; diff --git a/app/src/main/java/io/xpipe/app/comp/base/SideMenuBarComp.java b/app/src/main/java/io/xpipe/app/comp/base/SideMenuBarComp.java index 6b63b6743..79f958b31 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/SideMenuBarComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/SideMenuBarComp.java @@ -1,13 +1,13 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppFont; -import io.xpipe.app.core.AppLayoutModel; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; -import io.xpipe.app.util.PlatformThread; +import io.xpipe.app.core.AppFont; +import io.xpipe.app.core.AppLayoutModel; import io.xpipe.app.update.UpdateAvailableAlert; import io.xpipe.app.update.XPipeDistributionType; +import io.xpipe.app.util.PlatformThread; import javafx.application.Platform; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/comp/base/SvgView.java b/app/src/main/java/io/xpipe/app/comp/base/SvgView.java index fa649ef33..cf8abe465 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/SvgView.java +++ b/app/src/main/java/io/xpipe/app/comp/base/SvgView.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppProperties; import io.xpipe.app.comp.CompStructure; -import io.xpipe.app.util.PlatformThread; +import io.xpipe.app.core.AppProperties; import io.xpipe.app.issue.ErrorEvent; +import io.xpipe.app.util.PlatformThread; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleIntegerProperty; 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 5cda6cd0d..b97d94cd3 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 @@ -1,9 +1,9 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppFont; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; +import io.xpipe.app.core.AppFont; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.util.PlatformThread; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/comp/base/TooltipAugment.java b/app/src/main/java/io/xpipe/app/comp/base/TooltipAugment.java index 1263feed9..6fbfb53cf 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/TooltipAugment.java +++ b/app/src/main/java/io/xpipe/app/comp/base/TooltipAugment.java @@ -1,8 +1,8 @@ package io.xpipe.app.comp.base; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.augment.Augment; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.util.PlatformThread; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/comp/store/OsLogoComp.java b/app/src/main/java/io/xpipe/app/comp/store/OsLogoComp.java index 192e0c6a5..d0506bd13 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/OsLogoComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/OsLogoComp.java @@ -3,8 +3,8 @@ package io.xpipe.app.comp.store; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.PrettyImageHelper; import io.xpipe.app.comp.base.StackComp; -import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.resources.AppResources; +import io.xpipe.app.util.BindingsHelper; import io.xpipe.core.process.OsNameState; import io.xpipe.core.store.FileNames; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StandardStoreEntryComp.java b/app/src/main/java/io/xpipe/app/comp/store/StandardStoreEntryComp.java index a8b6e06ee..8f07a8a6b 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StandardStoreEntryComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StandardStoreEntryComp.java @@ -1,7 +1,7 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.Comp; +import io.xpipe.app.core.AppFont; import io.xpipe.core.process.OsType; import javafx.geometry.HPos; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryComp.java index c3009ba24..9a8faacf9 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryComp.java @@ -1,17 +1,17 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.comp.base.*; -import io.xpipe.app.core.AppFont; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.augment.ContextMenuAugment; -import io.xpipe.app.util.DerivedObservableList; -import io.xpipe.app.util.LabelGraphic; +import io.xpipe.app.comp.base.*; +import io.xpipe.app.core.AppFont; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.storage.DataColor; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreCategory; import io.xpipe.app.util.ContextMenuHelper; +import io.xpipe.app.util.DerivedObservableList; +import io.xpipe.app.util.LabelGraphic; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleBooleanProperty; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryListComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryListComp.java index 1db5c4703..aff9a338f 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryListComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCategoryListComp.java @@ -1,7 +1,7 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.comp.base.ScrollComp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.comp.base.ScrollComp; import javafx.beans.binding.Bindings; import javafx.scene.layout.Region; 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 90dd619ca..5f7cb5d1e 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 @@ -1,11 +1,11 @@ package io.xpipe.app.comp.store; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.DataColor; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreCategory; +import io.xpipe.app.util.PlatformThread; import javafx.beans.property.*; import javafx.collections.FXCollections; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreChoiceComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreChoiceComp.java index 9f93f533c..64d399c19 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreChoiceComp.java @@ -1,5 +1,7 @@ package io.xpipe.app.comp.store; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.FilterComp; import io.xpipe.app.comp.base.HorizontalComp; @@ -8,8 +10,6 @@ import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; import io.xpipe.app.ext.LocalStore; import io.xpipe.app.ext.ShellStore; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.storage.DataStoreEntryRef; 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 fb7c727f1..8cffd1956 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 @@ -1,5 +1,7 @@ package io.xpipe.app.comp.store; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.augment.GrowAugment; import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.DialogComp; import io.xpipe.app.comp.base.ErrorOverlayComp; @@ -9,9 +11,6 @@ import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.ext.DataStoreCreationCategory; import io.xpipe.app.ext.DataStoreProvider; import io.xpipe.app.ext.DataStoreProviders; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.augment.GrowAugment; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.ExceptionConverter; import io.xpipe.app.issue.TrackEvent; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationMenu.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationMenu.java index 0e508b5c2..086d3e155 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationMenu.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationMenu.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.store; +import io.xpipe.app.comp.base.PrettyImageHelper; import io.xpipe.app.core.AppI18n; import io.xpipe.app.ext.DataStoreCreationCategory; import io.xpipe.app.ext.DataStoreProviders; -import io.xpipe.app.comp.base.PrettyImageHelper; import io.xpipe.app.util.ScanAlert; import javafx.scene.control.Menu; 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 1b2f38a3e..c8db1003d 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 @@ -1,8 +1,5 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.comp.base.LoadingOverlayComp; -import io.xpipe.app.core.*; -import io.xpipe.app.ext.ActionProvider; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.SimpleCompStructure; @@ -10,10 +7,13 @@ import io.xpipe.app.comp.augment.ContextMenuAugment; import io.xpipe.app.comp.augment.GrowAugment; import io.xpipe.app.comp.base.IconButtonComp; import io.xpipe.app.comp.base.LabelComp; +import io.xpipe.app.comp.base.LoadingOverlayComp; import io.xpipe.app.comp.base.TooltipAugment; -import io.xpipe.app.util.BindingsHelper; -import io.xpipe.app.util.DerivedObservableList; -import io.xpipe.app.util.PlatformThread; +import io.xpipe.app.core.App; +import io.xpipe.app.core.AppActionLinkDetector; +import io.xpipe.app.core.AppFont; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.ext.ActionProvider; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.resources.AppResources; import io.xpipe.app.storage.DataColor; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java index 1d41f9b7e..e1c1863f8 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java @@ -1,11 +1,11 @@ package io.xpipe.app.comp.store; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.ListBoxViewComp; import io.xpipe.app.comp.base.MultiContentComp; import io.xpipe.app.core.AppCache; import io.xpipe.app.core.AppLayoutModel; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.SimpleComp; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleBooleanProperty; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListOverviewComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListOverviewComp.java index 082fcd4a8..1f1b5cb4d 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListOverviewComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListOverviewComp.java @@ -1,12 +1,12 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.comp.base.CountComp; -import io.xpipe.app.core.AppFont; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.comp.base.CountComp; import io.xpipe.app.comp.base.FilterComp; import io.xpipe.app.comp.base.IconButtonComp; +import io.xpipe.app.core.AppFont; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.LabelGraphic; import io.xpipe.app.util.ThreadHelper; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryWrapper.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryWrapper.java index 58bd31105..5e64b25a8 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryWrapper.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryWrapper.java @@ -1,13 +1,13 @@ package io.xpipe.app.comp.store; import io.xpipe.app.ext.ActionProvider; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.DataColor; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreCategory; import io.xpipe.app.storage.DataStoreEntry; +import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.store.SingletonSessionStore; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreIconChoiceDialogComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreIconChoiceDialogComp.java index bd801f8a9..26d27161a 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreIconChoiceDialogComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreIconChoiceDialogComp.java @@ -1,13 +1,13 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.comp.base.ButtonComp; -import io.xpipe.app.comp.base.DialogComp; -import io.xpipe.app.core.AppI18n; -import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.comp.base.ButtonComp; +import io.xpipe.app.comp.base.DialogComp; import io.xpipe.app.comp.base.FilterComp; import io.xpipe.app.comp.base.HorizontalComp; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.resources.SystemIcon; import io.xpipe.app.resources.SystemIcons; import io.xpipe.app.storage.DataStoreEntry; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreIntroComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreIntroComp.java index 4001dbcaf..ff3b4411b 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreIntroComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreIntroComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.core.AppFont; -import io.xpipe.app.core.AppI18n; import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.PrettySvgComp; +import io.xpipe.app.core.AppFont; +import io.xpipe.app.core.AppI18n; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.util.ScanAlert; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreLayoutComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreLayoutComp.java index 8fe8c6077..431454f34 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreLayoutComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreLayoutComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.store; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.LeftSplitPaneComp; import io.xpipe.app.core.AppActionLinkDetector; import io.xpipe.app.core.AppLayoutModel; -import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.util.InputHelper; import javafx.scene.input.KeyCode; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreListChoiceComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreListChoiceComp.java index 509b4dbff..88efa3722 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreListChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreListChoiceComp.java @@ -1,8 +1,8 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.comp.base.*; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.comp.base.*; import io.xpipe.app.storage.DataStoreEntryRef; import io.xpipe.core.store.DataStore; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreNotesComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreNotesComp.java index 927f32df3..a5af7873d 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreNotesComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreNotesComp.java @@ -1,15 +1,15 @@ package io.xpipe.app.comp.store; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.DialogComp; +import io.xpipe.app.comp.base.IconButtonComp; import io.xpipe.app.comp.base.MarkdownEditorComp; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.CompStructure; -import io.xpipe.app.comp.base.IconButtonComp; -import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.storage.DataStorage; +import io.xpipe.app.util.BindingsHelper; import javafx.application.Platform; import javafx.beans.property.Property; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreProviderChoiceComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreProviderChoiceComp.java index 25484552d..f04ab184f 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreProviderChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreProviderChoiceComp.java @@ -1,10 +1,10 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.ext.DataStoreProvider; -import io.xpipe.app.ext.DataStoreProviders; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; +import io.xpipe.app.ext.DataStoreProvider; +import io.xpipe.app.ext.DataStoreProviders; import io.xpipe.app.util.JfxHelper; import javafx.beans.property.Property; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreQuickAccessButtonComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreQuickAccessButtonComp.java index b236779b9..adae664e2 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreQuickAccessButtonComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreQuickAccessButtonComp.java @@ -4,8 +4,8 @@ import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.base.IconButtonComp; import io.xpipe.app.comp.base.PrettyImageHelper; -import io.xpipe.app.util.LabelGraphic; import io.xpipe.app.util.ContextMenuHelper; +import io.xpipe.app.util.LabelGraphic; import javafx.geometry.Side; import javafx.scene.control.Button; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreScriptsIntroComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreScriptsIntroComp.java index db1942144..885ed3119 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreScriptsIntroComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreScriptsIntroComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.comp.store; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.core.AppCache; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.SimpleComp; import io.xpipe.core.process.OsType; import javafx.beans.property.BooleanProperty; 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 21d1997c1..c2b2e9120 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 @@ -1,11 +1,11 @@ package io.xpipe.app.comp.store; import io.xpipe.app.comp.Comp; -import io.xpipe.app.util.BindingsHelper; -import io.xpipe.app.util.DerivedObservableList; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; +import io.xpipe.app.util.BindingsHelper; +import io.xpipe.app.util.DerivedObservableList; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleBooleanProperty; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java index 02ebbd1e3..3a3b22768 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java @@ -1,14 +1,14 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.comp.base.ListBoxViewComp; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.augment.GrowAugment; import io.xpipe.app.comp.base.HorizontalComp; import io.xpipe.app.comp.base.IconButtonComp; +import io.xpipe.app.comp.base.ListBoxViewComp; import io.xpipe.app.comp.base.VerticalComp; -import io.xpipe.app.util.LabelGraphic; import io.xpipe.app.storage.DataColor; +import io.xpipe.app.util.LabelGraphic; import io.xpipe.app.util.ThreadHelper; import javafx.beans.binding.Bindings; 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 9622f2a63..f838bd81c 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 @@ -1,15 +1,10 @@ package io.xpipe.app.comp.store; -import io.xpipe.app.comp.base.ButtonComp; -import io.xpipe.app.comp.base.ListBoxViewComp; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; -import io.xpipe.app.comp.base.HorizontalComp; -import io.xpipe.app.comp.base.IconButtonComp; -import io.xpipe.app.comp.base.PrettyImageHelper; -import io.xpipe.app.comp.base.VerticalComp; -import io.xpipe.app.util.LabelGraphic; +import io.xpipe.app.comp.base.*; import io.xpipe.app.storage.DataColor; +import io.xpipe.app.util.LabelGraphic; import javafx.beans.binding.Bindings; import javafx.beans.property.BooleanProperty; diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreToggleComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreToggleComp.java index 9dfa24a05..247bd9994 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreToggleComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreToggleComp.java @@ -1,10 +1,10 @@ package io.xpipe.app.comp.store; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.ToggleSwitchComp; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.util.LabelGraphic; import io.xpipe.app.storage.DataStoreEntry; +import io.xpipe.app.util.LabelGraphic; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.store.DataStore; 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 94d20fb68..cb065af61 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 @@ -1,14 +1,14 @@ package io.xpipe.app.comp.store; import io.xpipe.app.core.AppCache; -import io.xpipe.app.util.DerivedObservableList; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreCategory; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.storage.StorageListener; +import io.xpipe.app.util.DerivedObservableList; +import io.xpipe.app.util.PlatformThread; import javafx.application.Platform; import javafx.beans.property.*; diff --git a/app/src/main/java/io/xpipe/app/core/App.java b/app/src/main/java/io/xpipe/app/core/App.java index 7aa1af015..8ca22071e 100644 --- a/app/src/main/java/io/xpipe/app/core/App.java +++ b/app/src/main/java/io/xpipe/app/core/App.java @@ -2,11 +2,11 @@ package io.xpipe.app.core; import io.xpipe.app.comp.base.AppLayoutComp; import io.xpipe.app.core.window.AppMainWindow; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.update.XPipeDistributionType; import io.xpipe.app.util.LicenseProvider; +import io.xpipe.app.util.PlatformThread; import javafx.application.Application; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java b/app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java index c8d3bb593..37ce9ff5e 100644 --- a/app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java +++ b/app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java @@ -1,7 +1,7 @@ package io.xpipe.app.core; -import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.core.launcher.LauncherInput; +import io.xpipe.app.core.window.AppWindowHelper; import javafx.scene.control.Alert; import javafx.scene.input.Clipboard; diff --git a/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java b/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java index 70c9ab715..7397f3504 100644 --- a/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java +++ b/app/src/main/java/io/xpipe/app/core/AppDesktopIntegration.java @@ -1,9 +1,9 @@ package io.xpipe.app.core; import io.xpipe.app.Main; +import io.xpipe.app.core.launcher.LauncherInput; import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.issue.ErrorEvent; -import io.xpipe.app.core.launcher.LauncherInput; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.util.PlatformState; import io.xpipe.app.util.ThreadHelper; diff --git a/app/src/main/java/io/xpipe/app/core/AppGreetings.java b/app/src/main/java/io/xpipe/app/core/AppGreetings.java index 202fc42f6..08b506090 100644 --- a/app/src/main/java/io/xpipe/app/core/AppGreetings.java +++ b/app/src/main/java/io/xpipe/app/core/AppGreetings.java @@ -1,9 +1,9 @@ package io.xpipe.app.core; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.MarkdownComp; import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.core.window.AppWindowHelper; -import io.xpipe.app.comp.Comp; import io.xpipe.app.resources.AppResources; import javafx.beans.property.SimpleBooleanProperty; diff --git a/app/src/main/java/io/xpipe/app/core/AppI18n.java b/app/src/main/java/io/xpipe/app/core/AppI18n.java index d00889e97..58a7492b9 100644 --- a/app/src/main/java/io/xpipe/app/core/AppI18n.java +++ b/app/src/main/java/io/xpipe/app/core/AppI18n.java @@ -1,9 +1,9 @@ package io.xpipe.app.core; import io.xpipe.app.comp.base.ModalOverlayComp; +import io.xpipe.app.comp.base.TooltipAugment; import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.ext.PrefsChoiceValue; -import io.xpipe.app.comp.base.TooltipAugment; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; 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 798790f66..4ab41d554 100644 --- a/app/src/main/java/io/xpipe/app/core/AppLayoutModel.java +++ b/app/src/main/java/io/xpipe/app/core/AppLayoutModel.java @@ -3,14 +3,14 @@ package io.xpipe.app.core; import io.xpipe.app.beacon.AppBeaconServer; import io.xpipe.app.browser.BrowserFullSessionComp; import io.xpipe.app.browser.BrowserFullSessionModel; -import io.xpipe.app.comp.store.StoreLayoutComp; import io.xpipe.app.comp.Comp; -import io.xpipe.app.util.LabelGraphic; +import io.xpipe.app.comp.store.StoreLayoutComp; import io.xpipe.app.prefs.AppPrefsComp; +import io.xpipe.app.terminal.TerminalView; import io.xpipe.app.util.Hyperlinks; +import io.xpipe.app.util.LabelGraphic; import io.xpipe.app.util.LicenseProvider; -import io.xpipe.app.terminal.TerminalView; import javafx.beans.property.Property; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.value.ObservableValue; @@ -99,12 +99,12 @@ public class AppLayoutModel { new BrowserFullSessionComp(BrowserFullSessionModel.DEFAULT), null, new KeyCodeCombination(KeyCode.DIGIT2, KeyCombination.SHORTCUT_DOWN)), -// new Entry( -// AppI18n.observable("terminal"), -// new LabelGraphic.IconGraphic("mdi2m-monitor-screenshot"), -// new TerminalDockComp(), -// null, -// new KeyCodeCombination(KeyCode.DIGIT3, KeyCombination.SHORTCUT_DOWN)), + // new Entry( + // AppI18n.observable("terminal"), + // new LabelGraphic.IconGraphic("mdi2m-monitor-screenshot"), + // new TerminalDockComp(), + // null, + // new KeyCodeCombination(KeyCode.DIGIT3, KeyCombination.SHORTCUT_DOWN)), new Entry( AppI18n.observable("settings"), new LabelGraphic.IconGraphic("mdsmz-miscellaneous_services"), @@ -143,7 +143,7 @@ public class AppLayoutModel { // () -> Hyperlinks.open(Hyperlinks.GITHUB_WEBTOP), // null) )); - + if (!TerminalView.isSupported()) { // l.remove(2); } diff --git a/app/src/main/java/io/xpipe/app/core/AppProperties.java b/app/src/main/java/io/xpipe/app/core/AppProperties.java index 25c080655..bb1e94d17 100644 --- a/app/src/main/java/io/xpipe/app/core/AppProperties.java +++ b/app/src/main/java/io/xpipe/app/core/AppProperties.java @@ -50,6 +50,7 @@ public class AppProperties { * Unique identifier that resets on every XPipe restart. */ UUID sessionId; + boolean newBuildSession; public AppProperties() { @@ -121,15 +122,15 @@ public class AppProperties { .map(Boolean::parseBoolean) .orElse(false); AppCache.setBasePath(dataDir.resolve("cache")); - UUID id = AppCache.getNonNull("uuid", UUID.class, null); - if (id == null) { - uuid = UUID.randomUUID(); - AppCache.update("uuid", uuid); - } else { - uuid = id; - } + UUID id = AppCache.getNonNull("uuid", UUID.class, null); + if (id == null) { + uuid = UUID.randomUUID(); + AppCache.update("uuid", uuid); + } else { + uuid = id; + } initialLaunch = AppCache.getNonNull("lastBuildId", String.class, () -> null) == null; - sessionId = UUID.randomUUID(); + sessionId = UUID.randomUUID(); var cachedBuildId = AppCache.getNonNull("lastBuildId", String.class, () -> null); newBuildSession = !buildUuid.toString().equals(cachedBuildId); AppCache.update("lastBuildId", buildUuid); 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 366d74ebc..c3cdddb3f 100644 --- a/app/src/main/java/io/xpipe/app/core/AppTheme.java +++ b/app/src/main/java/io/xpipe/app/core/AppTheme.java @@ -2,11 +2,11 @@ package io.xpipe.app.core; import io.xpipe.app.core.window.AppMainWindow; import io.xpipe.app.ext.PrefsChoiceValue; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.resources.AppResources; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.process.OsType; import javafx.animation.Interpolator; @@ -214,10 +214,7 @@ public class AppTheme { AppResources.with("atlantafx.base", theme.getUserAgentStylesheet().substring(1), path -> { var baseStyleContent = Files.readString(path); builder.append("\n") - .append(baseStyleContent - .lines() - .skip(skipLines) - .collect(Collectors.joining("\n"))); + .append(baseStyleContent.lines().skip(skipLines).collect(Collectors.joining("\n"))); }); Application.setUserAgentStylesheet(Styles.toDataURI(builder.toString())); diff --git a/app/src/main/java/io/xpipe/app/core/check/AppTestCommandCheck.java b/app/src/main/java/io/xpipe/app/core/check/AppTestCommandCheck.java index 0f7950e44..485490789 100644 --- a/app/src/main/java/io/xpipe/app/core/check/AppTestCommandCheck.java +++ b/app/src/main/java/io/xpipe/app/core/check/AppTestCommandCheck.java @@ -1,16 +1,10 @@ package io.xpipe.app.core.check; -import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.util.LocalShell; import io.xpipe.core.process.OsType; import io.xpipe.core.process.ProcessOutputException; import io.xpipe.core.util.XPipeInstallation; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.InvalidPathException; -import java.nio.file.Path; - public class AppTestCommandCheck { public static void check() throws Exception { @@ -20,10 +14,16 @@ public class AppTestCommandCheck { try (var sc = LocalShell.getShell().start()) { try { - sc.getShellDialect().directoryExists(sc, XPipeInstallation.getCurrentInstallationBasePath().toString()).execute(); + sc.getShellDialect() + .directoryExists( + sc, + XPipeInstallation.getCurrentInstallationBasePath() + .toString()) + .execute(); } catch (ProcessOutputException ex) { throw ProcessOutputException.withPrefix( - "Installation self test failed. Is your \"test\" shell command working as expected and is the XPipe installation directory accessible?", ex); + "Installation self test failed. Is your \"test\" shell command working as expected and is the XPipe installation directory accessible?", + ex); } } } diff --git a/app/src/main/java/io/xpipe/app/core/mode/GuiMode.java b/app/src/main/java/io/xpipe/app/core/mode/GuiMode.java index eb32b46de..efbc4acb8 100644 --- a/app/src/main/java/io/xpipe/app/core/mode/GuiMode.java +++ b/app/src/main/java/io/xpipe/app/core/mode/GuiMode.java @@ -7,11 +7,11 @@ import io.xpipe.app.core.AppGreetings; import io.xpipe.app.core.AppLayoutModel; import io.xpipe.app.core.check.AppPtbCheck; import io.xpipe.app.core.window.AppMainWindow; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.update.UpdateChangelogAlert; import io.xpipe.app.util.NativeBridge; +import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ThreadHelper; import javafx.stage.Stage; diff --git a/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java b/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java index f27c3abb5..60743e6a4 100644 --- a/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java +++ b/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java @@ -5,9 +5,9 @@ import io.xpipe.app.core.*; import io.xpipe.app.core.check.AppDebugModeCheck; import io.xpipe.app.core.check.AppTempCheck; import io.xpipe.app.core.check.AppUserDirectoryCheck; +import io.xpipe.app.core.launcher.LauncherCommand; import io.xpipe.app.core.window.ModifiedStage; import io.xpipe.app.issue.*; -import io.xpipe.app.core.launcher.LauncherCommand; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.util.LocalShell; import io.xpipe.app.util.PlatformState; diff --git a/app/src/main/java/io/xpipe/app/core/mode/PlatformMode.java b/app/src/main/java/io/xpipe/app/core/mode/PlatformMode.java index b3d578ae3..4fae784bb 100644 --- a/app/src/main/java/io/xpipe/app/core/mode/PlatformMode.java +++ b/app/src/main/java/io/xpipe/app/core/mode/PlatformMode.java @@ -56,7 +56,8 @@ public abstract class PlatformMode extends OperationMode { // If we downloaded an update, and decided to no longer automatically update, don't remind us! // You can still update manually in the about tab - if (AppPrefs.get().automaticallyUpdate().get() || AppPrefs.get().checkForSecurityUpdates().get()) { + if (AppPrefs.get().automaticallyUpdate().get() + || AppPrefs.get().checkForSecurityUpdates().get()) { UpdateAvailableAlert.showIfNeeded(); } diff --git a/app/src/main/java/io/xpipe/app/core/mode/TrayMode.java b/app/src/main/java/io/xpipe/app/core/mode/TrayMode.java index 0d356b416..731270906 100644 --- a/app/src/main/java/io/xpipe/app/core/mode/TrayMode.java +++ b/app/src/main/java/io/xpipe/app/core/mode/TrayMode.java @@ -1,8 +1,8 @@ package io.xpipe.app.core.mode; import io.xpipe.app.core.AppTray; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.*; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.process.OsType; import java.awt.*; diff --git a/app/src/main/java/io/xpipe/app/core/window/AppMainWindow.java b/app/src/main/java/io/xpipe/app/core/window/AppMainWindow.java index bef7bee0b..84dd19b03 100644 --- a/app/src/main/java/io/xpipe/app/core/window/AppMainWindow.java +++ b/app/src/main/java/io/xpipe/app/core/window/AppMainWindow.java @@ -1,10 +1,10 @@ package io.xpipe.app.core.window; +import io.xpipe.app.comp.Comp; import io.xpipe.app.core.AppCache; import io.xpipe.app.core.AppProperties; import io.xpipe.app.core.AppTheme; import io.xpipe.app.core.mode.OperationMode; -import io.xpipe.app.comp.Comp; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; diff --git a/app/src/main/java/io/xpipe/app/core/window/AppWindowHelper.java b/app/src/main/java/io/xpipe/app/core/window/AppWindowHelper.java index f28fadc7a..c036fd187 100644 --- a/app/src/main/java/io/xpipe/app/core/window/AppWindowHelper.java +++ b/app/src/main/java/io/xpipe/app/core/window/AppWindowHelper.java @@ -1,8 +1,8 @@ package io.xpipe.app.core.window; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.LoadingOverlayComp; import io.xpipe.app.core.*; -import io.xpipe.app.comp.Comp; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.resources.AppImages; diff --git a/app/src/main/java/io/xpipe/app/core/window/ModifiedStage.java b/app/src/main/java/io/xpipe/app/core/window/ModifiedStage.java index 2546fa9dd..0224b1641 100644 --- a/app/src/main/java/io/xpipe/app/core/window/ModifiedStage.java +++ b/app/src/main/java/io/xpipe/app/core/window/ModifiedStage.java @@ -1,7 +1,7 @@ package io.xpipe.app.core.window; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.prefs.AppPrefs; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.process.OsType; import javafx.animation.PauseTransition; diff --git a/app/src/main/java/io/xpipe/app/core/window/NativeWinWindowControl.java b/app/src/main/java/io/xpipe/app/core/window/NativeWinWindowControl.java index 44257c460..b9ae106bb 100644 --- a/app/src/main/java/io/xpipe/app/core/window/NativeWinWindowControl.java +++ b/app/src/main/java/io/xpipe/app/core/window/NativeWinWindowControl.java @@ -1,8 +1,7 @@ package io.xpipe.app.core.window; -import com.sun.jna.ptr.IntByReference; -import io.sentry.protocol.User; import io.xpipe.app.util.Rect; + import javafx.stage.Window; import com.sun.jna.Library; @@ -12,6 +11,7 @@ import com.sun.jna.PointerType; import com.sun.jna.platform.win32.User32; import com.sun.jna.platform.win32.WinDef; import com.sun.jna.platform.win32.WinNT; +import com.sun.jna.ptr.IntByReference; import lombok.Getter; import lombok.SneakyThrows; @@ -24,21 +24,23 @@ public class NativeWinWindowControl { public static Optional byPid(long pid) { var ref = new AtomicReference(); - User32.INSTANCE.EnumWindows((hWnd, data) -> { - var visible = User32.INSTANCE.IsWindowVisible(hWnd); - if (!visible) { - return true; - } + User32.INSTANCE.EnumWindows( + (hWnd, data) -> { + var visible = User32.INSTANCE.IsWindowVisible(hWnd); + if (!visible) { + return true; + } - var wpid = new IntByReference(); - User32.INSTANCE.GetWindowThreadProcessId(hWnd, wpid); - if (wpid.getValue() == pid) { - ref.set(new NativeWinWindowControl(hWnd)); - return false; - } else { - return true; - } - }, null); + var wpid = new IntByReference(); + User32.INSTANCE.GetWindowThreadProcessId(hWnd, wpid); + if (wpid.getValue() == pid) { + ref.set(new NativeWinWindowControl(hWnd)); + return false; + } else { + return true; + } + }, + null); return Optional.ofNullable(ref.get()); } @@ -68,23 +70,24 @@ public class NativeWinWindowControl { public void removeBorders() { var style = User32.INSTANCE.GetWindowLong(windowHandle, User32.GWL_STYLE); var mod = style & ~(User32.WS_CAPTION | User32.WS_THICKFRAME | User32.WS_MAXIMIZEBOX); - User32.INSTANCE.SetWindowLong(windowHandle,User32.GWL_STYLE,mod); + User32.INSTANCE.SetWindowLong(windowHandle, User32.GWL_STYLE, mod); } public boolean isIconified() { - return (User32.INSTANCE.GetWindowLong(windowHandle,User32.GWL_STYLE) & User32.WS_MINIMIZE) != 0; + return (User32.INSTANCE.GetWindowLong(windowHandle, User32.GWL_STYLE) & User32.WS_MINIMIZE) != 0; } public void alwaysInFront() { - orderRelative(new WinDef.HWND(new Pointer( 0xFFFFFFFFFFFFFFFFL))); + orderRelative(new WinDef.HWND(new Pointer(0xFFFFFFFFFFFFFFFFL))); } public void defaultOrder() { - orderRelative(new WinDef.HWND(new Pointer( -2))); + orderRelative(new WinDef.HWND(new Pointer(-2))); } public void orderRelative(WinDef.HWND predecessor) { - User32.INSTANCE.SetWindowPos(windowHandle, predecessor, 0, 0, 0, 0, User32.SWP_NOACTIVATE | User32.SWP_NOMOVE | User32.SWP_NOSIZE); + User32.INSTANCE.SetWindowPos( + windowHandle, predecessor, 0, 0, 0, 0, User32.SWP_NOACTIVATE | User32.SWP_NOMOVE | User32.SWP_NOSIZE); } public void show() { @@ -96,11 +99,12 @@ public class NativeWinWindowControl { } public void minimize() { - User32.INSTANCE.ShowWindow(windowHandle,User32.SW_MINIMIZE); + User32.INSTANCE.ShowWindow(windowHandle, User32.SW_MINIMIZE); } public void move(Rect bounds) { - User32.INSTANCE.SetWindowPos(windowHandle, null, bounds.getX(), bounds.getY(), bounds.getW(), bounds.getH(), User32.SWP_NOACTIVATE); + User32.INSTANCE.SetWindowPos( + windowHandle, null, bounds.getX(), bounds.getY(), bounds.getW(), bounds.getH(), User32.SWP_NOACTIVATE); } public Rect getBounds() { diff --git a/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java b/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java index e1feb5490..73b2f2044 100644 --- a/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java +++ b/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java @@ -1,13 +1,13 @@ package io.xpipe.app.ext; import io.xpipe.app.browser.BrowserFullSessionModel; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.MarkdownComp; import io.xpipe.app.comp.store.StoreEntryComp; import io.xpipe.app.comp.store.StoreEntryWrapper; import io.xpipe.app.comp.store.StoreSection; import io.xpipe.app.comp.store.StoreSectionComp; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.Comp; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.resources.AppImages; import io.xpipe.app.storage.DataStoreEntry; diff --git a/app/src/main/java/io/xpipe/app/ext/EnabledParentStoreProvider.java b/app/src/main/java/io/xpipe/app/ext/EnabledParentStoreProvider.java index 27a00e64d..55048ac9e 100644 --- a/app/src/main/java/io/xpipe/app/ext/EnabledParentStoreProvider.java +++ b/app/src/main/java/io/xpipe/app/ext/EnabledParentStoreProvider.java @@ -1,12 +1,12 @@ package io.xpipe.app.ext; -import io.xpipe.app.comp.store.StoreToggleComp; import io.xpipe.app.comp.store.StoreEntryComp; import io.xpipe.app.comp.store.StoreSection; +import io.xpipe.app.comp.store.StoreToggleComp; import io.xpipe.app.comp.store.StoreViewState; -import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; +import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.store.EnabledStoreState; import io.xpipe.core.store.StatefulDataStore; diff --git a/app/src/main/java/io/xpipe/app/ext/SingletonSessionStoreProvider.java b/app/src/main/java/io/xpipe/app/ext/SingletonSessionStoreProvider.java index 945b21394..d7478f4e1 100644 --- a/app/src/main/java/io/xpipe/app/ext/SingletonSessionStoreProvider.java +++ b/app/src/main/java/io/xpipe/app/ext/SingletonSessionStoreProvider.java @@ -1,11 +1,7 @@ package io.xpipe.app.ext; -import io.xpipe.app.comp.store.StoreToggleComp; -import io.xpipe.app.comp.store.SystemStateComp; -import io.xpipe.app.comp.store.StoreEntryComp; -import io.xpipe.app.comp.store.StoreEntryWrapper; -import io.xpipe.app.comp.store.StoreSection; import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.store.*; import io.xpipe.app.util.LabelGraphic; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.store.SingletonSessionStore; diff --git a/app/src/main/java/io/xpipe/app/issue/ErrorDetailsComp.java b/app/src/main/java/io/xpipe/app/issue/ErrorDetailsComp.java index a04ba2703..e4794f2a3 100644 --- a/app/src/main/java/io/xpipe/app/issue/ErrorDetailsComp.java +++ b/app/src/main/java/io/xpipe/app/issue/ErrorDetailsComp.java @@ -1,8 +1,8 @@ package io.xpipe.app.issue; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.core.AppFont; import io.xpipe.core.util.Deobfuscator; import javafx.geometry.Insets; diff --git a/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java b/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java index 607fbf0a2..98a590078 100644 --- a/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java +++ b/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java @@ -1,14 +1,14 @@ package io.xpipe.app.issue; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.comp.augment.GrowAugment; import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.TitledPaneComp; import io.xpipe.app.core.AppFont; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.AppLayoutModel; import io.xpipe.app.core.window.AppWindowHelper; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.comp.augment.GrowAugment; import io.xpipe.app.util.LicenseRequiredException; import io.xpipe.app.util.PlatformState; diff --git a/app/src/main/java/io/xpipe/app/issue/TerminalErrorHandler.java b/app/src/main/java/io/xpipe/app/issue/TerminalErrorHandler.java index a71888492..7fb882e31 100644 --- a/app/src/main/java/io/xpipe/app/issue/TerminalErrorHandler.java +++ b/app/src/main/java/io/xpipe/app/issue/TerminalErrorHandler.java @@ -74,7 +74,10 @@ public class TerminalErrorHandler extends GuiErrorHandlerBase implements ErrorHa } try { - var rel = XPipeDistributionType.get().getUpdateHandler().refreshUpdateCheck(false, !AppPrefs.get().automaticallyUpdate().get()); + var rel = XPipeDistributionType.get() + .getUpdateHandler() + .refreshUpdateCheck( + false, !AppPrefs.get().automaticallyUpdate().get()); if (rel != null && rel.isUpdate()) { var update = AppWindowHelper.showBlockingAlert(alert -> { alert.setAlertType(Alert.AlertType.INFORMATION); diff --git a/app/src/main/java/io/xpipe/app/issue/UserReportComp.java b/app/src/main/java/io/xpipe/app/issue/UserReportComp.java index 197c1aeca..82184581d 100644 --- a/app/src/main/java/io/xpipe/app/issue/UserReportComp.java +++ b/app/src/main/java/io/xpipe/app/issue/UserReportComp.java @@ -1,13 +1,13 @@ package io.xpipe.app.issue; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.ListSelectorComp; import io.xpipe.app.comp.base.MarkdownComp; import io.xpipe.app.comp.base.TitledPaneComp; import io.xpipe.app.core.*; import io.xpipe.app.core.window.AppWindowHelper; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.resources.AppResources; import javafx.beans.property.ListProperty; diff --git a/app/src/main/java/io/xpipe/app/prefs/AboutCategory.java b/app/src/main/java/io/xpipe/app/prefs/AboutCategory.java index 70f63befc..5f0c0119d 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AboutCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/AboutCategory.java @@ -1,12 +1,12 @@ package io.xpipe.app.prefs; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.base.LabelComp; import io.xpipe.app.comp.base.TileButtonComp; +import io.xpipe.app.comp.base.VerticalComp; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.AppProperties; import io.xpipe.app.core.window.AppWindowHelper; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.base.LabelComp; -import io.xpipe.app.comp.base.VerticalComp; import io.xpipe.app.util.Hyperlinks; import io.xpipe.app.util.JfxHelper; import io.xpipe.app.util.OptionsBuilder; 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 1648d12bf..3cd40ea8a 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -1,17 +1,17 @@ package io.xpipe.app.prefs; +import io.xpipe.app.comp.Comp; import io.xpipe.app.core.*; import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.ext.PrefsHandler; import io.xpipe.app.ext.PrefsProvider; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.terminal.ExternalTerminalType; import io.xpipe.app.terminal.TerminalView; import io.xpipe.app.update.XPipeDistributionType; import io.xpipe.app.util.PasswordLockSecretValue; +import io.xpipe.app.util.PlatformThread; import io.xpipe.core.process.OsType; import io.xpipe.core.util.InPlaceSecretValue; import io.xpipe.core.util.ModuleHelper; @@ -52,12 +52,14 @@ public class AppPrefs { mapVaultShared(new SimpleBooleanProperty(false), "dontAutomaticallyStartVmSshServer", Boolean.class, false); final BooleanProperty dontAcceptNewHostKeys = mapVaultShared(new SimpleBooleanProperty(false), "dontAcceptNewHostKeys", Boolean.class, false); - public final BooleanProperty performanceMode = mapLocal(new SimpleBooleanProperty(), "performanceMode", Boolean.class, false); + public final BooleanProperty performanceMode = + mapLocal(new SimpleBooleanProperty(), "performanceMode", Boolean.class, false); public final BooleanProperty useBundledTools = mapLocal(new SimpleBooleanProperty(false), "useBundledTools", Boolean.class, true); public final ObjectProperty theme = mapLocal(new SimpleObjectProperty<>(), "theme", AppTheme.Theme.class, false); - final BooleanProperty useSystemFont = mapLocal(new SimpleBooleanProperty(true), "useSystemFont", Boolean.class, false); + final BooleanProperty useSystemFont = + mapLocal(new SimpleBooleanProperty(true), "useSystemFont", Boolean.class, false); final Property uiScale = mapLocal(new SimpleObjectProperty<>(null), "uiScale", Integer.class, true); final BooleanProperty saveWindowLocation = mapLocal(new SimpleBooleanProperty(true), "saveWindowLocation", Boolean.class, false); @@ -88,22 +90,28 @@ public class AppPrefs { mapVaultShared(new SimpleObjectProperty<>(), "passwordManager", ExternalPasswordManager.class, false); final StringProperty passwordManagerCommand = mapLocal(new SimpleStringProperty(""), "passwordManagerCommand", String.class, false); - final ObjectProperty startupBehaviour = - mapLocal(new SimpleObjectProperty<>(StartupBehaviour.GUI), "startupBehaviour", StartupBehaviour.class, true); + final ObjectProperty startupBehaviour = mapLocal( + new SimpleObjectProperty<>(StartupBehaviour.GUI), "startupBehaviour", StartupBehaviour.class, true); public final BooleanProperty enableGitStorage = mapLocal(new SimpleBooleanProperty(false), "enableGitStorage", Boolean.class, true); - final StringProperty storageGitRemote = mapLocal(new SimpleStringProperty(""), "storageGitRemote", String.class, true); + final StringProperty storageGitRemote = + mapLocal(new SimpleStringProperty(""), "storageGitRemote", String.class, true); final ObjectProperty closeBehaviour = mapLocal(new SimpleObjectProperty<>(CloseBehaviour.QUIT), "closeBehaviour", CloseBehaviour.class, false); final ObjectProperty externalEditor = mapLocal(new SimpleObjectProperty<>(), "externalEditor", ExternalEditorType.class, false); - final StringProperty customEditorCommand = mapLocal(new SimpleStringProperty(""), "customEditorCommand", String.class, false); + final StringProperty customEditorCommand = + mapLocal(new SimpleStringProperty(""), "customEditorCommand", String.class, false); final BooleanProperty automaticallyCheckForUpdates = mapLocal(new SimpleBooleanProperty(true), "automaticallyCheckForUpdates", Boolean.class, false); final BooleanProperty encryptAllVaultData = mapVaultShared(new SimpleBooleanProperty(false), "encryptAllVaultData", Boolean.class, true); final BooleanProperty enableTerminalLogging = map(Mapping.builder() - .property(new SimpleBooleanProperty(false)).key("enableTerminalLogging").valueClass(Boolean.class).licenseFeatureId("logging").build()); + .property(new SimpleBooleanProperty(false)) + .key("enableTerminalLogging") + .valueClass(Boolean.class) + .licenseFeatureId("logging") + .build()); final BooleanProperty enforceWindowModality = mapLocal(new SimpleBooleanProperty(false), "enforceWindowModality", Boolean.class, false); final BooleanProperty checkForSecurityUpdates = @@ -114,13 +122,14 @@ public class AppPrefs { mapLocal(new SimpleBooleanProperty(true), "showChildrenConnectionsInParentCategory", Boolean.class, false); final BooleanProperty lockVaultOnHibernation = mapLocal(new SimpleBooleanProperty(false), "lockVaultOnHibernation", Boolean.class, false); - final BooleanProperty openConnectionSearchWindowOnConnectionCreation = - mapLocal(new SimpleBooleanProperty(true), "openConnectionSearchWindowOnConnectionCreation", Boolean.class, false); + final BooleanProperty openConnectionSearchWindowOnConnectionCreation = mapLocal( + new SimpleBooleanProperty(true), "openConnectionSearchWindowOnConnectionCreation", Boolean.class, false); final ObjectProperty storageDirectory = mapLocal(new SimpleObjectProperty<>(DEFAULT_STORAGE_DIR), "storageDirectory", Path.class, true); final BooleanProperty confirmAllDeletions = mapLocal(new SimpleBooleanProperty(false), "confirmAllDeletions", Boolean.class, false); - final BooleanProperty developerMode = mapLocal(new SimpleBooleanProperty(false), "developerMode", Boolean.class, true); + final BooleanProperty developerMode = + mapLocal(new SimpleBooleanProperty(false), "developerMode", Boolean.class, true); final BooleanProperty developerDisableUpdateVersionCheck = mapLocal(new SimpleBooleanProperty(false), "developerDisableUpdateVersionCheck", Boolean.class, false); private final ObservableBooleanValue developerDisableUpdateVersionCheckEffective = @@ -132,8 +141,8 @@ public class AppPrefs { final BooleanProperty developerForceSshTty = mapLocal(new SimpleBooleanProperty(false), "developerForceSshTty", Boolean.class, false); - final ObjectProperty language = - mapLocal(new SimpleObjectProperty<>(SupportedLocale.getEnglish()), "language", SupportedLocale.class, false); + final ObjectProperty language = mapLocal( + new SimpleObjectProperty<>(SupportedLocale.getEnglish()), "language", SupportedLocale.class, false); final BooleanProperty requireDoubleClickForConnections = mapLocal(new SimpleBooleanProperty(false), "requireDoubleClickForConnections", Boolean.class, false); @@ -157,7 +166,7 @@ public class AppPrefs { mapVaultShared(new SimpleStringProperty(), "workspaceLock", String.class, true); final StringProperty apiKey = - mapVaultShared(new SimpleStringProperty(UUID.randomUUID().toString()), "apiKey", String.class ,true); + mapVaultShared(new SimpleStringProperty(UUID.randomUUID().toString()), "apiKey", String.class, true); final BooleanProperty disableApiAuthentication = mapLocal(new SimpleBooleanProperty(false), "disableApiAuthentication", Boolean.class, false); @@ -595,8 +604,7 @@ public class AppPrefs { T def = (T) value.getProperty().getValue(); Property property = (Property) value.getProperty(); Class clazz = (Class) value.getValueClass(); - var val = handler.loadObject( - value.getKey(), clazz, def); + var val = handler.loadObject(value.getKey(), clazz, def); property.setValue(val); return val; } @@ -656,7 +664,8 @@ public class AppPrefs { boolean requiresRestart; String licenseFeatureId; - public Mapping(String key, Property property, Class valueClass, boolean vaultSpecific, boolean requiresRestart) { + public Mapping( + String key, Property property, Class valueClass, boolean vaultSpecific, boolean requiresRestart) { this.key = key; this.property = property; this.valueClass = valueClass; diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefsComp.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefsComp.java index 5f030ed55..30dc81643 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefsComp.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefsComp.java @@ -1,7 +1,7 @@ package io.xpipe.app.prefs; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.core.AppFont; import io.xpipe.app.util.PlatformThread; import javafx.geometry.Insets; diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefsSidebarComp.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefsSidebarComp.java index 4cff69c23..34b75c828 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefsSidebarComp.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefsSidebarComp.java @@ -1,11 +1,11 @@ package io.xpipe.app.prefs; -import io.xpipe.app.comp.base.ButtonComp; -import io.xpipe.app.core.AppI18n; -import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.SimpleComp; +import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.VerticalComp; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.util.PlatformThread; import javafx.css.PseudoClass; @@ -14,6 +14,7 @@ import javafx.geometry.Pos; import javafx.scene.control.Button; import javafx.scene.layout.Region; import javafx.scene.text.TextAlignment; + import org.kordamp.ikonli.javafx.FontIcon; import java.util.ArrayList; 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 fc2dc39bc..c3ff85475 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppearanceCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppearanceCategory.java @@ -1,12 +1,12 @@ package io.xpipe.app.prefs; -import io.xpipe.app.comp.base.ButtonComp; -import io.xpipe.app.core.AppI18n; -import io.xpipe.app.core.AppTheme; import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.ChoiceComp; import io.xpipe.app.comp.base.HorizontalComp; import io.xpipe.app.comp.base.IntFieldComp; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.core.AppTheme; import io.xpipe.app.util.Hyperlinks; import io.xpipe.app.util.OptionsBuilder; diff --git a/app/src/main/java/io/xpipe/app/prefs/DeveloperCategory.java b/app/src/main/java/io/xpipe/app/prefs/DeveloperCategory.java index 4ac612857..9f77812a2 100644 --- a/app/src/main/java/io/xpipe/app/prefs/DeveloperCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/DeveloperCategory.java @@ -1,7 +1,7 @@ package io.xpipe.app.prefs; -import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.HorizontalComp; import io.xpipe.app.comp.base.TextFieldComp; import io.xpipe.app.issue.TrackEvent; diff --git a/app/src/main/java/io/xpipe/app/prefs/EditorCategory.java b/app/src/main/java/io/xpipe/app/prefs/EditorCategory.java index 4a5bb7e92..0fd9c7075 100644 --- a/app/src/main/java/io/xpipe/app/prefs/EditorCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/EditorCategory.java @@ -1,12 +1,12 @@ package io.xpipe.app.prefs; -import io.xpipe.app.comp.base.ButtonComp; -import io.xpipe.app.core.AppI18n; -import io.xpipe.app.ext.PrefsChoiceValue; import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.ChoiceComp; import io.xpipe.app.comp.base.StackComp; import io.xpipe.app.comp.base.TextFieldComp; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.ext.PrefsChoiceValue; import io.xpipe.app.util.FileOpener; import io.xpipe.app.util.OptionsBuilder; import io.xpipe.app.util.ThreadHelper; diff --git a/app/src/main/java/io/xpipe/app/prefs/LocalShellCategory.java b/app/src/main/java/io/xpipe/app/prefs/LocalShellCategory.java index 6948e65c1..6ea2776b4 100644 --- a/app/src/main/java/io/xpipe/app/prefs/LocalShellCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/LocalShellCategory.java @@ -15,9 +15,7 @@ public class LocalShellCategory extends AppPrefsCategory { var prefs = AppPrefs.get(); return new OptionsBuilder() .addTitle("localShell") - .sub(new OptionsBuilder() - .pref(prefs.useLocalFallbackShell) - .addToggle(prefs.useLocalFallbackShell)) + .sub(new OptionsBuilder().pref(prefs.useLocalFallbackShell).addToggle(prefs.useLocalFallbackShell)) .buildComp(); } } diff --git a/app/src/main/java/io/xpipe/app/prefs/LockChangeAlert.java b/app/src/main/java/io/xpipe/app/prefs/LockChangeAlert.java index 4d32ba4bd..4ba3418fb 100644 --- a/app/src/main/java/io/xpipe/app/prefs/LockChangeAlert.java +++ b/app/src/main/java/io/xpipe/app/prefs/LockChangeAlert.java @@ -1,9 +1,9 @@ package io.xpipe.app.prefs; -import io.xpipe.app.core.AppI18n; -import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.app.comp.base.LabelComp; import io.xpipe.app.comp.base.SecretFieldComp; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.core.window.AppWindowHelper; import io.xpipe.core.util.InPlaceSecretValue; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/prefs/LoggingCategory.java b/app/src/main/java/io/xpipe/app/prefs/LoggingCategory.java index 7f1a00cd8..5960ca19b 100644 --- a/app/src/main/java/io/xpipe/app/prefs/LoggingCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/LoggingCategory.java @@ -1,9 +1,9 @@ package io.xpipe.app.prefs; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.AppProperties; -import io.xpipe.app.comp.Comp; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.util.DesktopHelper; import io.xpipe.app.util.OptionsBuilder; diff --git a/app/src/main/java/io/xpipe/app/prefs/PasswordManagerCategory.java b/app/src/main/java/io/xpipe/app/prefs/PasswordManagerCategory.java index adce1131b..01153c4a1 100644 --- a/app/src/main/java/io/xpipe/app/prefs/PasswordManagerCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/PasswordManagerCategory.java @@ -1,14 +1,14 @@ package io.xpipe.app.prefs; -import io.xpipe.app.comp.base.ButtonComp; -import io.xpipe.app.comp.base.IntegratedTextAreaComp; -import io.xpipe.app.core.AppI18n; -import io.xpipe.app.ext.ProcessControlProvider; import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.HorizontalComp; +import io.xpipe.app.comp.base.IntegratedTextAreaComp; import io.xpipe.app.comp.base.LabelComp; import io.xpipe.app.comp.base.TextFieldComp; import io.xpipe.app.comp.base.VerticalComp; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.ext.ProcessControlProvider; import io.xpipe.app.util.BindingsHelper; import io.xpipe.app.util.OptionsBuilder; import io.xpipe.app.util.ThreadHelper; diff --git a/app/src/main/java/io/xpipe/app/prefs/RdpCategory.java b/app/src/main/java/io/xpipe/app/prefs/RdpCategory.java index 048806d1a..061fb2bac 100644 --- a/app/src/main/java/io/xpipe/app/prefs/RdpCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/RdpCategory.java @@ -1,9 +1,9 @@ package io.xpipe.app.prefs; -import io.xpipe.app.ext.PrefsChoiceValue; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.ChoiceComp; import io.xpipe.app.comp.base.TextFieldComp; +import io.xpipe.app.ext.PrefsChoiceValue; import io.xpipe.app.util.OptionsBuilder; public class RdpCategory extends AppPrefsCategory { diff --git a/app/src/main/java/io/xpipe/app/prefs/SyncCategory.java b/app/src/main/java/io/xpipe/app/prefs/SyncCategory.java index 9cd232d63..35d521721 100644 --- a/app/src/main/java/io/xpipe/app/prefs/SyncCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/SyncCategory.java @@ -1,12 +1,12 @@ package io.xpipe.app.prefs; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.ButtonComp; +import io.xpipe.app.comp.base.HorizontalComp; import io.xpipe.app.comp.base.MarkdownComp; +import io.xpipe.app.comp.base.TextFieldComp; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.window.AppWindowHelper; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.base.HorizontalComp; -import io.xpipe.app.comp.base.TextFieldComp; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStorageSyncHandler; import io.xpipe.app.util.DesktopHelper; diff --git a/app/src/main/java/io/xpipe/app/prefs/SystemCategory.java b/app/src/main/java/io/xpipe/app/prefs/SystemCategory.java index 25eb29d99..f7fd3e8dd 100644 --- a/app/src/main/java/io/xpipe/app/prefs/SystemCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/SystemCategory.java @@ -1,8 +1,8 @@ package io.xpipe.app.prefs; -import io.xpipe.app.ext.PrefsChoiceValue; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.ChoiceComp; +import io.xpipe.app.ext.PrefsChoiceValue; import io.xpipe.app.util.OptionsBuilder; public class SystemCategory extends AppPrefsCategory { diff --git a/app/src/main/java/io/xpipe/app/prefs/TerminalCategory.java b/app/src/main/java/io/xpipe/app/prefs/TerminalCategory.java index a8c1aed3f..516b54352 100644 --- a/app/src/main/java/io/xpipe/app/prefs/TerminalCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/TerminalCategory.java @@ -1,14 +1,14 @@ package io.xpipe.app.prefs; -import io.xpipe.app.comp.base.ButtonComp; -import io.xpipe.app.core.AppI18n; -import io.xpipe.app.ext.PrefsChoiceValue; -import io.xpipe.app.ext.ProcessControlProvider; import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.comp.base.ChoiceComp; import io.xpipe.app.comp.base.HorizontalComp; import io.xpipe.app.comp.base.StackComp; import io.xpipe.app.comp.base.TextFieldComp; +import io.xpipe.app.core.AppI18n; +import io.xpipe.app.ext.PrefsChoiceValue; +import io.xpipe.app.ext.ProcessControlProvider; import io.xpipe.app.terminal.ExternalTerminalType; import io.xpipe.app.terminal.TerminalLauncher; import io.xpipe.app.terminal.TerminalView; @@ -45,7 +45,8 @@ public class TerminalCategory extends AppPrefsCategory { "Test", ProcessControlProvider.get() .createLocalProcessControl(true) - .command("echo Test"), UUID.randomUUID()); + .command("echo Test"), + UUID.randomUUID()); } }); }))) @@ -65,8 +66,7 @@ public class TerminalCategory extends AppPrefsCategory { .addToggle(prefs.enableTerminalDocking) .hide(new SimpleBooleanProperty(!TerminalView.isSupported())) .pref(prefs.clearTerminalOnInit) - .addToggle(prefs.clearTerminalOnInit) - ) + .addToggle(prefs.clearTerminalOnInit)) .buildComp(); } diff --git a/app/src/main/java/io/xpipe/app/prefs/ThirdPartyDependencyListComp.java b/app/src/main/java/io/xpipe/app/prefs/ThirdPartyDependencyListComp.java index 4f86a4c72..dde62f53a 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ThirdPartyDependencyListComp.java +++ b/app/src/main/java/io/xpipe/app/prefs/ThirdPartyDependencyListComp.java @@ -1,9 +1,9 @@ package io.xpipe.app.prefs; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; +import io.xpipe.app.core.AppFont; import io.xpipe.app.util.Hyperlinks; import javafx.geometry.Insets; 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 28a0c98a7..0507c70b3 100644 --- a/app/src/main/java/io/xpipe/app/prefs/TroubleshootCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/TroubleshootCategory.java @@ -1,16 +1,16 @@ package io.xpipe.app.prefs; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.TileButtonComp; import io.xpipe.app.core.AppLogs; import io.xpipe.app.core.mode.OperationMode; -import io.xpipe.app.comp.Comp; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.UserReportComp; import io.xpipe.app.terminal.ExternalTerminalType; +import io.xpipe.app.terminal.TerminalLauncher; import io.xpipe.app.util.DesktopHelper; import io.xpipe.app.util.FileOpener; import io.xpipe.app.util.OptionsBuilder; -import io.xpipe.app.terminal.TerminalLauncher; import io.xpipe.core.process.OsType; import io.xpipe.core.store.FileNames; import io.xpipe.core.util.XPipeInstallation; diff --git a/app/src/main/java/io/xpipe/app/prefs/UpdateCheckComp.java b/app/src/main/java/io/xpipe/app/prefs/UpdateCheckComp.java index c23b901ac..6b689debb 100644 --- a/app/src/main/java/io/xpipe/app/prefs/UpdateCheckComp.java +++ b/app/src/main/java/io/xpipe/app/prefs/UpdateCheckComp.java @@ -1,11 +1,11 @@ package io.xpipe.app.prefs; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.base.TileButtonComp; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.SimpleComp; -import io.xpipe.app.util.PlatformThread; import io.xpipe.app.update.UpdateAvailableAlert; import io.xpipe.app.update.XPipeDistributionType; +import io.xpipe.app.util.PlatformThread; import io.xpipe.app.util.ThreadHelper; import javafx.beans.binding.Bindings; diff --git a/app/src/main/java/io/xpipe/app/prefs/VaultCategory.java b/app/src/main/java/io/xpipe/app/prefs/VaultCategory.java index df5b77d89..32981071c 100644 --- a/app/src/main/java/io/xpipe/app/prefs/VaultCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/VaultCategory.java @@ -1,9 +1,9 @@ package io.xpipe.app.prefs; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.window.AppWindowHelper; -import io.xpipe.app.comp.Comp; import io.xpipe.app.util.OptionsBuilder; import io.xpipe.core.util.XPipeInstallation; diff --git a/app/src/main/java/io/xpipe/app/prefs/WorkflowCategory.java b/app/src/main/java/io/xpipe/app/prefs/WorkflowCategory.java index aeccd5b09..693410ec5 100644 --- a/app/src/main/java/io/xpipe/app/prefs/WorkflowCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/WorkflowCategory.java @@ -25,9 +25,7 @@ public class WorkflowCategory extends AppPrefsCategory { .pref(prefs.requireDoubleClickForConnections) .addToggle(prefs.requireDoubleClickForConnections)) .addTitle("fileBrowser") - .sub(new OptionsBuilder() - .pref(prefs.confirmAllDeletions) - .addToggle(prefs.confirmAllDeletions)) + .sub(new OptionsBuilder().pref(prefs.confirmAllDeletions).addToggle(prefs.confirmAllDeletions)) .buildComp(); } } diff --git a/app/src/main/java/io/xpipe/app/prefs/WorkspacesCategory.java b/app/src/main/java/io/xpipe/app/prefs/WorkspacesCategory.java index c54d0c9ef..c064ba3b6 100644 --- a/app/src/main/java/io/xpipe/app/prefs/WorkspacesCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/WorkspacesCategory.java @@ -1,8 +1,8 @@ package io.xpipe.app.prefs; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.ButtonComp; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.Comp; import io.xpipe.app.util.LicenseProvider; import io.xpipe.app.util.OptionsBuilder; diff --git a/app/src/main/java/io/xpipe/app/terminal/CmdTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/CmdTerminalType.java index 6a60cd421..e2a385bc0 100644 --- a/app/src/main/java/io/xpipe/app/terminal/CmdTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/CmdTerminalType.java @@ -5,7 +5,9 @@ import io.xpipe.core.process.ShellDialects; public class CmdTerminalType extends ExternalTerminalType.SimplePathType implements DockableTerminalType { - public CmdTerminalType() {super("app.cmd", "cmd.exe", true);} + public CmdTerminalType() { + super("app.cmd", "cmd.exe", true); + } @Override public int getProcessHierarchyOffset() { diff --git a/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java index bb1392885..5b354774a 100644 --- a/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java @@ -1116,5 +1116,4 @@ public interface ExternalTerminalType extends PrefsChoiceValue { protected abstract CommandBuilder toCommand(LaunchConfiguration configuration) throws Exception; } - } diff --git a/app/src/main/java/io/xpipe/app/terminal/PowerShellTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/PowerShellTerminalType.java index 6ab21dc76..449a2c49c 100644 --- a/app/src/main/java/io/xpipe/app/terminal/PowerShellTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/PowerShellTerminalType.java @@ -8,7 +8,9 @@ import java.util.Base64; public class PowerShellTerminalType extends ExternalTerminalType.SimplePathType implements DockableTerminalType { - public PowerShellTerminalType() {super("app.powershell", "powershell", true);} + public PowerShellTerminalType() { + super("app.powershell", "powershell", true); + } @Override public boolean supportsTabs() { @@ -28,13 +30,22 @@ public class PowerShellTerminalType extends ExternalTerminalType.SimplePathType @Override protected CommandBuilder toCommand(LaunchConfiguration configuration) { if (configuration.getScriptDialect().equals(ShellDialects.POWERSHELL)) { - return CommandBuilder.of().add("-ExecutionPolicy", "Bypass").add("-File").addFile(configuration.getScriptFile()); + return CommandBuilder.of() + .add("-ExecutionPolicy", "Bypass") + .add("-File") + .addFile(configuration.getScriptFile()); } - return CommandBuilder.of().add("-ExecutionPolicy", "Bypass").add("-EncodedCommand").add(sc -> { - var base64 = Base64.getEncoder().encodeToString( - configuration.getDialectLaunchCommand().buildBase(sc).getBytes(StandardCharsets.UTF_16LE)); - return "\"" + base64 + "\""; - }); + return CommandBuilder.of() + .add("-ExecutionPolicy", "Bypass") + .add("-EncodedCommand") + .add(sc -> { + var base64 = Base64.getEncoder() + .encodeToString(configuration + .getDialectLaunchCommand() + .buildBase(sc) + .getBytes(StandardCharsets.UTF_16LE)); + return "\"" + base64 + "\""; + }); } } diff --git a/app/src/main/java/io/xpipe/app/terminal/PwshTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/PwshTerminalType.java index a5e1c36ef..d06f48df8 100644 --- a/app/src/main/java/io/xpipe/app/terminal/PwshTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/PwshTerminalType.java @@ -7,7 +7,9 @@ import java.util.Base64; public class PwshTerminalType extends ExternalTerminalType.SimplePathType implements DockableTerminalType { - public PwshTerminalType() {super("app.pwsh", "pwsh", true);} + public PwshTerminalType() { + super("app.pwsh", "pwsh", true); + } @Override public String getWebsite() { @@ -31,11 +33,15 @@ public class PwshTerminalType extends ExternalTerminalType.SimplePathType implem @Override protected CommandBuilder toCommand(LaunchConfiguration configuration) { - return CommandBuilder.of().add("-ExecutionPolicy", "Bypass").add("-EncodedCommand").add(sc -> { - // Fix for https://github.com/PowerShell/PowerShell/issues/18530#issuecomment-1325691850 - var c = "$env:PSModulePath=\"\";" + configuration.getDialectLaunchCommand().buildBase(sc); - var base64 = Base64.getEncoder().encodeToString(c.getBytes(StandardCharsets.UTF_16LE)); - return "\"" + base64 + "\""; - }); + return CommandBuilder.of() + .add("-ExecutionPolicy", "Bypass") + .add("-EncodedCommand") + .add(sc -> { + // Fix for https://github.com/PowerShell/PowerShell/issues/18530#issuecomment-1325691850 + var c = "$env:PSModulePath=\"\";" + + configuration.getDialectLaunchCommand().buildBase(sc); + var base64 = Base64.getEncoder().encodeToString(c.getBytes(StandardCharsets.UTF_16LE)); + return "\"" + base64 + "\""; + }); } } diff --git a/app/src/main/java/io/xpipe/app/terminal/TerminalDockComp.java b/app/src/main/java/io/xpipe/app/terminal/TerminalDockComp.java index 94d55c238..d6c647a48 100644 --- a/app/src/main/java/io/xpipe/app/terminal/TerminalDockComp.java +++ b/app/src/main/java/io/xpipe/app/terminal/TerminalDockComp.java @@ -1,8 +1,9 @@ package io.xpipe.app.terminal; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.window.AppMainWindow; -import io.xpipe.app.comp.SimpleComp; + import javafx.geometry.Pos; import javafx.scene.Cursor; import javafx.scene.control.Label; @@ -11,10 +12,12 @@ import javafx.scene.layout.StackPane; import javafx.stage.WindowEvent; public class TerminalDockComp extends SimpleComp { - + private final TerminalDockModel model; - public TerminalDockComp(TerminalDockModel model) {this.model = model;} + public TerminalDockComp(TerminalDockModel model) { + this.model = model; + } @Override protected Region createSimple() { @@ -53,10 +56,10 @@ public class TerminalDockComp extends SimpleComp { model.onFocusLost(); } }); - s.addEventFilter(WindowEvent.WINDOW_SHOWN,event -> { + s.addEventFilter(WindowEvent.WINDOW_SHOWN, event -> { update(stack); }); - s.addEventFilter(WindowEvent.WINDOW_HIDING,event -> { + s.addEventFilter(WindowEvent.WINDOW_HIDING, event -> { model.onClose(); }); s.focusedProperty().addListener((observable, oldValue, newValue) -> { @@ -83,7 +86,8 @@ public class TerminalDockComp extends SimpleComp { var p = region.getPadding(); var sx = region.getScene().getWindow().getOutputScaleX(); var sy = region.getScene().getWindow().getOutputScaleY(); - model.resizeView((int) Math.ceil(bounds.getMinX() * sx + p.getLeft()), + model.resizeView( + (int) Math.ceil(bounds.getMinX() * sx + p.getLeft()), (int) Math.ceil(bounds.getMinY() * sy + p.getTop()), (int) Math.floor(bounds.getWidth() * sx - p.getRight() - p.getLeft()), (int) Math.floor(bounds.getHeight() * sy - p.getBottom() - p.getTop())); diff --git a/app/src/main/java/io/xpipe/app/terminal/TerminalDockModel.java b/app/src/main/java/io/xpipe/app/terminal/TerminalDockModel.java index 2ad278af2..d141e1e80 100644 --- a/app/src/main/java/io/xpipe/app/terminal/TerminalDockModel.java +++ b/app/src/main/java/io/xpipe/app/terminal/TerminalDockModel.java @@ -4,11 +4,10 @@ import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.util.Rect; import io.xpipe.core.process.OsType; + import lombok.Getter; -import java.util.ArrayList; import java.util.HashSet; -import java.util.List; import java.util.Set; public class TerminalDockModel { @@ -19,6 +18,7 @@ public class TerminalDockModel { private Rect viewBounds; private boolean viewActive; + @Getter private final Set terminalInstances = new HashSet<>(); @@ -48,9 +48,7 @@ public class TerminalDockModel { } public synchronized void toggleView(boolean active) { - TrackEvent.withTrace("Terminal view toggled") - .tag("active", active) - .handle(); + TrackEvent.withTrace("Terminal view toggled").tag("active", active).handle(); if (viewActive == active) { return; } @@ -69,8 +67,7 @@ public class TerminalDockModel { return; } - TrackEvent.withTrace("Terminal view focus gained") - .handle(); + TrackEvent.withTrace("Terminal view focus gained").handle(); terminalInstances.forEach(terminalInstance -> { if (!terminalInstance.isActive()) { return; @@ -91,8 +88,7 @@ public class TerminalDockModel { return; } - TrackEvent.withTrace("Terminal view focus lost") - .handle(); + TrackEvent.withTrace("Terminal view focus lost").handle(); terminalInstances.forEach(terminalInstance -> { if (!terminalInstance.isActive()) { return; @@ -108,8 +104,7 @@ public class TerminalDockModel { } public synchronized void onWindowActivate() { - TrackEvent.withTrace("Terminal view focus gained") - .handle(); + TrackEvent.withTrace("Terminal view focus gained").handle(); terminalInstances.forEach(terminalInstance -> { terminalInstance.updateBoundsState(); if (terminalInstance.isCustomBounds()) { @@ -126,8 +121,7 @@ public class TerminalDockModel { } public synchronized void onWindowMinimize() { - TrackEvent.withTrace("Terminal view minimized") - .handle(); + TrackEvent.withTrace("Terminal view minimized").handle(); terminalInstances.forEach(terminalInstance -> { terminalInstance.updateBoundsState(); @@ -140,8 +134,7 @@ public class TerminalDockModel { } public synchronized void onClose() { - TrackEvent.withTrace("Terminal view closed") - .handle(); + TrackEvent.withTrace("Terminal view closed").handle(); terminalInstances.forEach(terminalInstance -> { terminalInstance.updateBoundsState(); @@ -174,16 +167,13 @@ public class TerminalDockModel { return; } - this.viewBounds = new Rect(x,y,w,h); - TrackEvent.withTrace("Terminal view resized") - .tag("rect", viewBounds) - .handle(); + this.viewBounds = new Rect(x, y, w, h); + TrackEvent.withTrace("Terminal view resized").tag("rect", viewBounds).handle(); updatePositions(); } public void clickView() { - TrackEvent.withTrace("Terminal view clicked") - .handle(); + TrackEvent.withTrace("Terminal view clicked").handle(); terminalInstances.forEach(terminalInstance -> { terminalInstance.show(); diff --git a/app/src/main/java/io/xpipe/app/terminal/TerminalLauncher.java b/app/src/main/java/io/xpipe/app/terminal/TerminalLauncher.java index 3e40e5c0f..d43a618d1 100644 --- a/app/src/main/java/io/xpipe/app/terminal/TerminalLauncher.java +++ b/app/src/main/java/io/xpipe/app/terminal/TerminalLauncher.java @@ -58,7 +58,8 @@ public class TerminalLauncher { open(entry, title, directory, cc, UUID.randomUUID()); } - public static void open(DataStoreEntry entry, String title, String directory, ProcessControl cc, UUID request) throws Exception { + public static void open(DataStoreEntry entry, String title, String directory, ProcessControl cc, UUID request) + throws Exception { var type = AppPrefs.get().terminalType().getValue(); if (type == null) { throw ErrorEvent.expected(new IllegalStateException(AppI18n.get("noTerminalSet"))); diff --git a/app/src/main/java/io/xpipe/app/terminal/TerminalView.java b/app/src/main/java/io/xpipe/app/terminal/TerminalView.java index 23315de08..7e39dad8c 100644 --- a/app/src/main/java/io/xpipe/app/terminal/TerminalView.java +++ b/app/src/main/java/io/xpipe/app/terminal/TerminalView.java @@ -1,13 +1,11 @@ package io.xpipe.app.terminal; -import io.xpipe.app.core.AppLayoutModel; import io.xpipe.app.core.window.NativeWinWindowControl; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; -import io.xpipe.app.util.Rect; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.process.OsType; -import javafx.application.Platform; + import lombok.Value; import java.util.ArrayList; @@ -72,7 +70,9 @@ public class TerminalView { } var session = new Session(request, shell.get(), terminal.get()); - var instance = terminalInstances.stream().filter(i -> i.getTerminalProcess().equals(terminal.get())).findFirst(); + var instance = terminalInstances.stream() + .filter(i -> i.getTerminalProcess().equals(terminal.get())) + .findFirst(); if (instance.isEmpty()) { var control = NativeWinWindowControl.byPid(terminal.get().pid()); if (control.isEmpty()) { @@ -116,7 +116,9 @@ public class TerminalView { var alive = terminalInstance.getTerminalProcess().isAlive(); if (!alive) { terminalInstances.remove(terminalInstance); - TrackEvent.withTrace("Terminal session is dead").tag("pid", terminalInstance.getTerminalProcess().pid()).handle(); + TrackEvent.withTrace("Terminal session is dead") + .tag("pid", terminalInstance.getTerminalProcess().pid()) + .handle(); listeners.forEach(listener -> listener.onTerminalClosed(terminalInstance)); } } @@ -127,11 +129,12 @@ public class TerminalView { public static void init() { var instance = new TerminalView(); ThreadHelper.createPlatformThread("terminal-view", true, () -> { - while (true) { - instance.tick(); - ThreadHelper.sleep(500); - } - }).start(); + while (true) { + instance.tick(); + ThreadHelper.sleep(500); + } + }) + .start(); INSTANCE = instance; } diff --git a/app/src/main/java/io/xpipe/app/terminal/TerminalViewInstance.java b/app/src/main/java/io/xpipe/app/terminal/TerminalViewInstance.java index f1b193f7c..1d3c0e288 100644 --- a/app/src/main/java/io/xpipe/app/terminal/TerminalViewInstance.java +++ b/app/src/main/java/io/xpipe/app/terminal/TerminalViewInstance.java @@ -1,6 +1,7 @@ package io.xpipe.app.terminal; import io.xpipe.app.util.Rect; + import lombok.Getter; @Getter @@ -11,7 +12,9 @@ public abstract class TerminalViewInstance { protected Rect lastBounds; protected boolean customBounds; - protected TerminalViewInstance(ProcessHandle terminalProcess) {this.terminalProcess = terminalProcess;} + protected TerminalViewInstance(ProcessHandle terminalProcess) { + this.terminalProcess = terminalProcess; + } public abstract void show(); diff --git a/app/src/main/java/io/xpipe/app/terminal/WindowsTerminalViewInstance.java b/app/src/main/java/io/xpipe/app/terminal/WindowsTerminalViewInstance.java index 6f6da612d..c53cd17de 100644 --- a/app/src/main/java/io/xpipe/app/terminal/WindowsTerminalViewInstance.java +++ b/app/src/main/java/io/xpipe/app/terminal/WindowsTerminalViewInstance.java @@ -2,12 +2,11 @@ package io.xpipe.app.terminal; import io.xpipe.app.core.window.NativeWinWindowControl; import io.xpipe.app.util.Rect; + import lombok.AccessLevel; import lombok.experimental.FieldDefaults; -@FieldDefaults( - makeFinal = true, - level = AccessLevel.PRIVATE) +@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE) public final class WindowsTerminalViewInstance extends TerminalViewInstance { NativeWinWindowControl control; diff --git a/app/src/main/java/io/xpipe/app/update/AppDownloads.java b/app/src/main/java/io/xpipe/app/update/AppDownloads.java index 368ad3608..4f36f3bd5 100644 --- a/app/src/main/java/io/xpipe/app/update/AppDownloads.java +++ b/app/src/main/java/io/xpipe/app/update/AppDownloads.java @@ -1,6 +1,5 @@ package io.xpipe.app.update; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; import io.xpipe.app.core.AppProperties; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.TrackEvent; @@ -8,6 +7,7 @@ import io.xpipe.app.util.HttpHelper; import io.xpipe.core.process.OsType; import io.xpipe.core.util.JacksonMapper; +import com.fasterxml.jackson.databind.node.JsonNodeFactory; import org.apache.commons.io.FileUtils; import org.kohsuke.github.GHRelease; import org.kohsuke.github.GHRepository; 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 c72cc952e..fc7aa9c9b 100644 --- a/app/src/main/java/io/xpipe/app/update/AppInstaller.java +++ b/app/src/main/java/io/xpipe/app/update/AppInstaller.java @@ -5,9 +5,9 @@ import io.xpipe.app.core.AppProperties; import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.terminal.ExternalTerminalType; +import io.xpipe.app.terminal.TerminalLauncher; import io.xpipe.app.util.LocalShell; import io.xpipe.app.util.ScriptHelper; -import io.xpipe.app.terminal.TerminalLauncher; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.process.OsType; import io.xpipe.core.process.ShellDialects; diff --git a/app/src/main/java/io/xpipe/app/update/UpdateHandler.java b/app/src/main/java/io/xpipe/app/update/UpdateHandler.java index 62d3bcc2c..e079bfee0 100644 --- a/app/src/main/java/io/xpipe/app/update/UpdateHandler.java +++ b/app/src/main/java/io/xpipe/app/update/UpdateHandler.java @@ -99,13 +99,16 @@ public abstract class UpdateHandler { private void startBackgroundUpdater() { ThreadHelper.createPlatformThread("updater", true, () -> { - var checked = false; + var checked = false; ThreadHelper.sleep(Duration.ofMinutes(5).toMillis()); event("Starting background updater thread"); while (true) { - if (AppPrefs.get().automaticallyUpdate().get() || AppPrefs.get().checkForSecurityUpdates().get()) { + if (AppPrefs.get().automaticallyUpdate().get() + || AppPrefs.get().checkForSecurityUpdates().get()) { event("Performing background update"); - refreshUpdateCheckSilent(!checked, !AppPrefs.get().automaticallyUpdate().get()); + refreshUpdateCheckSilent( + !checked, + !AppPrefs.get().automaticallyUpdate().get()); checked = true; prepareUpdate(); } @@ -208,7 +211,10 @@ public abstract class UpdateHandler { // Check if prepared update is still the latest. // We only do that here to minimize the sent requests by only executing when it's really necessary - var available = XPipeDistributionType.get().getUpdateHandler().refreshUpdateCheckSilent(false, !AppPrefs.get().automaticallyUpdate().get()); + var available = XPipeDistributionType.get() + .getUpdateHandler() + .refreshUpdateCheckSilent( + false, !AppPrefs.get().automaticallyUpdate().get()); if (preparedUpdate.getValue() == null) { return; } diff --git a/app/src/main/java/io/xpipe/app/util/AskpassAlert.java b/app/src/main/java/io/xpipe/app/util/AskpassAlert.java index b42081a52..99b5117cb 100644 --- a/app/src/main/java/io/xpipe/app/util/AskpassAlert.java +++ b/app/src/main/java/io/xpipe/app/util/AskpassAlert.java @@ -1,10 +1,10 @@ package io.xpipe.app.util; +import io.xpipe.app.comp.base.SecretFieldComp; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.AppStyle; import io.xpipe.app.core.AppTheme; import io.xpipe.app.core.window.AppWindowHelper; -import io.xpipe.app.comp.base.SecretFieldComp; import io.xpipe.core.util.InPlaceSecretValue; import javafx.animation.AnimationTimer; diff --git a/app/src/main/java/io/xpipe/app/util/AsktextAlert.java b/app/src/main/java/io/xpipe/app/util/AsktextAlert.java index 23ec94a03..be91cd6de 100644 --- a/app/src/main/java/io/xpipe/app/util/AsktextAlert.java +++ b/app/src/main/java/io/xpipe/app/util/AsktextAlert.java @@ -1,10 +1,10 @@ package io.xpipe.app.util; +import io.xpipe.app.comp.base.TextFieldComp; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.AppStyle; import io.xpipe.app.core.AppTheme; import io.xpipe.app.core.window.AppWindowHelper; -import io.xpipe.app.comp.base.TextFieldComp; import javafx.animation.AnimationTimer; import javafx.application.Platform; diff --git a/app/src/main/java/io/xpipe/app/util/DataStoreCategoryChoiceComp.java b/app/src/main/java/io/xpipe/app/util/DataStoreCategoryChoiceComp.java index 352f6ee99..e4ad8fdb4 100644 --- a/app/src/main/java/io/xpipe/app/util/DataStoreCategoryChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/util/DataStoreCategoryChoiceComp.java @@ -1,8 +1,8 @@ package io.xpipe.app.util; +import io.xpipe.app.comp.SimpleComp; import io.xpipe.app.comp.store.StoreCategoryWrapper; import io.xpipe.app.comp.store.StoreViewState; -import io.xpipe.app.comp.SimpleComp; import javafx.beans.property.Property; import javafx.geometry.Insets; diff --git a/app/src/main/java/io/xpipe/app/util/JfxHelper.java b/app/src/main/java/io/xpipe/app/util/JfxHelper.java index a6ce98ff6..fd98cb016 100644 --- a/app/src/main/java/io/xpipe/app/util/JfxHelper.java +++ b/app/src/main/java/io/xpipe/app/util/JfxHelper.java @@ -1,7 +1,7 @@ package io.xpipe.app.util; -import io.xpipe.app.core.AppFont; import io.xpipe.app.comp.base.PrettyImageHelper; +import io.xpipe.app.core.AppFont; import javafx.beans.value.ObservableValue; import javafx.geometry.Pos; diff --git a/app/src/main/java/io/xpipe/app/util/LicenseProvider.java b/app/src/main/java/io/xpipe/app/util/LicenseProvider.java index 9bb9633f6..416c15902 100644 --- a/app/src/main/java/io/xpipe/app/util/LicenseProvider.java +++ b/app/src/main/java/io/xpipe/app/util/LicenseProvider.java @@ -1,7 +1,7 @@ package io.xpipe.app.util; -import io.xpipe.app.ext.ExtensionException; import io.xpipe.app.comp.Comp; +import io.xpipe.app.ext.ExtensionException; import io.xpipe.core.util.ModuleLayerLoader; import javafx.beans.value.ObservableValue; diff --git a/app/src/main/java/io/xpipe/app/util/OptionsBuilder.java b/app/src/main/java/io/xpipe/app/util/OptionsBuilder.java index 1b4939437..59d6974a6 100644 --- a/app/src/main/java/io/xpipe/app/util/OptionsBuilder.java +++ b/app/src/main/java/io/xpipe/app/util/OptionsBuilder.java @@ -1,9 +1,9 @@ package io.xpipe.app.util; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.*; import io.xpipe.app.core.AppI18n; import io.xpipe.app.ext.GuiDialog; -import io.xpipe.app.comp.Comp; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.core.util.InPlaceSecretValue; diff --git a/app/src/main/java/io/xpipe/app/util/ScanDialog.java b/app/src/main/java/io/xpipe/app/util/ScanDialog.java index 18607aa8c..9c0649527 100644 --- a/app/src/main/java/io/xpipe/app/util/ScanDialog.java +++ b/app/src/main/java/io/xpipe/app/util/ScanDialog.java @@ -1,13 +1,13 @@ package io.xpipe.app.util; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.DialogComp; import io.xpipe.app.comp.base.ListSelectorComp; +import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.core.AppI18n; import io.xpipe.app.ext.ScanProvider; import io.xpipe.app.ext.ShellStore; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; diff --git a/app/src/main/java/io/xpipe/app/util/SecretRetrievalStrategyHelper.java b/app/src/main/java/io/xpipe/app/util/SecretRetrievalStrategyHelper.java index dcac7c8d2..082ccc649 100644 --- a/app/src/main/java/io/xpipe/app/util/SecretRetrievalStrategyHelper.java +++ b/app/src/main/java/io/xpipe/app/util/SecretRetrievalStrategyHelper.java @@ -1,10 +1,10 @@ package io.xpipe.app.util; import io.xpipe.app.comp.base.ButtonComp; -import io.xpipe.app.core.App; import io.xpipe.app.comp.base.HorizontalComp; import io.xpipe.app.comp.base.SecretFieldComp; import io.xpipe.app.comp.base.TextFieldComp; +import io.xpipe.app.core.App; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.DataStoreSecret; diff --git a/app/src/main/java/module-info.java b/app/src/main/java/module-info.java index 6ee04cc44..026d71c57 100644 --- a/app/src/main/java/module-info.java +++ b/app/src/main/java/module-info.java @@ -5,9 +5,9 @@ import io.xpipe.app.ext.*; import io.xpipe.app.issue.EventHandler; import io.xpipe.app.issue.EventHandlerImpl; import io.xpipe.app.storage.DataStateProviderImpl; +import io.xpipe.app.terminal.TerminalLauncher; import io.xpipe.app.util.AppJacksonModule; import io.xpipe.app.util.LicenseProvider; -import io.xpipe.app.terminal.TerminalLauncher; import io.xpipe.beacon.BeaconInterface; import io.xpipe.core.util.DataStateProvider; import io.xpipe.core.util.ModuleLayerLoader; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/action/RunScriptActionMenu.java b/ext/base/src/main/java/io/xpipe/ext/base/action/RunScriptActionMenu.java index 63d045e52..6fdc8fb2c 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/action/RunScriptActionMenu.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/action/RunScriptActionMenu.java @@ -18,7 +18,6 @@ import javafx.beans.value.ObservableValue; import lombok.Value; import java.util.List; -import java.util.UUID; public class RunScriptActionMenu implements ActionProvider { diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/CopyAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/CopyAction.java index 302471839..7c714bd89 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/CopyAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/CopyAction.java @@ -1,7 +1,7 @@ package io.xpipe.ext.base.browser; -import io.xpipe.app.browser.file.BrowserClipboard; import io.xpipe.app.browser.action.BrowserLeafAction; +import io.xpipe.app.browser.file.BrowserClipboard; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; import io.xpipe.app.core.AppI18n; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/CopyPathAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/CopyPathAction.java index 7eb47d139..14e39bba7 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/CopyPathAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/CopyPathAction.java @@ -1,8 +1,8 @@ package io.xpipe.ext.base.browser; -import io.xpipe.app.browser.action.BrowserBranchAction; import io.xpipe.app.browser.action.BrowserAction; import io.xpipe.app.browser.action.BrowserActionFormatter; +import io.xpipe.app.browser.action.BrowserBranchAction; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; @@ -47,7 +47,8 @@ public class CopyPathAction implements BrowserAction, BrowserBranchAction { } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { if (entries.size() == 1) { return new SimpleObjectProperty<>(BrowserActionFormatter.centerEllipsis( entries.getFirst().getRawFileEntry().getPath(), 50)); @@ -66,7 +67,8 @@ public class CopyPathAction implements BrowserAction, BrowserBranchAction { }, new BrowserLeafAction() { @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { if (entries.size() == 1) { return new SimpleObjectProperty<>(BrowserActionFormatter.centerEllipsis( entries.getFirst().getRawFileEntry().getPath(), 50)); @@ -97,7 +99,8 @@ public class CopyPathAction implements BrowserAction, BrowserBranchAction { }, new BrowserLeafAction() { @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { if (entries.size() == 1) { return new SimpleObjectProperty<>("\"" + BrowserActionFormatter.centerEllipsis( @@ -131,7 +134,8 @@ public class CopyPathAction implements BrowserAction, BrowserBranchAction { } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { if (entries.size() == 1) { return new SimpleObjectProperty<>(BrowserActionFormatter.centerEllipsis( FileNames.getFileName( @@ -153,7 +157,8 @@ public class CopyPathAction implements BrowserAction, BrowserBranchAction { }, new BrowserLeafAction() { @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { if (entries.size() == 1) { return new SimpleObjectProperty<>(BrowserActionFormatter.centerEllipsis( FileNames.getFileName( @@ -193,7 +198,8 @@ public class CopyPathAction implements BrowserAction, BrowserBranchAction { }, new BrowserLeafAction() { @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { if (entries.size() == 1) { return new SimpleObjectProperty<>("\"" + BrowserActionFormatter.centerEllipsis( diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/EditFileAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/EditFileAction.java index 1cdacc880..57d31d6b9 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/EditFileAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/EditFileAction.java @@ -1,8 +1,8 @@ package io.xpipe.ext.base.browser; -import io.xpipe.app.browser.file.BrowserFileOpener; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; +import io.xpipe.app.browser.file.BrowserFileOpener; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; import io.xpipe.app.core.AppI18n; import io.xpipe.app.prefs.AppPrefs; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteAction.java index a5705d355..f4e4b6caa 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteAction.java @@ -17,7 +17,8 @@ import java.util.UUID; public abstract class MultiExecuteAction implements BrowserBranchAction { - protected abstract CommandBuilder createCommand(ShellControl sc, BrowserFileSystemTabModel model, BrowserEntry entry); + protected abstract CommandBuilder createCommand( + ShellControl sc, BrowserFileSystemTabModel model, BrowserEntry entry); @Override public List getBranchingActions(BrowserFileSystemTabModel model, List entries) { @@ -51,7 +52,8 @@ public abstract class MultiExecuteAction implements BrowserBranchAction { } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { var t = AppPrefs.get().terminalType().getValue(); return AppI18n.observable( "executeInTerminal", @@ -85,7 +87,8 @@ public abstract class MultiExecuteAction implements BrowserBranchAction { } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { return AppI18n.observable("executeInBackground"); } }); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteSelectionAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteSelectionAction.java index 24bb26ed9..2a7c1b947 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteSelectionAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteSelectionAction.java @@ -51,7 +51,8 @@ public abstract class MultiExecuteSelectionAction implements BrowserBranchAction } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { var t = AppPrefs.get().terminalType().getValue(); return AppI18n.observable( "executeInTerminal", @@ -92,7 +93,8 @@ public abstract class MultiExecuteSelectionAction implements BrowserBranchAction } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { return AppI18n.observable("executeInBackground"); } }); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/NewItemAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/NewItemAction.java index ad1fb1705..7dffeb5c0 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/NewItemAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/NewItemAction.java @@ -1,14 +1,14 @@ package io.xpipe.ext.base.browser; -import io.xpipe.app.browser.action.BrowserBranchAction; import io.xpipe.app.browser.action.BrowserAction; +import io.xpipe.app.browser.action.BrowserBranchAction; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; import io.xpipe.app.browser.icon.BrowserIcons; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.ModalOverlayComp; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.comp.Comp; import io.xpipe.app.util.OptionsBuilder; import io.xpipe.core.process.OsType; @@ -82,7 +82,8 @@ public class NewItemAction implements BrowserAction, BrowserBranchAction { } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { return AppI18n.observable("file"); } }, @@ -113,7 +114,8 @@ public class NewItemAction implements BrowserAction, BrowserBranchAction { } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { return AppI18n.observable("directory"); } }, @@ -146,7 +148,8 @@ public class NewItemAction implements BrowserAction, BrowserBranchAction { } @Override - public ObservableValue getName(BrowserFileSystemTabModel model, List entries) { + public ObservableValue getName( + BrowserFileSystemTabModel model, List entries) { return AppI18n.observable("symbolicLink"); } diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenDirectoryInNewTabAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenDirectoryInNewTabAction.java index 0bed91776..df82f08f0 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenDirectoryInNewTabAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenDirectoryInNewTabAction.java @@ -1,9 +1,9 @@ package io.xpipe.ext.base.browser; +import io.xpipe.app.browser.BrowserFullSessionModel; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; -import io.xpipe.app.browser.BrowserFullSessionModel; import io.xpipe.app.core.AppI18n; import io.xpipe.core.store.FileKind; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileDefaultAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileDefaultAction.java index 1501d29ea..66412959e 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileDefaultAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileDefaultAction.java @@ -1,8 +1,8 @@ package io.xpipe.ext.base.browser; -import io.xpipe.app.browser.file.BrowserFileOpener; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; +import io.xpipe.app.browser.file.BrowserFileOpener; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; import io.xpipe.app.core.AppI18n; import io.xpipe.core.store.FileKind; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileWithAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileWithAction.java index 7a3e71f53..d6e68d406 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileWithAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileWithAction.java @@ -1,8 +1,8 @@ package io.xpipe.ext.base.browser; -import io.xpipe.app.browser.file.BrowserFileOpener; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; +import io.xpipe.app.browser.file.BrowserFileOpener; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; import io.xpipe.app.core.AppI18n; import io.xpipe.core.process.OsType; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenTerminalAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenTerminalAction.java index 594c1bf14..9006791a2 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenTerminalAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenTerminalAction.java @@ -1,10 +1,10 @@ package io.xpipe.ext.base.browser; -import io.xpipe.app.browser.file.BrowserTerminalDockTabModel; +import io.xpipe.app.browser.BrowserFullSessionModel; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; -import io.xpipe.app.browser.BrowserFullSessionModel; +import io.xpipe.app.browser.file.BrowserTerminalDockTabModel; import io.xpipe.app.core.AppI18n; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.core.store.FileKind; @@ -34,14 +34,16 @@ public class OpenTerminalAction implements BrowserLeafAction { } } - if (AppPrefs.get().enableTerminalDocking().get() && model.getBrowserModel() instanceof BrowserFullSessionModel sessionModel) { + if (AppPrefs.get().enableTerminalDocking().get() + && model.getBrowserModel() instanceof BrowserFullSessionModel sessionModel) { // Check if the right side is already occupied var existingSplit = sessionModel.getSplits().get(model); if (existingSplit != null && !(existingSplit instanceof BrowserTerminalDockTabModel)) { return; } - sessionModel.splitTab(model, new BrowserTerminalDockTabModel(sessionModel, model, model.getTerminalRequests())); + sessionModel.splitTab( + model, new BrowserTerminalDockTabModel(sessionModel, model, model.getTerminalRequests())); } } diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/PasteAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/PasteAction.java index c98514729..1dd377a0a 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/PasteAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/PasteAction.java @@ -1,10 +1,10 @@ package io.xpipe.ext.base.browser; -import io.xpipe.app.browser.file.BrowserClipboard; import io.xpipe.app.browser.action.BrowserLeafAction; +import io.xpipe.app.browser.file.BrowserClipboard; import io.xpipe.app.browser.file.BrowserEntry; -import io.xpipe.app.browser.file.BrowserFileTransferMode; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; +import io.xpipe.app.browser.file.BrowserFileTransferMode; import io.xpipe.app.core.AppI18n; import io.xpipe.core.store.FileKind; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/compress/BaseCompressAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/compress/BaseCompressAction.java index a7dbef300..dbfa83dd8 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/compress/BaseCompressAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/compress/BaseCompressAction.java @@ -1,7 +1,7 @@ package io.xpipe.ext.base.browser.compress; -import io.xpipe.app.browser.action.BrowserBranchAction; import io.xpipe.app.browser.action.BrowserAction; +import io.xpipe.app.browser.action.BrowserBranchAction; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopApplicationStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopApplicationStoreProvider.java index 3c90b3404..d5b069db8 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopApplicationStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopApplicationStoreProvider.java @@ -1,10 +1,10 @@ package io.xpipe.ext.base.desktop; import io.xpipe.app.browser.BrowserFullSessionModel; +import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.comp.store.StoreEntryWrapper; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.ext.*; -import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.storage.ContextualFileReference; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.util.DataStoreFormatter; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopCommandStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopCommandStoreProvider.java index 876d9c92d..4248d93f3 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopCommandStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopCommandStoreProvider.java @@ -2,10 +2,10 @@ package io.xpipe.ext.base.desktop; import io.xpipe.app.browser.BrowserFullSessionModel; import io.xpipe.app.comp.base.IntegratedTextAreaComp; +import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.comp.store.StoreEntryWrapper; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.ext.*; -import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.util.DataStoreFormatter; import io.xpipe.app.util.OptionsBuilder; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopEnvironmentStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopEnvironmentStoreProvider.java index ac92c4423..a5d8faafd 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopEnvironmentStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopEnvironmentStoreProvider.java @@ -1,15 +1,15 @@ package io.xpipe.ext.base.desktop; import io.xpipe.app.browser.BrowserFullSessionModel; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.base.ChoiceComp; import io.xpipe.app.comp.base.IntegratedTextAreaComp; +import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.comp.store.StoreEntryWrapper; +import io.xpipe.app.comp.store.StoreListChoiceComp; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.core.AppExtensionManager; import io.xpipe.app.ext.*; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.base.ChoiceComp; -import io.xpipe.app.comp.store.StoreChoiceComp; -import io.xpipe.app.comp.store.StoreListChoiceComp; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.terminal.ExternalTerminalType; import io.xpipe.app.util.DataStoreFormatter; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/RunScriptAction.java b/ext/base/src/main/java/io/xpipe/ext/base/script/RunScriptAction.java index 4f24aad0b..fe8c8aa87 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/RunScriptAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/RunScriptAction.java @@ -1,11 +1,11 @@ package io.xpipe.ext.base.script; -import io.xpipe.app.browser.action.BrowserBranchAction; +import io.xpipe.app.browser.BrowserFullSessionModel; import io.xpipe.app.browser.action.BrowserAction; +import io.xpipe.app.browser.action.BrowserBranchAction; import io.xpipe.app.browser.action.BrowserLeafAction; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.file.BrowserFileSystemTabModel; -import io.xpipe.app.browser.BrowserFullSessionModel; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.core.AppI18n; import io.xpipe.app.core.AppLayoutModel; @@ -46,7 +46,8 @@ public class RunScriptAction implements BrowserAction, BrowserBranchAction { } @Override - public List getBranchingActions(BrowserFileSystemTabModel model, List entries) { + public List getBranchingActions( + BrowserFileSystemTabModel model, List entries) { var actions = createActionForScriptHierarchy(model, entries); if (actions.isEmpty()) { actions = List.of(new BrowserLeafAction() { @@ -81,7 +82,8 @@ public class RunScriptAction implements BrowserAction, BrowserBranchAction { return createActionForScriptHierarchy(model, hierarchy).getBranchingActions(model, selected); } - private BrowserBranchAction createActionForScriptHierarchy(BrowserFileSystemTabModel model, ScriptHierarchy hierarchy) { + private BrowserBranchAction createActionForScriptHierarchy( + BrowserFileSystemTabModel model, ScriptHierarchy hierarchy) { if (hierarchy.isLeaf()) { return createActionForScript(model, hierarchy.getLeafBase()); } @@ -104,7 +106,8 @@ public class RunScriptAction implements BrowserAction, BrowserBranchAction { }; } - private BrowserBranchAction createActionForScript(BrowserFileSystemTabModel model, DataStoreEntryRef ref) { + private BrowserBranchAction createActionForScript( + BrowserFileSystemTabModel model, DataStoreEntryRef ref) { return new MultiExecuteSelectionAction() { @Override diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java index a041b702e..191df0579 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java @@ -1,12 +1,8 @@ package io.xpipe.ext.base.script; -import io.xpipe.app.comp.store.SystemStateComp; -import io.xpipe.app.comp.store.StoreEntryWrapper; -import io.xpipe.app.comp.store.StoreSection; -import io.xpipe.app.comp.store.StoreViewState; -import io.xpipe.app.ext.*; import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.store.StoreChoiceComp; +import io.xpipe.app.comp.store.*; +import io.xpipe.app.ext.*; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.util.OptionsBuilder; import io.xpipe.core.store.DataStore; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStoreProvider.java index e64833e28..c4ad99e49 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStoreProvider.java @@ -1,19 +1,15 @@ package io.xpipe.ext.base.script; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.base.IntegratedTextAreaComp; import io.xpipe.app.comp.base.ListSelectorComp; -import io.xpipe.app.comp.store.SystemStateComp; -import io.xpipe.app.comp.store.StoreEntryWrapper; -import io.xpipe.app.comp.store.StoreViewState; +import io.xpipe.app.comp.store.*; import io.xpipe.app.core.AppExtensionManager; import io.xpipe.app.core.AppI18n; import io.xpipe.app.ext.DataStoreCreationCategory; import io.xpipe.app.ext.DataStoreProvider; import io.xpipe.app.ext.EnabledParentStoreProvider; import io.xpipe.app.ext.GuiDialog; -import io.xpipe.app.comp.Comp; -import io.xpipe.app.comp.store.StoreChoiceComp; -import io.xpipe.app.comp.store.StoreListChoiceComp; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.util.DataStoreFormatter; import io.xpipe.app.util.MarkdownBuilder; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceGroupStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceGroupStoreProvider.java index 4b5374c98..903adda66 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceGroupStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceGroupStoreProvider.java @@ -1,15 +1,10 @@ package io.xpipe.ext.base.service; -import io.xpipe.app.comp.store.StoreToggleComp; -import io.xpipe.app.comp.store.SystemStateComp; -import io.xpipe.app.comp.store.StoreEntryComp; -import io.xpipe.app.comp.store.StoreEntryWrapper; -import io.xpipe.app.comp.store.StoreSection; -import io.xpipe.app.comp.store.StoreViewState; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.store.*; import io.xpipe.app.core.AppI18n; import io.xpipe.app.ext.DataStoreProvider; import io.xpipe.app.ext.DataStoreUsageCategory; -import io.xpipe.app.comp.Comp; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java b/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java index 83d48a145..56f190ee8 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java @@ -4,7 +4,10 @@ import io.xpipe.app.storage.DataStoreEntryRef; import io.xpipe.app.util.HostHelper; import io.xpipe.app.util.LicenseProvider; import io.xpipe.app.util.Validators; -import io.xpipe.core.store.*; +import io.xpipe.core.store.DataStore; +import io.xpipe.core.store.NetworkTunnelSession; +import io.xpipe.core.store.NetworkTunnelStore; +import io.xpipe.core.store.SingletonSessionStore; import io.xpipe.core.util.JacksonizedValue; import lombok.Getter; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStoreProvider.java index 13a619503..322f5ec7d 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStoreProvider.java @@ -1,15 +1,11 @@ package io.xpipe.ext.base.service; -import io.xpipe.app.comp.store.SystemStateComp; -import io.xpipe.app.comp.store.DenseStoreEntryComp; -import io.xpipe.app.comp.store.StoreEntryComp; -import io.xpipe.app.comp.store.StoreEntryWrapper; -import io.xpipe.app.comp.store.StoreSection; +import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.store.*; import io.xpipe.app.ext.ActionProvider; import io.xpipe.app.ext.DataStoreProvider; import io.xpipe.app.ext.DataStoreUsageCategory; import io.xpipe.app.ext.SingletonSessionStoreProvider; -import io.xpipe.app.comp.Comp; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.util.DataStoreFormatter; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/service/CustomServiceStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/service/CustomServiceStoreProvider.java index b017e7e65..18cc84e77 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/service/CustomServiceStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/service/CustomServiceStoreProvider.java @@ -1,9 +1,9 @@ package io.xpipe.ext.base.service; +import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.ext.DataStoreCreationCategory; import io.xpipe.app.ext.GuiDialog; -import io.xpipe.app.comp.store.StoreChoiceComp; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.app.util.OptionsBuilder; import io.xpipe.core.store.DataStore; diff --git a/ext/base/src/main/java/io/xpipe/ext/base/store/ShellStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/store/ShellStoreProvider.java index 0c9c4af0f..24fc346fb 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/store/ShellStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/store/ShellStoreProvider.java @@ -1,21 +1,17 @@ package io.xpipe.ext.base.store; import io.xpipe.app.browser.BrowserFullSessionModel; +import io.xpipe.app.comp.Comp; import io.xpipe.app.comp.store.OsLogoComp; -import io.xpipe.app.comp.store.SystemStateComp; import io.xpipe.app.comp.store.StoreEntryWrapper; import io.xpipe.app.comp.store.StoreSection; -import io.xpipe.app.ext.ActionProvider; -import io.xpipe.app.ext.DataStoreProvider; -import io.xpipe.app.ext.DataStoreUsageCategory; -import io.xpipe.app.ext.ProcessControlProvider; -import io.xpipe.app.ext.ShellStore; -import io.xpipe.app.comp.Comp; +import io.xpipe.app.comp.store.SystemStateComp; +import io.xpipe.app.ext.*; import io.xpipe.app.resources.SystemIcons; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; -import io.xpipe.app.util.ShellStoreFormat; import io.xpipe.app.terminal.TerminalLauncher; +import io.xpipe.app.util.ShellStoreFormat; import io.xpipe.core.process.ShellStoreState; import io.xpipe.ext.base.script.ScriptStore;