Author: snjeza
Date: 2012-04-17 17:11:14 -0400 (Tue, 17 Apr 2012)
New Revision: 40260
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/EditRuntimePathDialog.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
Log:
JBIDE-11568 - When you change a runtime search path no runtimes are found until you hit
Refresh
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/EditRuntimePathDialog.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/EditRuntimePathDialog.java 2012-04-17
21:07:08 UTC (rev 40259)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/EditRuntimePathDialog.java 2012-04-17
21:11:14 UTC (rev 40260)
@@ -94,11 +94,17 @@
if (path == null) {
return;
}
- Set<RuntimePath> runtimePaths2 = new HashSet<RuntimePath>();
- runtimePaths2.add(runtimePath);
- RuntimeUIActivator.refreshRuntimes(getShell(), runtimePaths2, null, true, 15);
+ runtimePath.setPath(path);
dialogSettings.put(RuntimeUIActivator.LASTPATH, path);
pathText.setText(path);
+// Set<RuntimePath> runtimePaths2 = new HashSet<RuntimePath>();
+// RuntimePath runtimePath2 = new RuntimePath(path);
+// runtimePath2.setScanOnEveryStartup(runtimePath.isScanOnEveryStartup());
+// runtimePaths2.add(runtimePath2);
+ RuntimeUIActivator.refreshRuntimes(getShell(), runtimePaths, treeViewer, false, 15);
+
+// runtimePath = runtimePath2;
+// runtimePaths = runtimePaths2;
}
});
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-04-17
21:07:08 UTC (rev 40259)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-04-17
21:11:14 UTC (rev 40260)
@@ -65,6 +65,7 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
@@ -384,7 +385,9 @@
}
}
}
- RuntimeUIActivator.refreshPreferencePage(getShell());
+ if (!getControl().isDisposed()) {
+ RuntimeUIActivator.refreshPreferencePage(getShell());
+ }
}
public void widgetDefaultSelected(SelectionEvent e) {
Show replies by date