Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 166972 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ui/internal/ide/IDEApplication.java (-4 / +22 lines)
Lines 22-31 Link Here
22
import org.eclipse.core.runtime.CoreException;
22
import org.eclipse.core.runtime.CoreException;
23
import org.eclipse.core.runtime.IConfigurationElement;
23
import org.eclipse.core.runtime.IConfigurationElement;
24
import org.eclipse.core.runtime.IExecutableExtension;
24
import org.eclipse.core.runtime.IExecutableExtension;
25
import org.eclipse.core.runtime.IPlatformRunnable;
26
import org.eclipse.core.runtime.IStatus;
25
import org.eclipse.core.runtime.IStatus;
27
import org.eclipse.core.runtime.Platform;
26
import org.eclipse.core.runtime.Platform;
28
import org.eclipse.core.runtime.Status;
27
import org.eclipse.core.runtime.Status;
28
import org.eclipse.equinox.app.IApplication;
29
import org.eclipse.equinox.app.IApplicationContext;
29
import org.eclipse.jface.dialogs.MessageDialog;
30
import org.eclipse.jface.dialogs.MessageDialog;
30
import org.eclipse.osgi.service.datalocation.Location;
31
import org.eclipse.osgi.service.datalocation.Location;
31
import org.eclipse.osgi.util.NLS;
32
import org.eclipse.osgi.util.NLS;
Lines 33-38 Link Here
33
import org.eclipse.swt.widgets.Display;
34
import org.eclipse.swt.widgets.Display;
34
import org.eclipse.swt.widgets.MessageBox;
35
import org.eclipse.swt.widgets.MessageBox;
35
import org.eclipse.swt.widgets.Shell;
36
import org.eclipse.swt.widgets.Shell;
37
import org.eclipse.ui.IWorkbench;
36
import org.eclipse.ui.PlatformUI;
38
import org.eclipse.ui.PlatformUI;
37
39
38
/**
40
/**
Lines 40-46 Link Here
40
 * 
42
 * 
41
 * @since 3.0
43
 * @since 3.0
42
 */
44
 */
43
public class IDEApplication implements IPlatformRunnable, IExecutableExtension {
45
public class IDEApplication implements IApplication, IExecutableExtension {
44
46
45
	/**
47
	/**
46
	 * The name of the folder containing metadata information for the workspace.
48
	 * The name of the folder containing metadata information for the workspace.
Lines 69-77 Link Here
69
    }
71
    }
70
72
71
    /* (non-Javadoc)
73
    /* (non-Javadoc)
72
     * @see org.eclipse.core.boot.IPlatformRunnable#run(java.lang.Object)
74
     * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext context)
73
     */
75
     */
74
    public Object run(Object args) throws Exception {
76
    public Object start(IApplicationContext appContext) throws Exception {
75
        Display display = createDisplay();
77
        Display display = createDisplay();
76
78
77
        try {
79
        try {
Lines 450-453 Link Here
450
            return null;
452
            return null;
451
        }
453
        }
452
    }
454
    }
455
456
    /* (non-Javadoc)
457
     * @see org.eclipse.equinox.app.IApplication#stop()
458
     */
459
	public void stop() {
460
		final IWorkbench workbench = PlatformUI.getWorkbench();
461
		if (workbench == null)
462
			return;
463
		final Display display = workbench.getDisplay();
464
		display.syncExec(new Runnable() {
465
			public void run() {
466
				if (!display.isDisposed())
467
					workbench.close();
468
			}
469
		});
470
	}
453
}
471
}

Return to bug 166972