Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java')
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java
index d27729b67..a3e5d6b05 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java
@@ -1,5 +1,6 @@
package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
@@ -9,11 +10,20 @@ import org.eclipse.ui.application.WorkbenchWindowAdvisor;
* the perspective id for the initial window.
*/
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
+
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
-
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.application.WorkbenchAdvisor#preStartup()
+ */
+ public void preStartup() {
+ if (P2Util.checkForUpdates())
+ PlatformUI.getWorkbench().restart();
+ }
+
public String getInitialWindowPerspectiveId() {
return Perspective.ID;
}

Back to the top