Author: rob.stryker(a)jboss.com
Date: 2007-09-26 20:50:58 -0400 (Wed, 26 Sep 2007)
New Revision: 3832
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
Log:
change to updating of view to fix bug where viewer wouldnt update properly.
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-09-26
23:56:32 UTC (rev 3831)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-09-27
00:50:58 UTC (rev 3832)
@@ -19,6 +19,7 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.PageBook;
@@ -437,5 +438,10 @@
}
}
+ public boolean elementInTree(Object element) {
+ Widget[] w = super.findItems(element);
+ return w != null && w.length > 0;
+ }
+
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-09-26
23:56:32 UTC (rev 3831)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-09-27
00:50:58 UTC (rev 3832)
@@ -13,6 +13,7 @@
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.preferencepages.ViewProviderPreferenceComposite;
+import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView;
import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer.ContentWrapper;
@@ -89,7 +90,12 @@
if( o == null || o == provider ) {
JBossServerView.getDefault().getExtensionFrame().getViewer().refresh(provider);
} else {
- JBossServerView.getDefault().getExtensionFrame().getViewer().refresh(new
ContentWrapper(o, provider));
+ ExtensionTableViewer viewer =
JBossServerView.getDefault().getExtensionFrame().getViewer();
+ ContentWrapper wrapped = new ContentWrapper(o, provider);
+ if( viewer.elementInTree(wrapped))
+ viewer.refresh(new ContentWrapper(o, provider));
+ else
+ viewer.refresh(provider);
}
} catch(Exception e) {
}
Show replies by date