mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Shell environmentally factoring and default option implementation
This commit is contained in:
parent
19086e57d8
commit
f1c5337355
44 changed files with 79 additions and 53 deletions
|
@ -3,7 +3,7 @@ package io.xpipe.app.beacon.impl;
|
||||||
import com.sun.net.httpserver.HttpExchange;
|
import com.sun.net.httpserver.HttpExchange;
|
||||||
import io.xpipe.app.util.TerminalLauncherManager;
|
import io.xpipe.app.util.TerminalLauncherManager;
|
||||||
import io.xpipe.beacon.api.SshLaunchExchange;
|
import io.xpipe.beacon.api.SshLaunchExchange;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.core.process.ShellDialects;
|
import io.xpipe.core.process.ShellDialects;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import io.xpipe.app.browser.file.BrowserFileTransferMode;
|
||||||
import io.xpipe.app.browser.file.LocalFileSystem;
|
import io.xpipe.app.browser.file.LocalFileSystem;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.util.ThreadHelper;
|
import io.xpipe.app.util.ThreadHelper;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.core.store.FileEntry;
|
import io.xpipe.core.store.FileEntry;
|
||||||
import io.xpipe.core.util.FailableRunnable;
|
import io.xpipe.core.util.FailableRunnable;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package io.xpipe.app.browser.file;
|
||||||
import io.xpipe.core.store.FileEntry;
|
import io.xpipe.core.store.FileEntry;
|
||||||
import io.xpipe.core.store.FileKind;
|
import io.xpipe.core.store.FileKind;
|
||||||
import io.xpipe.core.store.FileSystem;
|
import io.xpipe.core.store.FileSystem;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
|
@ -18,7 +18,7 @@ import io.xpipe.app.storage.DataStoreEntryRef;
|
||||||
import io.xpipe.app.util.BooleanScope;
|
import io.xpipe.app.util.BooleanScope;
|
||||||
import io.xpipe.app.util.TerminalLauncher;
|
import io.xpipe.app.util.TerminalLauncher;
|
||||||
import io.xpipe.app.util.ThreadHelper;
|
import io.xpipe.app.util.ThreadHelper;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.core.process.ShellControl;
|
import io.xpipe.core.process.ShellControl;
|
||||||
import io.xpipe.core.process.ShellDialects;
|
import io.xpipe.core.process.ShellDialects;
|
||||||
import io.xpipe.core.process.ShellOpenFunction;
|
import io.xpipe.core.process.ShellOpenFunction;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import io.xpipe.app.ext.ExtensionException;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.issue.TrackEvent;
|
import io.xpipe.app.issue.TrackEvent;
|
||||||
import io.xpipe.core.process.OsType;
|
import io.xpipe.core.process.OsType;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.core.util.ModuleHelper;
|
import io.xpipe.core.util.ModuleHelper;
|
||||||
import io.xpipe.core.util.ModuleLayerLoader;
|
import io.xpipe.core.util.ModuleLayerLoader;
|
||||||
import io.xpipe.core.util.XPipeInstallation;
|
import io.xpipe.core.util.XPipeInstallation;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package io.xpipe.app.core.check;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.util.LocalShell;
|
import io.xpipe.app.util.LocalShell;
|
||||||
import io.xpipe.core.process.OsType;
|
import io.xpipe.core.process.OsType;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.core.process.ProcessOutputException;
|
import io.xpipe.core.process.ProcessOutputException;
|
||||||
|
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
package io.xpipe.core.store;
|
package io.xpipe.app.ext;
|
||||||
|
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
|
||||||
import io.xpipe.core.process.ShellControl;
|
import io.xpipe.core.process.ShellControl;
|
||||||
import io.xpipe.core.process.ShellStoreState;
|
import io.xpipe.core.process.ShellStoreState;
|
||||||
|
import io.xpipe.core.store.DataStore;
|
||||||
|
import io.xpipe.core.store.NetworkTunnelStore;
|
||||||
|
import io.xpipe.core.store.ShellStore;
|
||||||
|
import io.xpipe.core.store.StatefulDataStore;
|
||||||
import io.xpipe.core.util.JacksonizedValue;
|
import io.xpipe.core.util.JacksonizedValue;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
@ -1,5 +1,8 @@
|
||||||
package io.xpipe.core.process;
|
package io.xpipe.app.ext;
|
||||||
|
|
||||||
|
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||||
|
import io.xpipe.core.process.*;
|
||||||
|
import io.xpipe.core.store.DataStore;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
import java.util.ServiceLoader;
|
import java.util.ServiceLoader;
|
||||||
|
@ -37,4 +40,6 @@ public abstract class ProcessControlProvider {
|
||||||
public abstract ShellDialect getDefaultLocalDialect();
|
public abstract ShellDialect getDefaultLocalDialect();
|
||||||
|
|
||||||
public abstract ShellDialect getFallbackDialect();
|
public abstract ShellDialect getFallbackDialect();
|
||||||
|
|
||||||
|
public abstract <T extends DataStore> DataStoreEntryRef<T> replace(DataStoreEntryRef<T> ref);
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@ import io.xpipe.app.storage.DataStoreEntry;
|
||||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||||
import io.xpipe.app.util.DataStoreCategoryChoiceComp;
|
import io.xpipe.app.util.DataStoreCategoryChoiceComp;
|
||||||
import io.xpipe.core.store.DataStore;
|
import io.xpipe.core.store.DataStore;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
import io.xpipe.core.store.ShellStore;
|
import io.xpipe.core.store.ShellStore;
|
||||||
|
|
||||||
import javafx.beans.binding.Bindings;
|
import javafx.beans.binding.Bindings;
|
||||||
|
|
|
@ -12,8 +12,8 @@ import io.xpipe.app.util.TerminalLauncher;
|
||||||
import io.xpipe.app.util.ThreadHelper;
|
import io.xpipe.app.util.ThreadHelper;
|
||||||
import io.xpipe.core.process.CommandBuilder;
|
import io.xpipe.core.process.CommandBuilder;
|
||||||
import io.xpipe.core.process.CommandControl;
|
import io.xpipe.core.process.CommandControl;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
|
|
||||||
import javafx.beans.property.SimpleStringProperty;
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
|
|
|
@ -13,7 +13,7 @@ import io.xpipe.app.util.Hyperlinks;
|
||||||
import io.xpipe.app.util.OptionsBuilder;
|
import io.xpipe.app.util.OptionsBuilder;
|
||||||
import io.xpipe.app.util.TerminalLauncher;
|
import io.xpipe.app.util.TerminalLauncher;
|
||||||
import io.xpipe.app.util.ThreadHelper;
|
import io.xpipe.app.util.ThreadHelper;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
|
|
||||||
import javafx.beans.binding.Bindings;
|
import javafx.beans.binding.Bindings;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import io.xpipe.app.util.FixedHierarchyStore;
|
||||||
import io.xpipe.app.util.ThreadHelper;
|
import io.xpipe.app.util.ThreadHelper;
|
||||||
import io.xpipe.core.store.DataStore;
|
import io.xpipe.core.store.DataStore;
|
||||||
import io.xpipe.core.store.FixedChildStore;
|
import io.xpipe.core.store.FixedChildStore;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
import io.xpipe.core.store.StorePath;
|
import io.xpipe.core.store.StorePath;
|
||||||
import io.xpipe.core.util.UuidHelper;
|
import io.xpipe.core.util.UuidHelper;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package io.xpipe.app.storage;
|
package io.xpipe.app.storage;
|
||||||
|
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package io.xpipe.app.storage;
|
package io.xpipe.app.storage;
|
||||||
|
|
||||||
import io.xpipe.app.comp.store.StoreSortMode;
|
import io.xpipe.app.comp.store.StoreSortMode;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.issue.TrackEvent;
|
import io.xpipe.app.issue.TrackEvent;
|
||||||
import io.xpipe.app.prefs.AppPrefs;
|
import io.xpipe.app.prefs.AppPrefs;
|
||||||
import io.xpipe.core.process.OsType;
|
import io.xpipe.core.process.OsType;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
import io.xpipe.core.util.JacksonMapper;
|
import io.xpipe.core.util.JacksonMapper;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JacksonException;
|
import com.fasterxml.jackson.core.JacksonException;
|
||||||
|
|
|
@ -5,6 +5,7 @@ import io.xpipe.app.core.AppCache;
|
||||||
import io.xpipe.app.core.AppI18n;
|
import io.xpipe.app.core.AppI18n;
|
||||||
import io.xpipe.app.core.window.AppWindowHelper;
|
import io.xpipe.app.core.window.AppWindowHelper;
|
||||||
import io.xpipe.app.ext.PrefsChoiceValue;
|
import io.xpipe.app.ext.PrefsChoiceValue;
|
||||||
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.prefs.ExternalApplicationType;
|
import io.xpipe.app.prefs.ExternalApplicationType;
|
||||||
import io.xpipe.app.storage.DataColor;
|
import io.xpipe.app.storage.DataColor;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import io.xpipe.app.util.ThreadHelper;
|
||||||
import io.xpipe.core.process.OsType;
|
import io.xpipe.core.process.OsType;
|
||||||
import io.xpipe.core.process.ShellDialects;
|
import io.xpipe.core.process.ShellDialects;
|
||||||
import io.xpipe.core.store.FileNames;
|
import io.xpipe.core.store.FileNames;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
import io.xpipe.core.util.FailableRunnable;
|
import io.xpipe.core.util.FailableRunnable;
|
||||||
import io.xpipe.core.util.XPipeInstallation;
|
import io.xpipe.core.util.XPipeInstallation;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package io.xpipe.app.update;
|
||||||
import io.xpipe.app.core.AppProperties;
|
import io.xpipe.app.core.AppProperties;
|
||||||
import io.xpipe.app.fxcomps.impl.CodeSnippet;
|
import io.xpipe.app.fxcomps.impl.CodeSnippet;
|
||||||
import io.xpipe.app.fxcomps.impl.CodeSnippetComp;
|
import io.xpipe.app.fxcomps.impl.CodeSnippetComp;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
|
|
||||||
import javafx.beans.property.SimpleObjectProperty;
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
import javafx.scene.layout.Region;
|
import javafx.scene.layout.Region;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package io.xpipe.app.util;
|
||||||
|
|
||||||
import io.xpipe.app.storage.*;
|
import io.xpipe.app.storage.*;
|
||||||
import io.xpipe.app.terminal.ExternalTerminalType;
|
import io.xpipe.app.terminal.ExternalTerminalType;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
import io.xpipe.core.util.EncryptedSecretValue;
|
import io.xpipe.core.util.EncryptedSecretValue;
|
||||||
import io.xpipe.core.util.JacksonMapper;
|
import io.xpipe.core.util.JacksonMapper;
|
||||||
import io.xpipe.core.util.SecretValue;
|
import io.xpipe.core.util.SecretValue;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package io.xpipe.app.util;
|
||||||
import io.xpipe.app.storage.DataStorage;
|
import io.xpipe.app.storage.DataStorage;
|
||||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||||
import io.xpipe.core.store.FileSystemStore;
|
import io.xpipe.core.store.FileSystemStore;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
import io.xpipe.core.util.JacksonizedValue;
|
import io.xpipe.core.util.JacksonizedValue;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package io.xpipe.app.util;
|
package io.xpipe.app.util;
|
||||||
|
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.core.process.ShellControl;
|
import io.xpipe.core.process.ShellControl;
|
||||||
import io.xpipe.core.process.ShellDialects;
|
import io.xpipe.core.process.ShellDialects;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package io.xpipe.app.util;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.prefs.AppPrefs;
|
import io.xpipe.app.prefs.AppPrefs;
|
||||||
import io.xpipe.app.storage.DataStoreSecret;
|
import io.xpipe.app.storage.DataStoreSecret;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
import io.xpipe.core.util.InPlaceSecretValue;
|
import io.xpipe.core.util.InPlaceSecretValue;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import io.xpipe.app.core.AppProperties;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.core.process.CommandBuilder;
|
import io.xpipe.core.process.CommandBuilder;
|
||||||
import io.xpipe.core.process.OsType;
|
import io.xpipe.core.process.OsType;
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.core.process.ShellControl;
|
import io.xpipe.core.process.ShellControl;
|
||||||
import io.xpipe.core.util.XPipeInstallation;
|
import io.xpipe.core.util.XPipeInstallation;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package io.xpipe.app.util;
|
package io.xpipe.app.util;
|
||||||
|
|
||||||
import io.xpipe.app.core.AppI18n;
|
import io.xpipe.app.core.AppI18n;
|
||||||
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.prefs.AppPrefs;
|
import io.xpipe.app.prefs.AppPrefs;
|
||||||
import io.xpipe.app.storage.DataStorage;
|
import io.xpipe.app.storage.DataStorage;
|
||||||
|
|
|
@ -110,6 +110,7 @@ open module io.xpipe.app {
|
||||||
uses io.xpipe.app.util.LicensedFeature;
|
uses io.xpipe.app.util.LicensedFeature;
|
||||||
uses io.xpipe.beacon.BeaconInterface;
|
uses io.xpipe.beacon.BeaconInterface;
|
||||||
uses DataStorageExtensionProvider;
|
uses DataStorageExtensionProvider;
|
||||||
|
uses ProcessControlProvider;
|
||||||
|
|
||||||
provides Module with
|
provides Module with
|
||||||
AppJacksonModule;
|
AppJacksonModule;
|
||||||
|
|
|
@ -220,10 +220,7 @@ public interface ShellControl extends ProcessControl {
|
||||||
return command(b);
|
return command(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
default CommandControl command(CommandBuilder builder) {
|
CommandControl command(CommandBuilder builder);
|
||||||
var sc = ProcessControlProvider.get().command(this, builder, builder);
|
|
||||||
return sc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void exitAndWait() throws IOException;
|
void exitAndWait() throws IOException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,15 +11,16 @@ import lombok.extern.jackson.Jacksonized;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@SuperBuilder(toBuilder = true)
|
@SuperBuilder(toBuilder = true)
|
||||||
@Jacksonized
|
@Jacksonized
|
||||||
public class ShellNameStoreState extends ShellStoreState {
|
public class ShellEnvironmentStoreState extends ShellStoreState {
|
||||||
|
|
||||||
String shellName;
|
String shellName;
|
||||||
|
Boolean setDefault;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataStoreState mergeCopy(DataStoreState newer) {
|
public DataStoreState mergeCopy(DataStoreState newer) {
|
||||||
var n = (ShellNameStoreState) newer;
|
var n = (ShellEnvironmentStoreState) newer;
|
||||||
var b = toBuilder();
|
var b = toBuilder();
|
||||||
mergeBuilder(n, b);
|
mergeBuilder(n, b);
|
||||||
return b.shellName(useNewer(shellName, n.shellName)).build();
|
return b.shellName(useNewer(shellName, n.shellName)).setDefault(useNewer(setDefault,n.setDefault)).build();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,10 +5,6 @@ import io.xpipe.core.process.ShellControl;
|
||||||
|
|
||||||
public interface ShellStore extends DataStore, FileSystemStore, ValidatableStore {
|
public interface ShellStore extends DataStore, FileSystemStore, ValidatableStore {
|
||||||
|
|
||||||
static boolean isLocal(ShellStore s) {
|
|
||||||
return s instanceof LocalStore;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default FileSystem createFileSystem() {
|
default FileSystem createFileSystem() {
|
||||||
return new ConnectionFileSystem(control());
|
return new ConnectionFileSystem(control());
|
||||||
|
|
|
@ -1,16 +1,5 @@
|
||||||
package io.xpipe.core.util;
|
package io.xpipe.core.util;
|
||||||
|
|
||||||
import io.xpipe.core.dialog.BaseQueryElement;
|
|
||||||
import io.xpipe.core.dialog.BusyElement;
|
|
||||||
import io.xpipe.core.dialog.ChoiceElement;
|
|
||||||
import io.xpipe.core.dialog.HeaderElement;
|
|
||||||
import io.xpipe.core.process.OsType;
|
|
||||||
import io.xpipe.core.process.ShellDialect;
|
|
||||||
import io.xpipe.core.process.ShellDialects;
|
|
||||||
import io.xpipe.core.store.FilePath;
|
|
||||||
import io.xpipe.core.store.LocalStore;
|
|
||||||
import io.xpipe.core.store.StorePath;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import com.fasterxml.jackson.core.JsonGenerator;
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
@ -19,6 +8,15 @@ import com.fasterxml.jackson.databind.*;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.jsontype.NamedType;
|
import com.fasterxml.jackson.databind.jsontype.NamedType;
|
||||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
|
import io.xpipe.core.dialog.BaseQueryElement;
|
||||||
|
import io.xpipe.core.dialog.BusyElement;
|
||||||
|
import io.xpipe.core.dialog.ChoiceElement;
|
||||||
|
import io.xpipe.core.dialog.HeaderElement;
|
||||||
|
import io.xpipe.core.process.OsType;
|
||||||
|
import io.xpipe.core.process.ShellDialect;
|
||||||
|
import io.xpipe.core.process.ShellDialects;
|
||||||
|
import io.xpipe.core.store.FilePath;
|
||||||
|
import io.xpipe.core.store.StorePath;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
@ -32,7 +30,6 @@ public class CoreJacksonModule extends SimpleModule {
|
||||||
public void setupModule(SetupContext context) {
|
public void setupModule(SetupContext context) {
|
||||||
context.registerSubtypes(
|
context.registerSubtypes(
|
||||||
new NamedType(InPlaceSecretValue.class),
|
new NamedType(InPlaceSecretValue.class),
|
||||||
new NamedType(LocalStore.class),
|
|
||||||
new NamedType(BaseQueryElement.class),
|
new NamedType(BaseQueryElement.class),
|
||||||
new NamedType(ChoiceElement.class),
|
new NamedType(ChoiceElement.class),
|
||||||
new NamedType(BusyElement.class),
|
new NamedType(BusyElement.class),
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import io.xpipe.core.process.ProcessControlProvider;
|
|
||||||
import io.xpipe.core.process.ShellDialect;
|
import io.xpipe.core.process.ShellDialect;
|
||||||
import io.xpipe.core.process.ShellDialects;
|
import io.xpipe.core.process.ShellDialects;
|
||||||
import io.xpipe.core.util.CoreJacksonModule;
|
import io.xpipe.core.util.CoreJacksonModule;
|
||||||
|
@ -19,7 +18,6 @@ open module io.xpipe.core {
|
||||||
requires static lombok;
|
requires static lombok;
|
||||||
|
|
||||||
uses com.fasterxml.jackson.databind.Module;
|
uses com.fasterxml.jackson.databind.Module;
|
||||||
uses ProcessControlProvider;
|
|
||||||
uses io.xpipe.core.util.ProxyManagerProvider;
|
uses io.xpipe.core.util.ProxyManagerProvider;
|
||||||
uses io.xpipe.core.util.DataStateProvider;
|
uses io.xpipe.core.util.DataStateProvider;
|
||||||
uses ModuleLayerLoader;
|
uses ModuleLayerLoader;
|
||||||
|
|
|
@ -4,8 +4,10 @@ import io.xpipe.app.browser.session.BrowserSessionModel;
|
||||||
import io.xpipe.app.core.AppI18n;
|
import io.xpipe.app.core.AppI18n;
|
||||||
import io.xpipe.app.core.AppLayoutModel;
|
import io.xpipe.app.core.AppLayoutModel;
|
||||||
import io.xpipe.app.ext.ActionProvider;
|
import io.xpipe.app.ext.ActionProvider;
|
||||||
|
import io.xpipe.app.ext.ProcessControlProvider;
|
||||||
import io.xpipe.app.storage.DataStoreEntry;
|
import io.xpipe.app.storage.DataStoreEntry;
|
||||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||||
|
import io.xpipe.core.store.FileSystemStore;
|
||||||
import io.xpipe.core.store.ShellStore;
|
import io.xpipe.core.store.ShellStore;
|
||||||
|
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
|
@ -53,7 +55,8 @@ public class BrowseStoreAction implements ActionProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
BrowserSessionModel.DEFAULT.openFileSystemAsync(entry.ref(), null, new SimpleBooleanProperty());
|
DataStoreEntryRef<FileSystemStore> replacement = ProcessControlProvider.get().replace(entry.ref());
|
||||||
|
BrowserSessionModel.DEFAULT.openFileSystemAsync(replacement, null, new SimpleBooleanProperty());
|
||||||
AppLayoutModel.get().selectBrowser();
|
AppLayoutModel.get().selectBrowser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import io.xpipe.core.process.CommandControl;
|
||||||
import io.xpipe.core.process.ElevationFunction;
|
import io.xpipe.core.process.ElevationFunction;
|
||||||
import io.xpipe.core.process.ShellControl;
|
import io.xpipe.core.process.ShellControl;
|
||||||
import io.xpipe.core.process.ShellDialects;
|
import io.xpipe.core.process.ShellDialects;
|
||||||
import io.xpipe.core.store.LocalStore;
|
import io.xpipe.app.ext.LocalStore;
|
||||||
import io.xpipe.core.store.ShellStore;
|
import io.xpipe.core.store.ShellStore;
|
||||||
|
|
||||||
import javafx.beans.value.ObservableValue;
|
import javafx.beans.value.ObservableValue;
|
||||||
|
@ -40,8 +40,7 @@ public class SampleStoreAction implements ActionProvider {
|
||||||
@Override
|
@Override
|
||||||
public boolean isApplicable(DataStoreEntryRef<ShellStore> o) {
|
public boolean isApplicable(DataStoreEntryRef<ShellStore> o) {
|
||||||
// Allows you to individually check whether this action should be available for the specific store.
|
// Allows you to individually check whether this action should be available for the specific store.
|
||||||
// In this case it should only be available for remote shell connections, not local ones.
|
return true;
|
||||||
return !ShellStore.isLocal(o.getStore());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -405,3 +405,5 @@ vncDirect.displayName=Direkte VNC-forbindelse
|
||||||
vncDirect.displayDescription=Opret direkte forbindelse til et system via VNC
|
vncDirect.displayDescription=Opret direkte forbindelse til et system via VNC
|
||||||
editConfiguration=Rediger konfiguration
|
editConfiguration=Rediger konfiguration
|
||||||
viewInDashboard=Visning i dashboard
|
viewInDashboard=Visning i dashboard
|
||||||
|
setDefault=Indstil standard
|
||||||
|
removeDefault=Fjern standard
|
||||||
|
|
|
@ -383,3 +383,5 @@ vncDirect.displayName=Direkte VNC-Verbindung
|
||||||
vncDirect.displayDescription=Über VNC direkt mit einem System verbinden
|
vncDirect.displayDescription=Über VNC direkt mit einem System verbinden
|
||||||
editConfiguration=Konfiguration bearbeiten
|
editConfiguration=Konfiguration bearbeiten
|
||||||
viewInDashboard=Ansicht im Dashboard
|
viewInDashboard=Ansicht im Dashboard
|
||||||
|
setDefault=Standard einstellen
|
||||||
|
removeDefault=Standard entfernen
|
||||||
|
|
|
@ -381,3 +381,5 @@ vncDirect.displayName=Direct VNC connection
|
||||||
vncDirect.displayDescription=Connect to a system via VNC directly
|
vncDirect.displayDescription=Connect to a system via VNC directly
|
||||||
editConfiguration=Edit configuration
|
editConfiguration=Edit configuration
|
||||||
viewInDashboard=View in dashboard
|
viewInDashboard=View in dashboard
|
||||||
|
setDefault=Set default
|
||||||
|
removeDefault=Remove default
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=Conexión VNC directa
|
||||||
vncDirect.displayDescription=Conectarse directamente a un sistema mediante VNC
|
vncDirect.displayDescription=Conectarse directamente a un sistema mediante VNC
|
||||||
editConfiguration=Editar configuración
|
editConfiguration=Editar configuración
|
||||||
viewInDashboard=Vista en el panel de control
|
viewInDashboard=Vista en el panel de control
|
||||||
|
setDefault=Establecer por defecto
|
||||||
|
removeDefault=Eliminar por defecto
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=Connexion directe VNC
|
||||||
vncDirect.displayDescription=Se connecter directement à un système via VNC
|
vncDirect.displayDescription=Se connecter directement à un système via VNC
|
||||||
editConfiguration=Modifier la configuration
|
editConfiguration=Modifier la configuration
|
||||||
viewInDashboard=Vue dans le tableau de bord
|
viewInDashboard=Vue dans le tableau de bord
|
||||||
|
setDefault=Définir par défaut
|
||||||
|
removeDefault=Supprimer la valeur par défaut
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=Connessione diretta VNC
|
||||||
vncDirect.displayDescription=Connettersi direttamente a un sistema tramite VNC
|
vncDirect.displayDescription=Connettersi direttamente a un sistema tramite VNC
|
||||||
editConfiguration=Modifica la configurazione
|
editConfiguration=Modifica la configurazione
|
||||||
viewInDashboard=Vista nel cruscotto
|
viewInDashboard=Vista nel cruscotto
|
||||||
|
setDefault=Imposta predefinito
|
||||||
|
removeDefault=Rimuovi l'impostazione predefinita
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=直接VNC接続
|
||||||
vncDirect.displayDescription=VNC経由でシステムに直接接続する
|
vncDirect.displayDescription=VNC経由でシステムに直接接続する
|
||||||
editConfiguration=設定を編集する
|
editConfiguration=設定を編集する
|
||||||
viewInDashboard=ダッシュボードで見る
|
viewInDashboard=ダッシュボードで見る
|
||||||
|
setDefault=デフォルトを設定する
|
||||||
|
removeDefault=デフォルトを削除する
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=Directe VNC-verbinding
|
||||||
vncDirect.displayDescription=Rechtstreeks verbinding maken met een systeem via VNC
|
vncDirect.displayDescription=Rechtstreeks verbinding maken met een systeem via VNC
|
||||||
editConfiguration=Configuratie bewerken
|
editConfiguration=Configuratie bewerken
|
||||||
viewInDashboard=Weergave in dashboard
|
viewInDashboard=Weergave in dashboard
|
||||||
|
setDefault=Standaard instellen
|
||||||
|
removeDefault=Standaard verwijderen
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=Ligação VNC direta
|
||||||
vncDirect.displayDescription=Liga-te diretamente a um sistema através do VNC
|
vncDirect.displayDescription=Liga-te diretamente a um sistema através do VNC
|
||||||
editConfiguration=Edita a configuração
|
editConfiguration=Edita a configuração
|
||||||
viewInDashboard=Ver no painel de controlo
|
viewInDashboard=Ver no painel de controlo
|
||||||
|
setDefault=Definir predefinição
|
||||||
|
removeDefault=Remover predefinição
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=Прямое VNC-соединение
|
||||||
vncDirect.displayDescription=Подключись к системе через VNC напрямую
|
vncDirect.displayDescription=Подключись к системе через VNC напрямую
|
||||||
editConfiguration=Редактирование конфигурации
|
editConfiguration=Редактирование конфигурации
|
||||||
viewInDashboard=Вид в приборной панели
|
viewInDashboard=Вид в приборной панели
|
||||||
|
setDefault=Установить по умолчанию
|
||||||
|
removeDefault=Убрать значение по умолчанию
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=Doğrudan VNC bağlantısı
|
||||||
vncDirect.displayDescription=Doğrudan VNC aracılığıyla bir sisteme bağlanma
|
vncDirect.displayDescription=Doğrudan VNC aracılığıyla bir sisteme bağlanma
|
||||||
editConfiguration=Yapılandırmayı düzenle
|
editConfiguration=Yapılandırmayı düzenle
|
||||||
viewInDashboard=Gösterge tablosunda görüntüle
|
viewInDashboard=Gösterge tablosunda görüntüle
|
||||||
|
setDefault=Varsayılanı ayarla
|
||||||
|
removeDefault=Varsayılanı kaldır
|
||||||
|
|
|
@ -379,3 +379,5 @@ vncDirect.displayName=直接 VNC 连接
|
||||||
vncDirect.displayDescription=直接通过 VNC 连接到系统
|
vncDirect.displayDescription=直接通过 VNC 连接到系统
|
||||||
editConfiguration=编辑配置
|
editConfiguration=编辑配置
|
||||||
viewInDashboard=在仪表板中查看
|
viewInDashboard=在仪表板中查看
|
||||||
|
setDefault=设置默认值
|
||||||
|
removeDefault=删除默认值
|
||||||
|
|
Loading…
Reference in a new issue