Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-12-09 13:06:36 +0000
committerCamille Letavernier2015-12-09 13:06:36 +0000
commite30ed7373196e7d97775072e50c15451638d9358 (patch)
tree705344269b3677de7ec94cb8a23c6458f1be351d /plugins/uml
parentf3ee390b167858af90ef203028bf26c4b121941c (diff)
downloadorg.eclipse.papyrus-e30ed7373196e7d97775072e50c15451638d9358.tar.gz
org.eclipse.papyrus-e30ed7373196e7d97775072e50c15451638d9358.tar.xz
org.eclipse.papyrus-e30ed7373196e7d97775072e50c15451638d9358.zip
484001: [User Experience] Investigate the 5 remaining Papyrus bundles on
early startup https://bugs.eclipse.org/bugs/show_bug.cgi?id=484001 - Move the startup from eclipse.ui.startup extension to Activator#start, for XText UI Integration Change-Id: I48af4ccc752789ca6283691bd2bc57214f8e6913 Signed-off-by: Camille Letavernier <camille.letavernier@cea.fr>
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/plugin.xml11
-rw-r--r--plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ActiveEditorTracker.java9
-rw-r--r--plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ui/Activator.java12
3 files changed, 14 insertions, 18 deletions
diff --git a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/plugin.xml b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/plugin.xml
deleted file mode 100644
index 4df352efd9f..00000000000
--- a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/plugin.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.startup">
- <startup
- class="org.eclipse.papyrus.uml.xtext.integration.ActiveEditorTracker">
- </startup>
- </extension>
-
-</plugin>
diff --git a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ActiveEditorTracker.java b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ActiveEditorTracker.java
index 46e0a32c144..c51ba6b8de0 100644
--- a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ActiveEditorTracker.java
+++ b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ActiveEditorTracker.java
@@ -28,7 +28,6 @@ import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IPageListener;
import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IStartup;
import org.eclipse.ui.IWindowListener;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
@@ -47,7 +46,7 @@ import org.eclipse.ui.PlatformUI;
*
*/
public class ActiveEditorTracker implements IPageListener, IPartListener,
- IStartup, IWindowListener {
+ IWindowListener {
private static final String SINGLETON_MSG = "This class is a singleton and may only be instantiated once!";
@@ -131,11 +130,11 @@ public class ActiveEditorTracker implements IPageListener, IPartListener,
if (editor instanceof IEditingDomainProvider) {
domain = ((IEditingDomainProvider) editor).getEditingDomain();
} else if (editor.getAdapter(IEditingDomainProvider.class) != null) {
- domain = ((IEditingDomainProvider) editor
- .getAdapter(IEditingDomainProvider.class))
+ domain = editor
+ .getAdapter(IEditingDomainProvider.class)
.getEditingDomain();
} else if (editor.getAdapter(EditingDomain.class) != null) {
- domain = (EditingDomain) editor.getAdapter(EditingDomain.class);
+ domain = editor.getAdapter(EditingDomain.class);
}
if (domain == null) {
return null;
diff --git a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ui/Activator.java b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ui/Activator.java
index 72f479dc53b..d8216da34b8 100644
--- a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ui/Activator.java
+++ b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/ui/Activator.java
@@ -14,6 +14,8 @@
package org.eclipse.papyrus.uml.xtext.integration.ui;
import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.uml.xtext.integration.ActiveEditorTracker;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -36,7 +38,7 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
@Override
@@ -44,11 +46,17 @@ public class Activator extends AbstractUIPlugin {
super.start(context);
plugin = this;
log = new LogHelper(this);
+ System.out.println("Start");
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ new ActiveEditorTracker().earlyStartup();
+ }
+ });
}
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@Override

Back to the top