mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-10-04 03:53:59 +13:00
Improve error messages for missing external application
This commit is contained in:
parent
06a0fefa8c
commit
d8089f1b9d
2 changed files with 7 additions and 5 deletions
|
@ -163,7 +163,7 @@ public interface ExternalEditorType extends PrefsChoiceValue {
|
||||||
public void launch(Path file) throws Exception {
|
public void launch(Path file) throws Exception {
|
||||||
var path = determinePath();
|
var path = determinePath();
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
throw new IOException("Unable to find installation of " + getId());
|
throw new IOException("Unable to find installation of " + toTranslatedString());
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplicationHelper.executeLocalApplication(
|
ApplicationHelper.executeLocalApplication(
|
||||||
|
|
|
@ -90,7 +90,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
||||||
public void launch(String name, String file, boolean elevated) throws Exception {
|
public void launch(String name, String file, boolean elevated) throws Exception {
|
||||||
var path = determinePath();
|
var path = determinePath();
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
throw new IOException("Unable to find installation of " + getId());
|
throw new IOException("Unable to find installation of " + toTranslatedString());
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplicationHelper.executeLocalApplication(
|
ApplicationHelper.executeLocalApplication(
|
||||||
|
@ -181,6 +181,8 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
||||||
|
|
||||||
ExternalTerminalType WARP = new WarpType();
|
ExternalTerminalType WARP = new WarpType();
|
||||||
|
|
||||||
|
ExternalTerminalType TABBY_MAC_OS = new TabbyMacOsType();
|
||||||
|
|
||||||
ExternalTerminalType CUSTOM = new CustomType();
|
ExternalTerminalType CUSTOM = new CustomType();
|
||||||
|
|
||||||
List<ExternalTerminalType> ALL = Stream.of(
|
List<ExternalTerminalType> ALL = Stream.of(
|
||||||
|
@ -193,7 +195,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
||||||
XFCE,
|
XFCE,
|
||||||
GNOME_TERMINAL,
|
GNOME_TERMINAL,
|
||||||
ITERM2,
|
ITERM2,
|
||||||
TABBY_WINDOWS,
|
TABBY_MAC_OS,
|
||||||
WARP,
|
WARP,
|
||||||
MACOS_TERMINAL,
|
MACOS_TERMINAL,
|
||||||
CUSTOM)
|
CUSTOM)
|
||||||
|
@ -300,9 +302,9 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TabbyType extends ExternalApplicationType.MacApplication implements ExternalTerminalType {
|
class TabbyMacOsType extends ExternalApplicationType.MacApplication implements ExternalTerminalType {
|
||||||
|
|
||||||
public TabbyType() {
|
public TabbyMacOsType() {
|
||||||
super("app.tabbyMacOs", "Tabby");
|
super("app.tabbyMacOs", "Tabby");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue