Author: rob.stryker(a)jboss.com
Date: 2012-03-02 06:11:42 -0500 (Fri, 02 Mar 2012)
New Revision: 39250
Modified:
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ExploreActionProvider.java
Log:
JBIDE-11080 to beta1 branch (exceptions in actions caused by multiple selection)
Modified:
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java 2012-03-02
11:02:42 UTC (rev 39249)
+++
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ShowInWebManagementActionProvider.java 2012-03-02
11:11:42 UTC (rev 39250)
@@ -29,7 +29,7 @@
protected boolean shouldAddForSelection(IStructuredSelection sel) {
IServer server = getSingleServer(sel);
- return accepts(server);
+ return server != null && accepts(server);
}
protected boolean accepts(IServer server) {
Modified:
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ExploreActionProvider.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ExploreActionProvider.java 2012-03-02
11:02:42 UTC (rev 39249)
+++
branches/jbosstools-3.3.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ExploreActionProvider.java 2012-03-02
11:11:42 UTC (rev 39250)
@@ -119,7 +119,7 @@
public void fillContextMenu(IMenuManager menu) {
if( getModuleServer() != null )
menu.insertBefore(ServerActionProvider.CONTROL_MODULE_SECTION_END_SEPARATOR,
exploreAction);
- else
+ else if( getServer() != null )
menu.insertBefore(ServerActionProvider.SERVER_ETC_SECTION_END_SEPARATOR,
exploreAction);
exploreAction.setEnabled(true);
}
@@ -147,8 +147,8 @@
ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
selection = (IStructuredSelection) wsSite.getSelectionProvider()
.getSelection();
- Object first = selection.getFirstElement();
- return first;
+ if( selection.size() == 1 )
+ return selection.getFirstElement();
}
return null;
}
Show replies by date