Skip to content

Commit 82281bf

Browse files
committed
Generalize "fiji" references to "myapp"
1 parent e833406 commit 82281bf

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/main/java/org/scijava/desktop/DesktopIntegrationProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public interface DesktopIntegrationProvider {
4848
boolean isWebLinksToggleable();
4949

5050
/**
51-
* Enables or disables URI scheme registration (e.g., {@code fiji://} links).
51+
* Enables or disables URI scheme registration (e.g., {@code myapp://} links).
5252
* <p>
5353
* This operation only works if {@link #isWebLinksToggleable()}
5454
* returns true. Otherwise, calling this method may throw

src/main/java/org/scijava/desktop/links/LinkHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public interface LinkHandler extends HandlerPlugin<URI> {
5151
/**
5252
* Gets the URI schemes that this handler supports.
5353
* <p>
54-
* This method is used for registering URI schemes with the operating system.
55-
* Handlers should return a list of scheme names (e.g., "fiji", "imagej")
54+
* This method is used for registering URI schemes with the operating
55+
* system. Handlers should return a list of scheme names (e.g., "myapp")
5656
* that they can handle. Return an empty list if the handler does not
5757
* require OS-level scheme registration.
5858
* </p>

src/main/java/org/scijava/desktop/links/SchemeInstaller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public interface SchemeInstaller {
5252
/**
5353
* Installs a URI scheme handler in the operating system.
5454
*
55-
* @param scheme The URI scheme to register (e.g., "fiji", "imagej")
55+
* @param scheme The URI scheme to register (e.g., "myapp")
5656
* @param executablePath The absolute path to the executable to launch
5757
* @throws IOException if installation fails
5858
*/

src/main/java/org/scijava/desktop/platform/linux/DesktopFile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public void setCategories(final String categories) {
338338
/**
339339
* Checks if a MimeType entry contains a specific MIME type.
340340
*
341-
* @param mimeType The MIME type to check (e.g., "x-scheme-handler/fiji")
341+
* @param mimeType The MIME type to check (e.g., "x-scheme-handler/myapp")
342342
* @return true if the MimeType field contains this type
343343
*/
344344
public boolean hasMimeType(final String mimeType) {
@@ -361,7 +361,7 @@ public boolean hasMimeType(final String mimeType) {
361361
* the new type if it's not already present.
362362
* </p>
363363
*
364-
* @param mimeType The MIME type to add (e.g., "x-scheme-handler/fiji")
364+
* @param mimeType The MIME type to add (e.g., "x-scheme-handler/myapp")
365365
*/
366366
public void addMimeType(final String mimeType) {
367367
if (hasMimeType(mimeType)) return; // Already present

src/main/java/org/scijava/desktop/platform/linux/LinuxPlatform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void open(final URL url) throws IOException {
109109
public boolean isWebLinksEnabled() {
110110
try {
111111
final DesktopFile df = getOrCreateDesktopFile();
112-
return df.hasMimeType("x-scheme-handler/fiji");
112+
return df.hasMimeType("x-scheme-handler/myapp");
113113
} catch (final IOException e) {
114114
if (log != null) {
115115
log.debug("Failed to check web links status", e);

src/main/java/org/scijava/desktop/platform/windows/WindowsPlatform.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void open(final URL url) throws IOException {
8383
@Override
8484
public boolean isWebLinksEnabled() {
8585
final WindowsSchemeInstaller installer = new WindowsSchemeInstaller(log);
86-
return installer.isInstalled("fiji");
86+
return installer.isInstalled("myapp");
8787
}
8888

8989
@Override
@@ -99,10 +99,10 @@ public void setWebLinksEnabled(final boolean enable) throws IOException {
9999
}
100100

101101
if (enable) {
102-
installer.install("fiji", executablePath);
102+
installer.install("myapp", executablePath);
103103
}
104104
else {
105-
installer.uninstall("fiji");
105+
installer.uninstall("myapp");
106106
}
107107
}
108108

0 commit comments

Comments
 (0)