01: package net.refractions.udig.ui.internal;
02:
03: import net.refractions.udig.core.internal.CorePlugin;
04: import net.refractions.udig.ui.PlatformGIS;
05:
06: import org.eclipse.ui.IStartup;
07: import org.eclipse.ui.PlatformUI;
08: import org.eclipse.ui.intro.IIntroManager;
09: import org.eclipse.ui.intro.IIntroPart;
10:
11: /**
12: * Turns off annoying features for developer sanity.
13: *
14: * @author chorner
15: * @since 1.1.0
16: */
17: public class DeveloperStartup implements IStartup {
18:
19: public void earlyStartup() {
20: if (CorePlugin.isDeveloping()) {
21: closeIntro();
22: }
23: }
24:
25: private void closeIntro() {
26: PlatformGIS.syncInDisplayThread(new Runnable() {
27:
28: public void run() {
29: IIntroManager introManager = PlatformUI.getWorkbench()
30: .getIntroManager();
31: IIntroPart intro = introManager.getIntro();
32: if (intro != null)
33: introManager.closeIntro(intro);
34: }
35:
36: });
37: }
38:
39: }
|