Author: scabanovich
Date: 2009-10-09 06:37:30 -0400 (Fri, 09 Oct 2009)
New Revision: 18001
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2-components.meta
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsfprojects.meta
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/handler/JSFProjectsRootRedirectHandler.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4999
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2-components.meta
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2-components.meta 2009-10-09
10:36:30 UTC (rev 18000)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2-components.meta 2009-10-09
10:37:30 UTC (rev 18001)
@@ -210,7 +210,10 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="id=true;save=always;category=general"
name="name" xmlname="name"/>
+ <XModelAttribute PROPERTIES="category=general"
name="displayName" xmlname="displayName"/>
<XModelAttribute PROPERTIES="category=general"
+ name="shortDescription" xmlname="shortDescription"/>
+ <XModelAttribute PROPERTIES="category=general"
name="method-signature" xmlname="method-signature"/>
<XModelAttribute PROPERTIES="category=general" name="default"
xmlname="default"/>
<XModelAttribute PROPERTIES="category=general" default="false"
@@ -221,6 +224,23 @@
</Constraint>
<Editor name="List"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="applyTo"
xmlname="applyTo"/>
+ <XModelAttribute PROPERTIES="category=general" default="false"
+ name="preferred" xmlname="preferred">
+ <Constraint loader="List">
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" default="false"
+ name="expert" xmlname="expert">
+ <Constraint loader="List">
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
<XModelAttribute TRIM="no" name="comment"
visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsfprojects.meta
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsfprojects.meta 2009-10-09
10:36:30 UTC (rev 18000)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsfprojects.meta 2009-10-09
10:37:30 UTC (rev 18001)
@@ -323,7 +323,7 @@
<XActionItem
HandlerClassName="org.jboss.tools.jsf.model.pv.handler.JSFProjectsRootRedirectHandler"
ICON="action.empty"
- PROPERTIES="actionpath=EclipseActions/RemoveModelNature"
+
PROPERTIES="actionpath=EclipseActions/RemoveModelNature;contribution=org.jboss.tools.jsf.model.handlers.RemoveJSFNatureContribution"
displayName="Remove JSF Capabilities" kind="action"
name="RemoveJSFNature"/>
<XActionItem kind="list" name="RootVerifyActions">
<XActionItem BaseActionName="VerifyAll" HIDE="disabled"
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/handler/JSFProjectsRootRedirectHandler.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/handler/JSFProjectsRootRedirectHandler.java 2009-10-09
10:36:30 UTC (rev 18000)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/handler/JSFProjectsRootRedirectHandler.java 2009-10-09
10:37:30 UTC (rev 18001)
@@ -10,8 +10,14 @@
******************************************************************************/
package org.jboss.tools.jsf.model.pv.handler;
+import java.util.Properties;
+
+import org.jboss.tools.common.meta.action.SpecialWizard;
import org.jboss.tools.common.meta.action.impl.handlers.*;
+import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.handlers.RemoveModelNatureHandler;
+import org.jboss.tools.common.model.util.ModelFeatureFactory;
public class JSFProjectsRootRedirectHandler extends DefaultRedirectHandler {
@@ -19,4 +25,13 @@
return source.getModel().getByPath("FileSystems");
}
+ public void executeHandler(XModelObject object, Properties p) throws XModelException
{
+ String c = action.getProperty(RemoveModelNatureHandler.PARAM_CONTRIBUTION);
+ if(c != null) {
+ SpecialWizard w =
(SpecialWizard)ModelFeatureFactory.getInstance().createFeatureInstance(c);
+ if(p == null) p = new Properties();
+ if(w != null) p.put(RemoveModelNatureHandler.PARAM_CONTRIBUTION, w);
+ }
+ super.executeHandler(object, p);
+ }
}