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

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Sep 25 08:38:34 EDT 2012


Author: snjeza
Date: 2012-09-25 08:38:34 -0400 (Tue, 25 Sep 2012)
New Revision: 43989

Modified:
   trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
Log:
JBIDE-12703 - Adding the runtime detection path manually

Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java	2012-09-25 11:25:12 UTC (rev 43988)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java	2012-09-25 12:38:34 UTC (rev 43989)
@@ -54,7 +54,6 @@
 import org.eclipse.swt.custom.TableEditor;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -79,6 +78,7 @@
 import org.jboss.tools.runtime.core.model.RuntimePath;
 import org.jboss.tools.runtime.ui.RuntimeSharedImages;
 import org.jboss.tools.runtime.ui.RuntimeUIActivator;
+import org.jboss.tools.runtime.ui.RuntimeWorkbenchUtils;
 import org.jboss.tools.runtime.ui.dialogs.AutoResizeTableLayout;
 import org.jboss.tools.runtime.ui.dialogs.EditRuntimePathDialog;
 import org.jboss.tools.runtime.ui.dialogs.RuntimePathEditingSupport;
@@ -260,6 +260,7 @@
 					public void run() {
 						if (runtimePathChangeListener != null) {
 							viewer.setInput(RuntimeUIActivator.getRuntimePaths());
+							viewer.refresh();
 						}
 					}
 				});
@@ -452,10 +453,10 @@
 				}
 			}
 		}
-		// IS THIS NEEDED?!?!
-//		if (!getControl().isDisposed()) {
-//			RuntimeWorkbenchUtils.refreshPreferencePageUIThread(getShell());
-//		}
+		
+		if (!getControl().isDisposed()) {
+			RuntimeWorkbenchUtils.refreshPreferencePageUIThread(getShell());
+		}
 	}
 
 	
@@ -595,7 +596,9 @@
 
 	@Override
 	protected void performApply() {
+		RuntimeUIActivator.getDefault().getModel().setRuntimePaths(runtimePaths);
 		RuntimeUIActivator.getDefault().saveRuntimePreferences();
+		super.performApply();
 	}
 
 	@Override



More information about the jbosstools-commits mailing list