[jbosstools-commits] JBoss Tools SVN: r41356 - 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
Thu May 24 10:55:09 EDT 2012


Author: snjeza
Date: 2012-05-24 10:55:08 -0400 (Thu, 24 May 2012)
New Revision: 41356

Modified:
   trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
Log:
JBDS-2135 - Paths added during installation are not added when JBDS starts with existing workspace

Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java	2012-05-24 13:40:53 UTC (rev 41355)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java	2012-05-24 14:55:08 UTC (rev 41356)
@@ -18,6 +18,8 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IStartup;
@@ -38,8 +40,11 @@
 		if ("true".equals(skipRuntimeScanner)) {
 			return;
 		}
-		final boolean firstStart = RuntimeUIActivator.getDefault().
+		boolean firstStartWorkspace = RuntimeUIActivator.getDefault().
 			getPreferenceStore().getBoolean(RuntimeUIActivator.FIRST_START);
+		IEclipsePreferences configurationNode = ConfigurationScope.INSTANCE.getNode(RuntimeUIActivator.PLUGIN_ID);
+		boolean firstStartConfiguration =	configurationNode.getBoolean(RuntimeUIActivator.FIRST_START, true);
+		final boolean firstStart = firstStartWorkspace || firstStartConfiguration;
 		Job runtimeJob = new Job("Searching runtimes...") {
 			
 			@Override
@@ -77,6 +82,7 @@
 		runtimeJob.schedule(1000);
 		
 		RuntimeUIActivator.getDefault().getPreferenceStore().setValue(RuntimeUIActivator.FIRST_START, false);
+		configurationNode.putBoolean(RuntimeUIActivator.FIRST_START, false);
 	}
 
 	private boolean runtimeExists(boolean firstStart, IProgressMonitor monitor) {



More information about the jbosstools-commits mailing list