Bug 109932 Should not access resources plug-in on ide startup
20050819 As we are hitting the resources plug-in too early by adding a resource listener on startUp. This then eagerly sets the preference location which occurs before the preference chooser comes up. As a result running with -data noDefault results in an error. Moving this to preShutdown and postStartup of the advisor sorts this out.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchAdvisor.java
IWorkbenchWindow window = getWorkbenchConfigurer().getWorkbench()
                .getActiveWorkbenchWindow();
        Shell shell = window == null ? null : window.getShell();
        ProgressMonitorDialog dlg = new ProgressMonitorJobsDialog(shell);
        final CoreException ex[] = new CoreException[1];
        try {
            dlg.run(true, true, new IRunnableWithProgress() {
                public void run(IProgressMonitor monitor)
                        throws InvocationTargetException, InterruptedException {
                    try {
                        IContainer root = ResourcesPlugin.getWorkspace()
                                .getRoot();
                        root.refreshLocal(IResource.DEPTH_INFINITE, monitor);
                    } catch (CoreException e) {
                        ex[0] = e;
                    }
                }
            });
            if (ex[0] != null) {
                ErrorDialog.openError(shell, IDEWorkbenchMessages.Workspace_problemsTitle,
                        IDEWorkbenchMessages.Workspace_problemMessage,
                        ex[0].getStatus());
            }
        } catch (InterruptedException e) {
            
        } catch (InvocationTargetException e) {
            String msg = "InvocationTargetException refreshing from local on startup"; 
            IDEWorkbenchPlugin.log(msg, new Status(IStatus.ERROR,
                    IDEWorkbenchPlugin.IDE_WORKBENCH, 0, msg, e
                            .getTargetException()));