[jbosstools-commits] JBoss Tools SVN: r43606 - trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Sep 11 14:59:35 EDT 2012


Author: snjeza
Date: 2012-09-11 14:59:35 -0400 (Tue, 11 Sep 2012)
New Revision: 43606

Modified:
   trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
   trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeWorkbenchUtils.java
Log:
JBIDE-12578 - Runtime FrameworkEvent ERROR

Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java	2012-09-11 17:34:39 UTC (rev 43605)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java	2012-09-11 18:59:35 UTC (rev 43606)
@@ -91,7 +91,6 @@
 		plugin = this;
 		this.context = context;
 		RuntimeCoreActivator.getDefault().setDownloader(new DownloadRuntimes());
-		runtimeModel = new RuntimeModel(getPreferences());
 	}
 
 	/*
@@ -116,6 +115,9 @@
 	}
 
 	public RuntimeModel getModel() {
+		if (runtimeModel == null) {
+			runtimeModel = new RuntimeModel(getPreferences());
+		}
 		return runtimeModel;
 	}
 	
@@ -189,7 +191,7 @@
 	}
 	
 	public List<RuntimeDefinition> getServerDefinitions() {
-		return RuntimeModelUtil.getRuntimeDefinitions(runtimeModel.getRuntimePaths());
+		return RuntimeModelUtil.getRuntimeDefinitions(getModel().getRuntimePaths());
 	}
 
 	public Set<IRuntimeDetector> getRuntimeDetectors() {

Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeWorkbenchUtils.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeWorkbenchUtils.java	2012-09-11 17:34:39 UTC (rev 43605)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeWorkbenchUtils.java	2012-09-11 18:59:35 UTC (rev 43606)
@@ -24,7 +24,7 @@
 	}
 	
 	public static void refreshPreferencePage(final Shell shell) {
-		Display.getCurrent().asyncExec(new Runnable() {
+		Display.getDefault().asyncExec(new Runnable() {
 			public void run() {
 				refreshPreferencePageUIThread(shell);
 			}



More information about the jbosstools-commits mailing list