Author: scabanovich
Date: 2009-01-11 06:46:21 -0500 (Sun, 11 Jan 2009)
New Revision: 12980
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/AddJSFCapabilitiesSupport.java
Log:
JBIDE-3486
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/AddJSFCapabilitiesSupport.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/AddJSFCapabilitiesSupport.java 2009-01-11
11:38:59 UTC (rev 12979)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/AddJSFCapabilitiesSupport.java 2009-01-11
11:46:21 UTC (rev 12980)
@@ -11,6 +11,7 @@
package org.jboss.tools.jsf.project.capabilities;
import java.lang.reflect.InvocationTargetException;
+import java.util.Properties;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -132,4 +133,24 @@
return count;
}
+ public boolean isActionEnabled(String name) {
+ if(getStepId() == 0 && FINISH.equals(name)) {
+ IPerformerItem[] cs = performer.getChildren();
+ for (int i = 0; i < cs.length; i++) {
+ if(hasSelected(cs[i])) return true;
+ }
+ return false;
+ }
+ return super.isActionEnabled(name);
+ }
+
+ boolean hasSelected(IPerformerItem item) {
+ if(!item.isSelected()) return false;
+ IPerformerItem[] cs = item.getChildren();
+ if(cs.length == 0) return true;
+ for (int i = 0; i < cs.length; i++) {
+ if(hasSelected(cs[i])) return true;
+ }
+ return false;
+ }
}
Show replies by date