Bug 67053 [Workbench] when locking fails with exception, wrong message is shown
3.0 RC2 The same message will be shown by UI when locking fails, regardless the nature of the failure. case 1) Location#lock returns false - the "Current workspace is already in use" is shown case 2) Location#lock throws an IOException - something like "An error happened trying to lock the workspace" should be shown to the user, and the IOException should be logged. The same message (case 1) is being shown in both cases. Follows the code I am talking about: public final class IDEApplication ... { ... private boolean checkInstanceLocation(Shell shell) { ... try { if (instanceLoc.lock()) { writeWorkspaceVersion(); return true; } } catch (IOException e) { // do nothing } MessageDialog.openError( shell, IDEWorkbenchMessages .getString("IDEApplication.workspaceCannotLockTitle"), //$NON-NLS-1$ IDEWorkbenchMessages .getString("IDEApplication.workspaceCannotLockMessage")); //$NON-NLS-1$ return false; ... } ... }
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEApplication.java
: EXIT_RESTART;
        } finally {
            if (display != null)
                display.dispose();
        }
    }
    /**
     * Creates the display used by the application.
     * 
     * @return the display used by the application
     */
    protected Display createDisplay() {
        return PlatformUI.createDisplay();
    }
    /* (non-Javadoc)
     * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
     */
    public void setInitializationData(IConfigurationElement config,
            String propertyName, Object data) throws CoreException {
        
    }
    /**
     * Return a boolean value indicating whether or not the version of the Java runtime
     * ("java.version" system property) is deemed to be compatible with Eclipse.  
     * The current implementation compares only the version (and not things like vendor name), 
     * which matches the implementation that used to be in the runtime.
     */
    private boolean checkJavaRuntimeVersion(Shell shell) {
        try {
            if (isCompatibleVersion(System.getProperty("java.version")))