Author: elvisisking
Date: 2010-09-20 11:20:47 -0400 (Mon, 20 Sep 2010)
New Revision: 25026
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java
Log:
JBIDE-6978 NPE Double-clicking on repository in ModeShape view. One way this was happening
is when a double-click occurred when multiple repositories were selected. Changed
double-click handler to make sure the edit action is enabled before calling the
action.run() method.
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java
===================================================================
---
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java 2010-09-20
14:15:53 UTC (rev 25025)
+++
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java 2010-09-20
15:20:47 UTC (rev 25026)
@@ -251,7 +251,9 @@
* Opens a dialog to edit server properties.
*/
void handleDoubleClick() {
- this.editAction.run();
+ if (this.editAction.isEnabled()) {
+ this.editAction.run();
+ }
}
/**
@@ -293,7 +295,7 @@
/**
* {@inheritDoc}
- *
+ *
* @see
org.jboss.tools.modeshape.rest.IServerRegistryListener#serverRegistryChanged(org.jboss.tools.modeshape.rest.ServerRegistryEvent)
*/
@Override
Show replies by date