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
private static final String METADATA_FOLDER = ".metadata"; 
    private static final String VERSION_FILENAME = "version.ini"; 
    private static final String WORKSPACE_VERSION_KEY = "org.eclipse.core.runtime"; 
    private static final String WORKSPACE_VERSION_VALUE = "1"; 
    private static final String PROP_EXIT_CODE = "eclipse.exitcode"; 
    /**
     * A special return code that will be recognized by the launcher and used to
     * restart the workbench.
     */
    private static final Integer EXIT_RELAUNCH = new Integer(24);
    private static final int MIN_JVM_VERSION_MAJOR = 1;
    private static final int MIN_JVM_VERSION_MINOR = 4;
    private static final int MIN_JVM_VERSION_SERVICE = 1;
    /**
     * Creates a new IDE application.
     */
    public IDEApplication() {
        
    }
    /* (non-Javadoc)
     * @see org.eclipse.core.boot.IPlatformRunnable#run(java.lang.Object)
     */
    public Object run(Object args) throws Exception {