Community
Participate
Working Groups
When the "eclipse.launcher" property is not set, e.g. if started as a target platform, the UriSchemeHandlerPreferencePage does not work as expected: IOperatingSystemRegistration.getEclipseLauncher() can potentially return null, which leads to a NPE when checking an entry in the list. If the location of the own launcher cannot be determined, the page should probably show an error/warning message that it cannot be used and the controls should be disabled. As for determining the location: For MacOS, getEclipseLauncher() does not rely on "eclipse.launcher", it should already work when used as target. For Windows, getEclipseLauncher() currently relies on "eclipse.launcher", but the org.eclipse.urischeme.internal.registration.RegistryWriter also knows of a fallback that uses "eclipse.home.location". This fallback can be moved over to org.eclipse.urischeme.internal.registration.RegistrationWindows. The fallback searches for ".exe" files in the "eclipse.home.location" directory. For Linux, no fallback exists, yet, but can probably be implemented similarly to windows.
New Gerrit change created: https://git.eclipse.org/r/139486
Gerrit change https://git.eclipse.org/r/139486 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e3efe330bca1b05bc0a6cd224c535b313f47d4db
(In reply to Eclipse Genie from comment #2) > Gerrit change https://git.eclipse.org/r/139486 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=e3efe330bca1b05bc0a6cd224c535b313f47d4db Thank you Sebastian for fixing this.
IOperatingSystemRegistration.getEclipseLauncher() can still return null, it the launcher cannot be found. So UrlHandlerPreferencePageContributor also should be able to handle such a case correctly. Currently, this causes a NullPointerException. If the launcher cannot be determined, it could for example set an error status on the preference page and disable the table control.
New Gerrit change created: https://git.eclipse.org/r/140215
New Gerrit change created: https://git.eclipse.org/r/140216
Gerrit change https://git.eclipse.org/r/140215 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=25c9a820224da30247a2f91c853e32dae3db25ec
Gerrit change https://git.eclipse.org/r/140216 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.common.git/commit/?id=ef9f739262dfbb4e3a7aec2f8914a4ea2e5fc676
Sebastian: Thank you for fixing.