This commit is contained in:
crschnick
2025-02-09 15:41:37 +00:00
parent d7f11c5d1a
commit d2c31cdc6f
78 changed files with 24 additions and 179 deletions

View File

@@ -11,7 +11,7 @@ import io.xpipe.beacon.api.TerminalPrepareExchange;
public class TerminalPrepareExchangeImpl extends TerminalPrepareExchange {
@Override
public Object handle(HttpExchange exchange, Request msg) throws BeaconClientException, BeaconServerException {
public Object handle(HttpExchange exchange, Request msg) throws BeaconClientException {
TerminalView.get().open(msg.getRequest(), msg.getPid());
TerminalLauncherManager.registerPid(msg.getRequest(), msg.getPid());
var term = AppPrefs.get().terminalType().getValue();

View File

@@ -1,7 +1,6 @@
package io.xpipe.app.beacon.impl;
import io.xpipe.app.terminal.TerminalLauncherManager;
import io.xpipe.app.terminal.TerminalView;
import io.xpipe.beacon.BeaconClientException;
import io.xpipe.beacon.BeaconServerException;
import io.xpipe.beacon.api.TerminalWaitExchange;

View File

@@ -11,8 +11,6 @@ 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.AppFontSizes;
import io.xpipe.app.core.AppLayoutModel;
import io.xpipe.app.ext.ShellStore;
import io.xpipe.app.storage.DataStoreEntryRef;

View File

@@ -12,7 +12,6 @@ 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.AppFontSizes;
import io.xpipe.app.core.AppLayoutModel;
import io.xpipe.app.ext.ShellStore;
import io.xpipe.app.util.BindingsHelper;

View File

@@ -2,7 +2,6 @@ package io.xpipe.app.browser;
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.prefs.AppPrefs;

View File

@@ -4,14 +4,11 @@ import io.xpipe.app.comp.SimpleComp;
import io.xpipe.app.util.PlatformThread;
import io.xpipe.core.store.FileNames;
import javafx.geometry.Insets;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonBase;
import javafx.scene.control.Label;
import javafx.scene.layout.Background;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.util.Callback;
import atlantafx.base.controls.Breadcrumbs;

View File

@@ -3,7 +3,6 @@ package io.xpipe.app.browser.file;
import io.xpipe.app.ext.ProcessControlProvider;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.util.ThreadHelper;
import io.xpipe.core.process.OsType;
import io.xpipe.core.store.FileEntry;
import io.xpipe.core.util.FailableRunnable;

View File

@@ -4,7 +4,6 @@ import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.CompStructure;
import io.xpipe.app.comp.SimpleComp;
import io.xpipe.app.comp.store.*;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.app.util.PlatformThread;

View File

@@ -1,7 +1,6 @@
package io.xpipe.app.browser.file;
import io.xpipe.app.browser.action.BrowserAction;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.util.InputHelper;

View File

@@ -2,7 +2,6 @@ package io.xpipe.app.browser.file;
import io.xpipe.app.browser.action.BrowserAction;
import io.xpipe.app.comp.SimpleComp;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.util.*;
import io.xpipe.core.process.OsType;

View File

@@ -10,7 +10,6 @@ import io.xpipe.app.ext.ProcessControlProvider;
import io.xpipe.app.ext.ShellStore;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStoreEntryRef;
import io.xpipe.app.terminal.*;
import io.xpipe.app.util.BooleanScope;
@@ -312,7 +311,7 @@ public final class BrowserFileSystemTabModel extends BrowserStoreSessionTab<File
var open = new ShellOpenFunction() {
@Override
public CommandBuilder prepareWithoutInitCommand() throws Exception {
public CommandBuilder prepareWithoutInitCommand() {
return CommandBuilder.ofString(adjustedPath);
}

View File

@@ -4,11 +4,9 @@ import io.xpipe.app.browser.BrowserFullSessionModel;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.SimpleComp;
import io.xpipe.app.comp.base.*;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.util.BindingsHelper;
import io.xpipe.app.util.DerivedObservableList;
import io.xpipe.app.util.LabelGraphic;
import io.xpipe.app.util.ThreadHelper;
@@ -16,16 +14,12 @@ import io.xpipe.app.util.ThreadHelper;
import javafx.beans.binding.Bindings;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ObservableBooleanValue;
import javafx.beans.value.ObservableValue;
import javafx.collections.ObservableList;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.layout.*;
import atlantafx.base.controls.Spacer;
import atlantafx.base.theme.Styles;
import java.util.LinkedHashMap;

View File

@@ -3,8 +3,6 @@ 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.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.util.DerivedObservableList;

View File

@@ -3,8 +3,6 @@ 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.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.util.DerivedObservableList;
import io.xpipe.app.util.ThreadHelper;

View File

@@ -3,8 +3,6 @@ package io.xpipe.app.comp.base;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.CompStructure;
import io.xpipe.app.comp.store.StoreViewState;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.core.AppLayoutModel;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.storage.DataStorage;

View File

@@ -6,9 +6,7 @@ import io.xpipe.app.comp.SimpleCompStructure;
import io.xpipe.app.util.PlatformThread;
import javafx.beans.binding.Bindings;
import javafx.beans.binding.StringBinding;
import javafx.beans.value.ObservableIntegerValue;
import javafx.collections.ObservableList;
import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.control.OverrunStyle;

View File

@@ -11,7 +11,6 @@ import javafx.beans.value.ObservableValue;
import javafx.css.Size;
import javafx.css.SizeUnits;
import javafx.scene.control.Button;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.MenuItem;
import org.kordamp.ikonli.javafx.FontIcon;

View File

@@ -7,9 +7,7 @@ import io.xpipe.app.util.DerivedObservableList;
import io.xpipe.app.util.PlatformThread;
import javafx.application.Platform;
import javafx.beans.Observable;
import javafx.beans.binding.Bindings;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.css.PseudoClass;

View File

@@ -9,7 +9,6 @@ import javafx.application.Platform;
import javafx.beans.binding.Bindings;
import javafx.collections.ObservableList;
import javafx.css.PseudoClass;
import javafx.scene.Node;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.skin.VirtualFlow;

View File

@@ -6,9 +6,9 @@ import javafx.beans.value.ObservableValue;
import lombok.Getter;
@Getter
public abstract class ModalOverlayContentComp extends SimpleComp {
@Getter
protected ModalOverlay modalOverlay;
void setModalOverlay(ModalOverlay modalOverlay) {

View File

@@ -4,7 +4,6 @@ import io.xpipe.app.comp.SimpleComp;
import io.xpipe.app.comp.base.PrettyImageHelper;
import io.xpipe.app.comp.base.StackComp;
import io.xpipe.app.resources.AppResources;
import io.xpipe.app.util.BindingsHelper;
import io.xpipe.core.process.SystemState;
import io.xpipe.core.store.FileNames;

View File

@@ -10,7 +10,6 @@ import io.xpipe.app.util.PlatformThread;
import javafx.beans.binding.Bindings;
import javafx.beans.property.*;
import javafx.beans.value.ObservableNumberValue;
import javafx.beans.value.ObservableStringValue;
import javafx.collections.FXCollections;

View File

@@ -3,7 +3,6 @@ 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.*;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.window.AppWindowHelper;
import io.xpipe.app.ext.DataStoreCreationCategory;
@@ -24,7 +23,6 @@ import javafx.beans.binding.Bindings;
import javafx.beans.property.*;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.scene.control.*;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Region;
@@ -33,7 +31,6 @@ import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import atlantafx.base.controls.Spacer;
import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;
import net.synedra.validatorfx.GraphicDecorationStackPane;

View File

@@ -16,7 +16,6 @@ import io.xpipe.app.resources.AppResources;
import io.xpipe.app.storage.DataColor;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.app.core.AppDistributionType;
import io.xpipe.app.util.*;
import io.xpipe.core.process.OsType;

View File

@@ -8,7 +8,6 @@ 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.BindingsHelper;
import io.xpipe.app.util.PlatformThread;
import io.xpipe.app.util.ThreadHelper;
import io.xpipe.core.store.DataStore;
@@ -16,7 +15,6 @@ import io.xpipe.core.store.SingletonSessionStore;
import javafx.beans.binding.Bindings;
import javafx.beans.property.*;
import javafx.beans.value.ObservableStringValue;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;

View File

@@ -1,8 +1,6 @@
package io.xpipe.app.comp.store;
import atlantafx.base.theme.Styles;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.CompStructure;
import io.xpipe.app.comp.SimpleComp;
import io.xpipe.app.comp.base.*;
import io.xpipe.app.core.AppI18n;
@@ -10,11 +8,9 @@ import io.xpipe.app.icon.SystemIcon;
import io.xpipe.app.icon.SystemIconCache;
import io.xpipe.app.icon.SystemIconManager;
import io.xpipe.app.resources.AppImages;
import io.xpipe.app.util.BooleanScope;
import io.xpipe.app.util.LabelGraphic;
import io.xpipe.app.util.ThreadHelper;
import javafx.application.Platform;
import javafx.beans.property.*;
import javafx.geometry.Pos;
import javafx.scene.control.*;
@@ -23,7 +19,6 @@ import javafx.scene.layout.Region;
import atlantafx.base.theme.Tweaks;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.TextAlignment;
import java.util.*;
@@ -108,7 +103,7 @@ public class StoreIconChoiceComp extends SimpleComp {
private void updateData(TableView<List<SystemIcon>> table, String filterString) {
var displayedIcons = filterString == null || filterString.isBlank() || filterString.length() < 2
? icons.stream().sorted(Comparator.<SystemIcon, String>comparing(systemIcon -> systemIcon.getId())).toList()
? icons.stream().sorted(Comparator.comparing(systemIcon -> systemIcon.getId())).toList()
: icons.stream()
.filter(icon -> containsString(icon.getId(), filterString))
.toList();

View File

@@ -5,7 +5,6 @@ import io.xpipe.app.icon.SystemIcon;
import io.xpipe.app.icon.SystemIconManager;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.app.util.Hyperlinks;
import javafx.application.Platform;
import javafx.beans.property.ObjectProperty;

View File

@@ -15,7 +15,6 @@ import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import lombok.Getter;
import lombok.Value;
import java.util.ArrayList;
import java.util.Comparator;

View File

@@ -4,7 +4,6 @@ import io.xpipe.app.issue.TrackEvent;
import io.xpipe.app.resources.AppResources;
import io.xpipe.core.process.OsType;
import javafx.scene.Node;
import javafx.scene.text.Font;
import org.kordamp.ikonli.javafx.FontIcon;

View File

@@ -7,28 +7,13 @@ import io.xpipe.app.prefs.SupportedLocale;
import io.xpipe.app.util.BindingsHelper;
import io.xpipe.app.util.PlatformState;
import io.xpipe.app.util.PlatformThread;
import io.xpipe.core.util.XPipeInstallation;
import javafx.beans.binding.Bindings;
import javafx.beans.binding.StringBinding;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ObservableValue;
import lombok.Value;
import org.apache.commons.io.FilenameUtils;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
public class AppI18n {

View File

@@ -4,7 +4,6 @@ import io.xpipe.app.browser.BrowserFullSessionComp;
import io.xpipe.app.browser.BrowserFullSessionModel;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.store.StoreLayoutComp;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.prefs.AppPrefsComp;
import io.xpipe.app.util.Hyperlinks;
import io.xpipe.app.util.LabelGraphic;

View File

@@ -97,8 +97,7 @@ public class AppProperties {
staging = Optional.ofNullable(System.getProperty("io.xpipe.app.staging"))
.map(Boolean::parseBoolean)
.orElse(false);
devLoginPassword = Optional.ofNullable(System.getProperty("io.xpipe.app.loginPassword"))
.orElse(null);
devLoginPassword = System.getProperty("io.xpipe.app.loginPassword");
useVirtualThreads = Optional.ofNullable(System.getProperty("io.xpipe.app.useVirtualThreads"))
.map(Boolean::parseBoolean)
.orElse(true);

View File

@@ -7,7 +7,6 @@ import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.resources.AppResources;
import javafx.application.Platform;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import java.io.IOException;

View File

@@ -45,7 +45,7 @@ public class BaseMode extends OperationMode {
}
@Override
public void onSwitchTo() throws Throwable {
public void onSwitchTo() {
if (initialized) {
return;
}

View File

@@ -3,8 +3,6 @@ package io.xpipe.app.core.window;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.base.ModalButton;
import io.xpipe.app.comp.base.ModalOverlay;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.util.PlatformInit;
import io.xpipe.app.util.PlatformThread;
@@ -12,7 +10,6 @@ import io.xpipe.app.util.ThreadHelper;
import javafx.animation.PauseTransition;
import javafx.application.Platform;
import javafx.beans.Observable;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;

View File

@@ -9,7 +9,6 @@ import io.xpipe.app.issue.TrackEvent;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.prefs.CloseBehaviourDialog;
import io.xpipe.app.resources.AppImages;
import io.xpipe.app.core.AppDistributionType;
import io.xpipe.app.util.LicenseProvider;
import io.xpipe.app.util.PlatformThread;
import io.xpipe.app.util.ThreadHelper;

View File

@@ -142,7 +142,7 @@ public interface ActionProvider {
}
static <T extends DataStore> LeafDataStoreCallSite<T> simple(boolean major, String nameKey, String icon, Class<T> applicableClass, FailableConsumer<DataStoreEntryRef<T>, Exception> action) {
return new LeafDataStoreCallSite<T>() {
return new LeafDataStoreCallSite<>() {
@Override
public boolean isMajor(DataStoreEntryRef<T> o) {
return major;

View File

@@ -6,7 +6,6 @@ import com.github.weisj.jsvg.attributes.ViewBox;
import com.github.weisj.jsvg.parser.SVGLoader;
import io.xpipe.app.core.AppProperties;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.resources.AppImages;
import lombok.Getter;
import javax.imageio.ImageIO;

View File

@@ -29,7 +29,7 @@ public interface SystemIconSource {
@Builder
@Jacksonized
@JsonTypeName("directory")
static class Directory implements SystemIconSource{
class Directory implements SystemIconSource{
Path path;
String id;
@@ -76,7 +76,7 @@ public interface SystemIconSource {
@Builder
@Jacksonized
@JsonTypeName("git")
static class GitRepository implements SystemIconSource{
class GitRepository implements SystemIconSource{
String remote;
String id;
@@ -120,7 +120,7 @@ public interface SystemIconSource {
}
@Override
public void open() throws Exception {
public void open() {
Hyperlinks.open(remote);
}
}

View File

@@ -5,11 +5,9 @@ import lombok.Value;
import org.apache.commons.io.FilenameUtils;
import java.io.IOException;
import java.nio.file.FileVisitOption;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
@@ -19,7 +17,7 @@ public class SystemIconSourceData {
Path directory;
List<SystemIconSourceFile> icons;
public static SystemIconSourceData of(SystemIconSource source) throws IOException {
public static SystemIconSourceData of(SystemIconSource source) {
var target = source.getPath();
var list = new ArrayList<SystemIconSourceFile>();
walkTree(source, target, list);

View File

@@ -3,7 +3,6 @@ package io.xpipe.app.issue;
import io.xpipe.app.core.AppLogs;
import io.xpipe.app.core.AppProperties;
import io.xpipe.app.core.mode.OperationMode;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.core.util.Deobfuscator;
import java.nio.file.Path;

View File

@@ -5,7 +5,6 @@ import io.xpipe.app.comp.base.ModalOverlay;
import io.xpipe.app.core.*;
import io.xpipe.app.core.mode.OperationMode;
import io.xpipe.app.core.window.AppDialog;
import io.xpipe.app.core.AppDistributionType;
import io.xpipe.app.util.Hyperlinks;
import io.xpipe.app.util.PlatformInit;
import io.xpipe.app.util.ThreadHelper;

View File

@@ -10,7 +10,6 @@ import io.xpipe.app.icon.SystemIconSource;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.terminal.ExternalTerminalType;
import io.xpipe.app.core.AppDistributionType;
import io.xpipe.app.util.PlatformThread;
import io.xpipe.core.util.ModuleHelper;

View File

@@ -1,8 +1,6 @@
package io.xpipe.app.prefs;
import io.xpipe.app.comp.SimpleComp;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.util.PlatformThread;
import javafx.geometry.Insets;

View File

@@ -1,8 +1,5 @@
package io.xpipe.app.prefs;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import com.fasterxml.jackson.databind.util.TokenBuffer;
import io.xpipe.app.ext.PrefsChoiceValue;
import io.xpipe.app.issue.ErrorEvent;
@@ -13,7 +10,6 @@ import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.NullNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.databind.node.TextNode;
import lombok.SneakyThrows;

View File

@@ -2,27 +2,17 @@ package io.xpipe.app.prefs;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.base.*;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.window.AppDialog;
import io.xpipe.app.ext.PrefsChoiceValue;
import io.xpipe.app.icon.SystemIcon;
import io.xpipe.app.icon.SystemIconCache;
import io.xpipe.app.icon.SystemIconManager;
import io.xpipe.app.icon.SystemIconSource;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStorageUserHandler;
import io.xpipe.app.util.*;
import javafx.beans.binding.Bindings;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.FXCollections;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.TextField;
import org.kordamp.ikonli.javafx.FontIcon;
import java.nio.file.Path;
import java.util.ArrayList;

View File

@@ -1,13 +1,11 @@
package io.xpipe.app.prefs;
import atlantafx.base.layout.ModalBox;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.base.ButtonComp;
import io.xpipe.app.comp.base.ModalButton;
import io.xpipe.app.comp.base.ModalOverlay;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.window.AppDialog;
import io.xpipe.app.core.window.AppWindowHelper;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStorageSyncHandler;
import io.xpipe.app.storage.DataStorageUserHandler;

View File

@@ -15,8 +15,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import lombok.Value;
import lombok.experimental.NonFinal;
import java.io.IOException;

View File

@@ -758,6 +758,6 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
launch(configuration.getColoredTitle(), args);
}
protected abstract CommandBuilder toCommand(TerminalLaunchConfiguration configuration) throws Exception;
protected abstract CommandBuilder toCommand(TerminalLaunchConfiguration configuration);
}
}

View File

@@ -1,9 +1,6 @@
package io.xpipe.app.terminal;
import io.xpipe.app.util.CommandSupport;
import io.xpipe.app.util.LocalShell;
import io.xpipe.core.process.CommandBuilder;
import io.xpipe.core.process.ShellControl;
public class PtyxisTerminalType extends ExternalTerminalType.SimplePathType implements TrackableTerminalType {
@@ -32,7 +29,7 @@ public class PtyxisTerminalType extends ExternalTerminalType.SimplePathType impl
}
@Override
protected CommandBuilder toCommand(TerminalLaunchConfiguration configuration) throws Exception {
protected CommandBuilder toCommand(TerminalLaunchConfiguration configuration) {
var toExecute = CommandBuilder.of()
.add(executable)
.addIf(configuration.isPreferTabs(), "--tab")

View File

@@ -148,7 +148,7 @@ public interface WindowsTerminalType extends ExternalTerminalType, TrackableTerm
}
@Override
protected CommandBuilder toCommand(TerminalLaunchConfiguration configuration) throws Exception {
protected CommandBuilder toCommand(TerminalLaunchConfiguration configuration) {
return WindowsTerminalType.toCommand(configuration);
}

View File

@@ -50,7 +50,7 @@ public abstract class TestModule<V> {
return argumentBuilder.build();
}
protected abstract void init(Map<String, FailableSupplier<V>> list) throws Exception;
protected abstract void init(Map<String, FailableSupplier<V>> list);
protected abstract Class<V> getValueClass();
}

View File

@@ -3,7 +3,6 @@ package io.xpipe.app.util;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.core.process.OsType;
import javafx.application.Platform;
import javafx.geometry.Side;
import javafx.scene.Node;

View File

@@ -1,13 +1,9 @@
package io.xpipe.app.util;
import io.xpipe.app.core.AppProperties;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.issue.TrackEvent;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Collectors;
public class LocalExec {

View File

@@ -5,7 +5,6 @@ import io.xpipe.app.prefs.ExternalApplicationType;
import io.xpipe.app.prefs.ExternalEditorType;
import io.xpipe.core.process.OsType;
import io.xpipe.core.process.ShellControl;
import io.xpipe.core.store.FilePath;
import java.nio.file.Path;
import java.util.Optional;

View File

@@ -10,6 +10,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.OptionalInt;
@Getter
public class PasswdFile {
public static PasswdFile parse(ShellControl sc) throws Exception {
@@ -18,7 +19,6 @@ public class PasswdFile {
return passwdFile;
}
@Getter
private final Map<Integer, String> users = new LinkedHashMap<>();
public OptionalInt getUidForUserIfPresent(String name) {

View File

@@ -1,6 +1,5 @@
package io.xpipe.app.util;
import io.xpipe.app.comp.base.LoadingOverlayComp;
import io.xpipe.app.comp.base.ModalButton;
import io.xpipe.app.comp.base.ModalOverlay;
import io.xpipe.app.ext.ScanProvider;

View File

@@ -15,7 +15,6 @@ import io.xpipe.app.storage.DataStoreEntryRef;
import javafx.application.Platform;
import javafx.beans.property.*;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.layout.Region;
@@ -24,7 +23,6 @@ import javafx.scene.layout.VBox;
import lombok.Getter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.function.Function;
import static javafx.scene.layout.Priority.ALWAYS;

View File

@@ -1,7 +1,5 @@
package io.xpipe.app.util;
import io.xpipe.core.util.SecretValue;
import java.util.Optional;
public interface SecretQueryFormatter {

View File

@@ -1,18 +1,12 @@
package io.xpipe.app.util;
import io.xpipe.app.prefs.ExternalApplicationType;
import io.xpipe.app.prefs.ExternalEditorType;
import io.xpipe.core.process.OsType;
import io.xpipe.core.process.ShellControl;
import io.xpipe.core.store.FilePath;
import io.xpipe.core.util.FailableSupplier;
import lombok.Getter;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
@Getter

View File

@@ -2,7 +2,6 @@ package io.xpipe.app.util;
import io.xpipe.app.comp.store.StoreSection;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.core.process.ShellDialects;
import io.xpipe.core.process.ShellEnvironmentStoreState;
import io.xpipe.core.process.ShellStoreState;

View File

@@ -66,7 +66,7 @@ public abstract class WindowsRegistry {
}
@Override
public List<String> listSubKeys(int hkey, String key) throws Exception {
public List<String> listSubKeys(int hkey, String key) {
// This can fail even with errors in case the jna native library extraction or loading fails
try {
return Arrays.asList(Advapi32Util.registryGetKeys(hkey(hkey), key));
@@ -88,7 +88,7 @@ public abstract class WindowsRegistry {
}
@Override
public OptionalInt readIntegerValueIfPresent(int hkey, String key, String valueName) throws Exception {
public OptionalInt readIntegerValueIfPresent(int hkey, String key, String valueName) {
// This can fail even with errors in case the jna native library extraction or loading fails
try {
if (!Advapi32Util.registryValueExists(hkey(hkey), key, valueName)) {

View File

@@ -1,9 +1,6 @@
package io.xpipe.core.process;
import io.xpipe.core.store.FilePath;
import io.xpipe.core.util.FailableFunction;
public interface TerminalLaunchCommandFunction {
CommandBuilder apply(ShellControl shellControl, boolean requiresExecutableFirst, boolean supportsRawArguments, String file, boolean exit) throws Exception;
CommandBuilder apply(ShellControl shellControl, boolean requiresExecutableFirst, boolean supportsRawArguments, String file, boolean exit);
}

View File

@@ -15,9 +15,9 @@ import java.util.concurrent.locks.ReentrantLock;
import java.util.function.Consumer;
import java.util.function.Function;
@Getter
public class WrapperShellControl implements ShellControl {
@Getter
protected final ShellControl parent;
public WrapperShellControl(ShellControl parent) {

View File

@@ -1,7 +1,5 @@
package io.xpipe.core.util;
import com.fasterxml.jackson.databind.*;
public interface JacksonExtension {
Class<?> getType();

View File

@@ -10,7 +10,7 @@ import java.util.UUID;
public interface SelfReferentialStore extends DataStore {
static Map<DataStore, DataStoreEntry> FALLBACK = new HashMap<>();
Map<DataStore, DataStoreEntry> FALLBACK = new HashMap<>();
default DataStoreEntry getSelfEntry() {
return DataStorage.get()

View File

@@ -18,7 +18,7 @@ import java.util.List;
public class BackAction implements BrowserLeafAction {
@Override
public void execute(BrowserFileSystemTabModel model, List<BrowserEntry> entries) throws Exception {
public void execute(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
model.backSync(1);
}

View File

@@ -18,7 +18,7 @@ import java.util.List;
public class ForwardAction implements BrowserLeafAction {
@Override
public void execute(BrowserFileSystemTabModel model, List<BrowserEntry> entries) throws Exception {
public void execute(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
model.forthSync(1);
}

View File

@@ -1,16 +1,12 @@
package io.xpipe.ext.base.browser;
import atlantafx.base.layout.ModalBox;
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.comp.Comp;
import io.xpipe.app.comp.base.ModalOverlay;
import io.xpipe.app.core.AppFont;
import io.xpipe.app.core.AppFontSizes;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.window.AppDialog;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.core.process.CommandBuilder;
@@ -20,7 +16,6 @@ import io.xpipe.core.process.ShellControl;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.TextArea;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Text;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

View File

@@ -11,7 +11,6 @@ import io.xpipe.app.comp.store.StoreEntryWrapper;
import io.xpipe.app.comp.store.StoreViewState;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.ext.DataStoreCreationCategory;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.app.storage.DataStoreEntryRef;

View File

@@ -18,7 +18,6 @@ import io.xpipe.app.util.Validator;
import io.xpipe.core.process.ShellDialect;
import io.xpipe.core.process.ShellDialects;
import io.xpipe.core.store.DataStore;
import io.xpipe.core.util.Identifiers;
import javafx.beans.binding.Bindings;
import javafx.beans.property.Property;

View File

@@ -5,7 +5,6 @@ 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.prefs.AppPrefs;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.app.util.ThreadHelper;

View File

@@ -2,7 +2,6 @@ package io.xpipe.ext.base.service;
import io.xpipe.app.util.Validators;
import io.xpipe.core.store.DataStore;
import io.xpipe.core.store.NetworkTunnelStore;
import com.fasterxml.jackson.annotation.JsonTypeName;
import lombok.*;

View File

@@ -2,10 +2,8 @@ package io.xpipe.ext.base.service;
import io.xpipe.core.process.CommandBuilder;
import io.xpipe.core.process.ElevationFunction;
import io.xpipe.core.process.ShellControl;
import io.xpipe.core.store.Session;
import io.xpipe.core.store.SessionListener;
import io.xpipe.core.util.FailableSupplier;
import lombok.Getter;
@Getter

View File

@@ -2,18 +2,11 @@ package io.xpipe.ext.base.service;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.xpipe.app.ext.ShellStore;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStoreEntryRef;
import io.xpipe.app.util.HostHelper;
import io.xpipe.app.util.LicenseProvider;
import io.xpipe.core.process.ShellScript;
import io.xpipe.app.util.Validators;
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.ext.base.store.StartableStore;
import io.xpipe.ext.base.store.StoppableStore;
import lombok.Value;
import lombok.experimental.SuperBuilder;
import lombok.extern.jackson.Jacksonized;
@@ -39,7 +32,7 @@ public class ServiceControlStore implements SingletonSessionStore<ServiceControl
}
@Override
public ServiceControlSession newSession() throws Exception {
public ServiceControlSession newSession() {
return new ServiceControlSession(running -> {}, this);
}

View File

@@ -1,6 +1,5 @@
package io.xpipe.ext.base.service;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.base.IntegratedTextAreaComp;
import io.xpipe.app.comp.store.*;
import io.xpipe.app.core.AppI18n;
@@ -11,19 +10,13 @@ import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.app.util.DataStoreFormatter;
import io.xpipe.app.util.OptionsBuilder;
import io.xpipe.app.util.ShellStoreFormat;
import io.xpipe.core.process.ShellDialect;
import io.xpipe.core.store.DataStore;
import io.xpipe.ext.base.script.ScriptStore;
import io.xpipe.ext.base.script.SimpleScriptStore;
import javafx.beans.binding.Bindings;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import java.util.ArrayList;
import java.util.List;
public class ServiceControlStoreProvider implements SingletonSessionStoreProvider, DataStoreProvider {

View File

@@ -1,17 +1,11 @@
package io.xpipe.ext.base.service;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.prefs.ExternalApplicationHelper;
import io.xpipe.app.util.CommandSupport;
import io.xpipe.app.util.Hyperlinks;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.xpipe.app.util.LocalShell;
import io.xpipe.core.process.CommandBuilder;
import io.xpipe.core.process.OsType;
import lombok.Builder;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;

View File

@@ -1,14 +1,11 @@
package io.xpipe.ext.base.service;
import io.xpipe.app.comp.Comp;
import io.xpipe.app.comp.CompStructure;
import io.xpipe.app.comp.base.TextFieldComp;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.util.OptionsBuilder;
import javafx.beans.property.*;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.TextField;
import java.util.LinkedHashMap;