JBoss Tools SVN: r21593 - branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 11:12:54 -0400 (Wed, 21 Apr 2010)
New Revision: 21593
Modified:
branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts-menu.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-6037
Modified: branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts-menu.properties
===================================================================
--- branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts-menu.properties 2010-04-21 15:02:20 UTC (rev 21592)
+++ branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts-menu.properties 2010-04-21 15:12:54 UTC (rev 21593)
@@ -13,7 +13,7 @@
Struts.OpenPage.menu=Open Page
Struts.SelectTile.menu=Open Tile Definition
Struts.OpenSource.menu=Open Declaration
-Struts.OpenSourceForm.menu=Open Declaration
+Struts.OpenSourceForm.menu=Open Form-bean Source
Struts.RenamePage.menu=Rename Page...
Struts.CreateSetProperty.menu=Create Property...
Struts.CreateLink.menu=Create Link...
@@ -35,10 +35,6 @@
Struts.CreateMessageResources.menu=Define Message Resources...
Struts.CreatePlugin.menu=Create Plug-in...
Struts.CreateSpecialPlugin.menu=Create Special Plug-in
-Struts.Plugin0.menu=
-Struts.Plugin1.menu=
-Struts.Plugin2.menu=
-Struts.Plugin3.menu=
Struts.SynchronizeModules.menu=Modules Configuration
Struts.CreateStrutsConfig11.menu=Struts Config
Struts.CreateFileProperties.menu=Properties File...
14 years, 8 months
JBoss Tools SVN: r21592 - in branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core: resources/meta and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 11:02:20 -0400 (Wed, 21 Apr 2010)
New Revision: 21592
Added:
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
Modified:
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/plugin.xml
branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
https://jira.jboss.org/jira/browse/JBIDE-6118
Modified: branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/plugin.xml
===================================================================
--- branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2010-04-21 14:47:45 UTC (rev 21591)
+++ branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/plugin.xml 2010-04-21 15:02:20 UTC (rev 21592)
@@ -40,6 +40,8 @@
class="org.jboss.tools.esb.core.model.impl.FTPMessageFilterImpl"/>
<xclass id="org.jboss.tools.esb.core.model.impl.ContentBasedRouter"
class="org.jboss.tools.esb.core.model.impl.ContentBasedRouter"/>
+ <xclass id="org.jboss.tools.esb.core.model.impl.BusinessRulesProcessor"
+ class="org.jboss.tools.esb.core.model.impl.BusinessRulesProcessor"/>
<xclass id="org.jboss.tools.esb.core.model.handlers.AddProviderSupport"
class="org.jboss.tools.esb.core.model.handlers.AddProviderSupport"/>
Modified: branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2010-04-21 14:47:45 UTC (rev 21591)
+++ branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2010-04-21 15:02:20 UTC (rev 21592)
@@ -198,7 +198,7 @@
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
- name="process definition name" xmlname="processdefinition"/>
+ name="process definition name" xmlname="process-definition-name"/>
<XModelAttribute PROPERTIES="pre=true;category=general"
name="process definition id" xmlname="process-definition-id"/>
<XModelAttribute PROPERTIES="pre=true;category=general" name="actor" xmlname="actor"/>
@@ -244,7 +244,8 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
- <XModelEntity ImplementingClass="%ESB%"
+ <XModelEntity
+ ImplementingClass="org.jboss.tools.esb.core.model.impl.BusinessRulesProcessor"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.esb.ui.editor.form.ESBXMLFormLayoutData;children=%EntityOrdered%"
XMLSUBPATH="action" name="ESBPreActionBusinessRulesProcessor101">
<XChildrenEntities>
@@ -272,7 +273,7 @@
name="rule set" xmlname="ruleSet">
<Constraint loader="Tree">
<value name="ESBResourceTree"/>
- <value name="extensions=drl"/>
+ <value name="extensions=drl,dslr"/>
<value name="linkAction=OpenRuleSet"/>
</Constraint>
<Editor name="TreeChooser"/>
@@ -280,6 +281,24 @@
<XModelAttribute PROPERTIES="category=general;pre=true"
name="rule language" xmlname="ruleLanguage"/>
<XModelAttribute PROPERTIES="pre=true;category=general"
+ name="rule agent properties" xmlname="ruleAgentProperties">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=properties"/>
+ <value name="linkAction=OpenRuleAgent"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
+ name="decision table" xmlname="decisionTable">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=xls"/>
+ <value name="linkAction=OpenDecisionTable"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general"
default="Default(false)" name="rule reload" xmlname="ruleReload">
<Constraint loader="ListString">
<value name="Default(false)"/>
@@ -313,6 +332,16 @@
HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
ICON="action.empty" PROPERTIES="actionpath=Open;attribute=rule set"
displayName="Open Rule Set" kind="action" name="OpenRuleSet"/>
+ <XActionItem
+ HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=Open;attribute=decision table"
+ displayName="Open Decision Table" kind="action" name="OpenDecisionTable"/>
+ <XActionItem
+ HandlerClassName="org.jboss.tools.esb.core.model.handlers.OpenESBResourceHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=Open;attribute=rule agent properties"
+ displayName="Open Rule Agent Properties" kind="action" name="OpenRuleAgent"/>
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
@@ -1019,6 +1048,8 @@
default="org.jboss.soa.esb.actions.routing.JMSRouter" name="class" xmlname="class">
<Editor name="Uneditable"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="pre=true;category=general;save=always"
+ name="jndi name" xmlname="jndiName"/>
<XModelAttribute PROPERTIES="pre=true;category=general"
name="jndi context factory" xmlname="jndi-context-factory">
<Editor name="AccessibleJava"/>
@@ -1054,7 +1085,7 @@
<XModelAttribute PROPERTIES="pre=true;category=advanced"
name="security principal" xmlname="security-principal"/>
<XModelAttribute PROPERTIES="pre=true;category=advanced"
- name="security credentials" xmlname="security-credentials"/>
+ name="security credential" xmlname="security-credential"/>
<XModelAttribute PROPERTIES="pre=true;category=advanced"
name="property strategy" xmlname="property-strategy"/>
<XModelAttribute PROPERTIES="pre=true;category=advanced"
@@ -3426,7 +3457,8 @@
<EntityData EntityName="ESBPreActionBusinessRulesProcessor101">
<AttributeData AttributeName="name"/>
<AttributeData AttributeName="process" Mandatory="no"/>
- <AttributeData AttributeName="rule set"/>
+ <AttributeData AttributeName="rule set" Mandatory="no"/>
+ <AttributeData AttributeName="rule agent properties" Mandatory="no"/>
</EntityData>
</XActionItem>
</XActionItem>
Added: branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
===================================================================
--- branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java (rev 0)
+++ branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java 2010-04-21 15:02:20 UTC (rev 21592)
@@ -0,0 +1,40 @@
+package org.jboss.tools.esb.core.model.impl;
+
+import org.jboss.tools.esb.core.model.ESBCustomizedObjectImpl;
+
+public class BusinessRulesProcessor extends ESBCustomizedObjectImpl {
+ private static final long serialVersionUID = 1L;
+ public static String ATTR_RULE_AGENT_PROPERTIES = "rule agent properties";
+ public static String ATTR_DECISION_TABLE = "decision table";
+
+ static int RULE_SET_BASED = 0;
+ static int RULE_AGENT_BASED = 1;
+ static int DECISION_TABLE_BASED = 2;
+
+ public BusinessRulesProcessor() {}
+
+ @Override
+ public boolean isAttributeEditable(String name) {
+ if(ContentBasedRouter.ATTR_RULE_SET.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == RULE_SET_BASED;
+ } else if(ATTR_RULE_AGENT_PROPERTIES.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == RULE_AGENT_BASED;
+ } else if(ATTR_DECISION_TABLE.equals(name)) {
+ int kind = getKind();
+ return kind < 0 || kind == DECISION_TABLE_BASED;
+ }
+ return super.isAttributeEditable(name);
+ }
+
+ int getKind() {
+ String ruleSet = getAttributeValue(ContentBasedRouter.ATTR_RULE_SET);
+ if(ruleSet != null && ruleSet.length() > 0) return RULE_SET_BASED;
+ String ruleAgent = getAttributeValue(ATTR_RULE_AGENT_PROPERTIES);
+ if(ruleAgent != null && ruleAgent.length() > 0) return RULE_AGENT_BASED;
+ String decisionTable = getAttributeValue(ATTR_DECISION_TABLE);
+ if(decisionTable != null && decisionTable.length() > 0) return DECISION_TABLE_BASED;
+ return -1;
+ }
+}
Property changes on: branches/jbosstools-3.1.x/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/impl/BusinessRulesProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 8 months
JBoss Tools SVN: r21591 - branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 10:47:45 -0400 (Wed, 21 Apr 2010)
New Revision: 21591
Modified:
branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/MetaLibLoader.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6091
Modified: branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/MetaLibLoader.java
===================================================================
--- branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/MetaLibLoader.java 2010-04-21 14:44:45 UTC (rev 21590)
+++ branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/MetaLibLoader.java 2010-04-21 14:47:45 UTC (rev 21591)
@@ -24,6 +24,9 @@
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;
+import org.apache.xerces.xni.XMLResourceIdentifier;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLInputSource;
import org.jboss.tools.common.CommonPlugin;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.*;
@@ -257,8 +260,20 @@
SAXValidator.setFeature(parserInstance, VALIDATION_DYNAMIC_FEATURE_ID, false);
SAXValidator.setFeature(parserInstance, FATAL_ERROR_PROCESSING_FEATURE_ID, false);
+ class EmptyHandler implements org.apache.xerces.xni.parser.XMLEntityResolver {
+
+ public XMLInputSource resolveEntity(XMLResourceIdentifier id)
+ throws XNIException, IOException {
+ return new XMLInputSource(id.getPublicId(), id.getBaseSystemId(), id.getBaseSystemId(), new StringReader(""), null);
+ }
+
+ }
try {
- parserInstance.setProperty(ENTITY_RESOLVER_PROPERTY_ID, new XMLEntityResolverImpl());
+ if(MetaLibLoader.validateMetaXML) {
+ parserInstance.setProperty(ENTITY_RESOLVER_PROPERTY_ID, new XMLEntityResolverImpl());
+ } else {
+ parserInstance.setProperty(ENTITY_RESOLVER_PROPERTY_ID, new EmptyHandler());
+ }
} catch (SAXException e1) {
CommonPlugin.getPluginLog().logError( e1.getMessage()+"", e1); //$NON-NLS-1$
}
14 years, 8 months
JBoss Tools SVN: r21590 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 10:44:45 -0400 (Wed, 21 Apr 2010)
New Revision: 21590
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/MetaLibLoader.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6091
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/MetaLibLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/MetaLibLoader.java 2010-04-21 14:36:26 UTC (rev 21589)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/MetaLibLoader.java 2010-04-21 14:44:45 UTC (rev 21590)
@@ -24,6 +24,9 @@
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;
+import org.apache.xerces.xni.XMLResourceIdentifier;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLInputSource;
import org.jboss.tools.common.CommonPlugin;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.*;
@@ -257,8 +260,20 @@
SAXValidator.setFeature(parserInstance, VALIDATION_DYNAMIC_FEATURE_ID, false);
SAXValidator.setFeature(parserInstance, FATAL_ERROR_PROCESSING_FEATURE_ID, false);
+ class EmptyHandler implements org.apache.xerces.xni.parser.XMLEntityResolver {
+
+ public XMLInputSource resolveEntity(XMLResourceIdentifier id)
+ throws XNIException, IOException {
+ return new XMLInputSource(id.getPublicId(), id.getBaseSystemId(), id.getBaseSystemId(), new StringReader(""), null);
+ }
+
+ }
try {
- parserInstance.setProperty(ENTITY_RESOLVER_PROPERTY_ID, new XMLEntityResolverImpl());
+ if(MetaLibLoader.validateMetaXML) {
+ parserInstance.setProperty(ENTITY_RESOLVER_PROPERTY_ID, new XMLEntityResolverImpl());
+ } else {
+ parserInstance.setProperty(ENTITY_RESOLVER_PROPERTY_ID, new EmptyHandler());
+ }
} catch (SAXException e1) {
CommonPlugin.getPluginLog().logError( e1.getMessage()+"", e1); //$NON-NLS-1$
}
14 years, 8 months
JBoss Tools SVN: r21589 - branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 10:36:26 -0400 (Wed, 21 Apr 2010)
New Revision: 21589
Modified:
branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/TLDUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5926
Modified: branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/TLDUtil.java
===================================================================
--- branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/TLDUtil.java 2010-04-21 14:28:44 UTC (rev 21588)
+++ branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/TLDUtil.java 2010-04-21 14:36:26 UTC (rev 21589)
@@ -17,8 +17,8 @@
static String TAG_ENTITIES = ".TLDTag.TLDTag12.TLDTag20.TLDTag21."; //$NON-NLS-1$
static String ATTR_ENTITIES = ".TLDAttribute.TLDAttribute12.TLDAttribute20.TLDAttribute2F."; //$NON-NLS-1$
- static String FACELET_TAGLIB_ENTITIES = ".FileFaceletTaglib."; //$NON-NLS-1$
- static String FACELET_TAG_ENTITIES = ".FaceletTaglibTag."; //$NON-NLS-1$
+ static String FACELET_TAGLIB_ENTITIES = ".FileFaceletTaglib.FileFaceletTaglib20."; //$NON-NLS-1$
+ static String FACELET_TAG_ENTITIES = ".FaceletTaglibTag.FaceletTaglibTag20."; //$NON-NLS-1$
public static boolean isTaglib(XModelObject o) {
return isOfEntity(o, FILE_ENTITIES);
14 years, 8 months
JBoss Tools SVN: r21588 - branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 10:28:44 -0400 (Wed, 21 Apr 2010)
New Revision: 21588
Modified:
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5941
Modified: branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2010-04-21 14:24:03 UTC (rev 21587)
+++ branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2010-04-21 14:28:44 UTC (rev 21588)
@@ -454,6 +454,13 @@
</el-resolver>
</extension>
<extension
+ point="org.jboss.tools.common.el.core.elResolver">
+ <el-resolver id="ccAttrsELResolver">
+ <project-nature id="org.jboss.tools.jsf.jsfnature"
+ resolver-class="org.jboss.tools.jsf.model.JSF2CCAttrsELCompletionEngine"/>
+ </el-resolver>
+ </extension>
+ <extension
point="org.jboss.tools.common.model.modelnatures">
<modelnature
name="org.jboss.tools.jsf.jsfnature"
14 years, 8 months
JBoss Tools SVN: r21587 - branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 10:24:03 -0400 (Wed, 21 Apr 2010)
New Revision: 21587
Added:
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5941
Added: branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
===================================================================
--- branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java (rev 0)
+++ branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java 2010-04-21 14:24:03 UTC (rev 21587)
@@ -0,0 +1,509 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.model;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.common.el.core.ca.AbstractELCompletionEngine;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.model.ELObjectType;
+import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
+import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.common.el.core.resolver.ELResolution;
+import org.jboss.tools.common.el.core.resolver.ELResolutionImpl;
+import org.jboss.tools.common.el.core.resolver.ELSegmentImpl;
+import org.jboss.tools.common.el.core.resolver.IVariable;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector.MemberInfo;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.jsf.JSFModelPlugin;
+
+/**
+ *
+ * @author V. Kabanovich
+ *
+ */
+public class JSF2CCAttrsELCompletionEngine extends AbstractELCompletionEngine<IVariable> {
+ private static final Image JSF2_EL_CC_ATTRS_PROPOSAL_IMAGE = JSFModelPlugin.getDefault().getImage(JSFModelPlugin.CA_JSF_MESSAGES_IMAGE_PATH);
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.ca.AbstractELCompletionEngine#getELProposalImage()
+ */
+ public Image getELProposalImage() {
+ return JSF2_EL_CC_ATTRS_PROPOSAL_IMAGE;
+ }
+
+ private static ELParserFactory factory = ELParserUtil.getDefaultFactory();
+
+ public JSF2CCAttrsELCompletionEngine() {}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.resolver.ELResolver#getParserFactory()
+ */
+ public ELParserFactory getParserFactory() {
+ return factory;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.ca.AbstractELCompletionEngine#log(java.lang.Exception)
+ */
+ protected void log(Exception e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.resolver.ELResolver2#getProposals(org.jboss.tools.common.el.core.resolver.ELContext, java.lang.String)
+ */
+ public List<TextProposal> getProposals(ELContext context, String el, int offset) {
+ return getCompletions(el, false, 0, context);
+ }
+
+ public List<TextProposal> getCompletions(String elString,
+ boolean returnEqualedVariablesOnly, int position, ELContext context) {
+ IDocument document = null;
+
+ List<TextProposal> proposals = null;
+ try {
+ proposals = getCompletions(context.getResource(), document, elString.subSequence(0, elString.length()), position, returnEqualedVariablesOnly);
+ } catch (StringIndexOutOfBoundsException e) {
+ log(e);
+ } catch (BadLocationException e) {
+ log(e);
+ }
+ return proposals;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.resolver.ELResolver2#resolve(org.jboss.tools.common.el.core.resolver.ELContext, org.jboss.tools.common.el.core.model.ELExpression)
+ */
+ public ELResolution resolve(ELContext context, ELExpression operand, int offset) {
+ ELResolutionImpl resolution = resolveELOperand(operand, context, true);
+ if(resolution != null)
+ resolution.setContext(context);
+ return resolution;
+ }
+
+ public ELResolutionImpl resolveELOperand(ELExpression operand,
+ ELContext context, boolean returnEqualedVariablesOnly) {
+ try {
+ return resolveELOperand(context.getResource(), operand, returnEqualedVariablesOnly);
+ } catch (StringIndexOutOfBoundsException e) {
+ log(e);
+ } catch (BadLocationException e) {
+ log(e);
+ }
+ return null;
+ }
+
+ public List<TextProposal> getCompletions(IFile file, IDocument document, CharSequence prefix,
+ int position, boolean returnEqualedVariablesOnly) throws BadLocationException, StringIndexOutOfBoundsException {
+ List<TextProposal> completions = new ArrayList<TextProposal>();
+
+ ELResolutionImpl status = resolveELOperand(file, parseOperand("" + prefix), returnEqualedVariablesOnly); //$NON-NLS-1$
+ completions.addAll(status.getProposals());
+
+ return completions;
+ }
+
+ public ELResolutionImpl resolveELOperand(IFile file,
+ ELExpression operand, boolean returnEqualedVariablesOnly)
+ throws BadLocationException, StringIndexOutOfBoundsException {
+ if(!(operand instanceof ELInvocationExpression) || file == null) {
+ return null;
+ }
+
+ ELInvocationExpression expr = (ELInvocationExpression)operand;
+ boolean isIncomplete = expr.getType() == ELObjectType.EL_PROPERTY_INVOCATION
+ && ((ELPropertyInvocation)expr).getName() == null;
+ boolean isArgument = expr.getType() == ELObjectType.EL_ARGUMENT_INVOCATION;
+
+ ELResolutionImpl resolution = new ELResolutionImpl(expr);
+ ELInvocationExpression left = expr;
+
+ List<IVariable> resolvedVariables = new ArrayList<IVariable>();
+
+ if (expr.getLeft() != null && isArgument) {
+ left = expr.getLeft();
+ resolvedVariables = resolveVariablesInternal(file, left, false,
+ true); // is Final and equal names are because of
+ // we have no more to resolve the parts of expression,
+ // but we have to resolve arguments of probably a message component
+ } else if (expr.getLeft() == null && isIncomplete) {
+ resolvedVariables = resolveVariablesInternal(file, expr, true,
+ returnEqualedVariablesOnly);
+ } else {
+ while(left != null) {
+ List<IVariable>resolvedVars = new ArrayList<IVariable>();
+ resolvedVars = resolveVariablesInternal(file,
+ left, left == expr,
+ returnEqualedVariablesOnly);
+ if (resolvedVars != null && !resolvedVars.isEmpty()) {
+ resolvedVariables = resolvedVars;
+ resolution.setLastResolvedToken(left);
+
+ ELSegmentImpl segment = new ELSegmentImpl();
+ segment.setToken(left.getFirstToken());
+ segment.setResolved(true);
+ resolution.addSegment(segment);
+
+ break;
+ }
+ left = (ELInvocationExpression)left.getLeft();
+ }
+ }
+
+ if (resolution.getLastResolvedToken() == null &&
+ !returnEqualedVariablesOnly &&
+ expr != null &&
+ isIncomplete) {
+ // no vars are resolved
+ // the tokens are the part of var name ended with a separator (.)
+ resolvedVariables = resolveVariablesInternal(file, expr, true, returnEqualedVariablesOnly);
+ Set<TextProposal> proposals = new TreeSet<TextProposal>(TextProposal.KB_PROPOSAL_ORDER);
+
+ ELSegmentImpl segment = new ELSegmentImpl();
+ segment.setToken(expr.getFirstToken());
+ segment.setResolved(false);
+ resolution.addSegment(segment);
+
+ for (IVariable var : resolvedVariables) {
+ String varName = var.getName();
+ if(varName.startsWith(operand.getText())) {
+ TextProposal proposal = new TextProposal();
+ proposal.setReplacementString(varName.substring(operand.getLength()));
+ setImage(proposal);
+ proposals.add(proposal);
+ }
+ }
+ resolution.setProposals(proposals);
+ segment.setResolved(!proposals.isEmpty());
+ return resolution;
+ }
+
+ // Here we have a list of vars for some part of expression
+ // OK. we'll proceed with members of these vars
+ if (resolution.getLastResolvedToken() == operand) {
+ // First segment is the last one
+ Set<TextProposal> proposals = new TreeSet<TextProposal>(TextProposal.KB_PROPOSAL_ORDER);
+ ELSegmentImpl segment = new ELSegmentImpl();
+ segment.setToken(operand.getFirstToken());
+ segment.setResolved(true);
+ resolution.addSegment(segment);
+
+ for (IVariable var : resolvedVariables) {
+ String varName = var.getName();
+ if(operand.getLength()<=varName.length()) {
+ TextProposal proposal = new TextProposal();
+ proposal.setReplacementString(varName.substring(operand.getLength()));
+ proposal.setLabel(varName);
+ setImage(proposal);
+ proposals.add(proposal);
+ } else if(returnEqualedVariablesOnly) {
+ TextProposal proposal = new TextProposal();
+ proposal.setReplacementString(varName);
+ proposal.setLabel(varName);
+ setImage(proposal);
+ proposals.add(proposal);
+ }
+ segment.getVariables().add(var);
+ }
+ resolution.setLastResolvedToken(expr);
+ resolution.setProposals(proposals);
+ return resolution;
+ }
+
+ //process segments one by one
+ if(left != null) {
+ while(left != expr) {
+ left = (ELInvocationExpression)left.getParent();
+ if (left != expr) { // inside expression
+ ELSegmentImpl segment = new ELSegmentImpl();
+ segment = new ELSegmentImpl();
+ segment.setResolved(true);
+ resolution.addSegment(segment);
+ resolution.setLastResolvedToken(left);
+ return resolution;
+ } else { // Last segment
+ resolveLastSegment((ELInvocationExpression)operand, resolvedVariables, resolution, returnEqualedVariablesOnly);
+ break;
+ }
+ }
+ } else {
+ ELSegmentImpl segment = new ELSegmentImpl();
+ segment.setToken(expr.getFirstToken());
+ resolution.addSegment(segment);
+ }
+
+ return resolution;
+ }
+
+ public List<IVariable> resolveVariablesInternal(IFile file, ELInvocationExpression expr, boolean isFinal, boolean onlyEqualNames) {
+ List<IVariable> result = new ArrayList<IVariable>();
+
+ XModelObject o = EclipseResourceUtil.createObjectForResource(file);
+ if(o == null) return result;
+ if(!"FileJSF2Component".equals(o.getModelEntity().getName())) return result;
+
+ String varName = expr.toString();
+ String[] vs = {"cc.attrs", "compositeComponent.attrs"};
+ for (int i = 0; i < vs.length; i++) {
+ String name = vs[i];
+ if(!isFinal || onlyEqualNames) {
+ if(!name.equals(varName)) continue;
+ }
+ if(!name.startsWith(varName)) continue;
+ Variable v = new Variable(name, file);
+ result.add(v);
+ break;
+ }
+ return result;
+ }
+
+ protected void setImage(TextProposal kbProposal) {
+ kbProposal.setImage(getELProposalImage());
+ }
+
+ protected void resolveLastSegment(ELInvocationExpression expr,
+ List<IVariable> members,
+ ELResolutionImpl resolution,
+ boolean returnEqualedVariablesOnly) {
+ Set<TextProposal> kbProposals = new TreeSet<TextProposal>(TextProposal.KB_PROPOSAL_ORDER);
+
+ ELSegmentImpl segment = new ELSegmentImpl();
+ resolution.setProposals(kbProposals);
+ if(expr instanceof ELPropertyInvocation) {
+ segment.setToken(((ELPropertyInvocation)expr).getName());
+ } else {
+ segment.setToken(expr.getFirstToken());
+ }
+
+ if(segment.getToken()!=null) {
+ resolution.addSegment(segment);
+ }
+
+ if (expr.getType() == ELObjectType.EL_PROPERTY_INVOCATION && ((ELPropertyInvocation)expr).getName() == null) {
+ // return all the methods + properties
+ for (IVariable mbr : members) {
+ processSingularMember(mbr, kbProposals);
+ }
+ } else
+ if(expr.getType() != ELObjectType.EL_ARGUMENT_INVOCATION) {
+ Set<String> proposalsToFilter = new TreeSet<String>();
+ for (IVariable mbr : members) {
+ filterSingularMember(mbr, proposalsToFilter);
+ }
+ for (String proposal : proposalsToFilter) {
+ // We do expect nothing but name for method tokens (No round brackets)
+ String filter = expr.getMemberName();
+ if(filter == null) filter = ""; //$NON-NLS-1$
+ if(returnEqualedVariablesOnly) {
+ // This is used for validation.
+ if (proposal.equals(filter)) {
+ TextProposal kbProposal = new TextProposal();
+ kbProposal.setReplacementString(proposal);
+ kbProposal.setLabel(proposal);
+ setImage(kbProposal);
+
+ kbProposals.add(kbProposal);
+
+ break;
+ }
+ } else if (proposal.startsWith(filter)) {
+ // This is used for CA.
+ TextProposal kbProposal = new TextProposal();
+ kbProposal.setReplacementString(proposal.substring(filter.length()));
+ kbProposal.setLabel(proposal);
+ kbProposal.setImage(getELProposalImage());
+
+ kbProposals.add(kbProposal);
+ }
+ }
+ } else if(expr.getType() == ELObjectType.EL_ARGUMENT_INVOCATION) {
+ Set<String> proposalsToFilter = new TreeSet<String>();
+ boolean isMessages = false;
+ for (IVariable mbr : members) {
+ isMessages = true;
+ filterSingularMember(mbr, proposalsToFilter);
+ }
+
+ String filter = expr.getMemberName();
+ boolean bSurroundWithQuotes = false;
+ if(filter == null) {
+ filter = ""; //$NON-NLS-1$
+ bSurroundWithQuotes = true;
+ } else {
+ boolean b = filter.startsWith("'") || filter.startsWith("\""); //$NON-NLS-1$ //$NON-NLS-2$
+ boolean e = filter.endsWith("'") || filter.endsWith("\""); //$NON-NLS-1$ //$NON-NLS-2$
+ if((b) && (e)) {
+ filter = filter.length() == 1 ? "" : filter.substring(1, filter.length() - 1); //$NON-NLS-1$
+ } else if(b && !returnEqualedVariablesOnly) {
+ filter = filter.substring(1);
+ } else {
+ //Value is set as expression itself, we cannot compute it
+ if(isMessages) {
+ resolution.setMapOrCollectionOrBundleAmoungTheTokens(true);
+ }
+ return;
+ }
+ }
+
+ for (String proposal : proposalsToFilter) {
+ if(returnEqualedVariablesOnly) {
+ // This is used for validation.
+ if (proposal.equals(filter)) {
+ TextProposal kbProposal = new TextProposal();
+ kbProposal.setReplacementString(proposal);
+ kbProposal.setLabel(proposal);
+ setImage(kbProposal);
+
+ kbProposals.add(kbProposal);
+
+ break;
+ }
+ } else if (proposal.startsWith(filter)) {
+ // This is used for CA.
+ TextProposal kbProposal = new TextProposal();
+
+ String replacementString = proposal.substring(filter.length());
+ if (bSurroundWithQuotes) {
+ replacementString = "'" + replacementString + "']"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ kbProposal.setReplacementString(replacementString);
+ kbProposal.setLabel(proposal);
+ kbProposal.setImage(getELProposalImage());
+
+ kbProposals.add(kbProposal);
+ }
+ }
+ }
+ segment.setResolved(!kbProposals.isEmpty());
+ if (resolution.isResolved()){
+ resolution.setLastResolvedToken(expr);
+ }
+ }
+
+ protected void processSingularMember(IVariable mbr, Set<TextProposal> kbProposals) {
+ // Surround the "long" keys containing the dots with [' ']
+ TreeSet<String> keys = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ keys.addAll(((Variable)mbr).getKeys());
+ Iterator<String> sortedKeys = keys.iterator();
+ while(sortedKeys.hasNext()) {
+ String key = sortedKeys.next();
+ if (key == null || key.length() == 0)
+ continue;
+ if (key.indexOf('.') != -1) {
+ TextProposal proposal = new TextProposal();
+ proposal.setReplacementString("['" + key + "']"); //$NON-NLS-1$ //$NON-NLS-2$
+ proposal.setLabel("['" + key + "']");
+ setImage(proposal);
+
+ kbProposals.add(proposal);
+ } else {
+ TextProposal proposal = new TextProposal();
+ proposal.setReplacementString(key);
+ proposal.setLabel(key);
+ setImage(proposal);
+
+ kbProposals.add(proposal);
+ }
+ }
+ }
+
+ protected void filterSingularMember(IVariable mbr, Set<String> proposalsToFilter) {
+ Collection<String> keys = ((Variable)mbr).getKeys();
+ for (String key : keys) {
+ proposalsToFilter.add(key);
+ }
+ }
+
+ static String[] COMMON_ATTRS = {"onclick", "ondblclick", "onkeydown", "onkeypress", "onkeyup", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup"};
+
+ static class Variable implements IVariable {
+ IFile f;
+ String name;
+
+ public Variable(String name, IFile f) {
+ this.name = name;
+ this.f = f;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Collection<String> getKeys() {
+ TreeSet<String> result = new TreeSet<String>();
+
+ XModelObject o = EclipseResourceUtil.createObjectForResource(f);
+ if(o == null) return result;
+ if(!"FileJSF2Component".equals(o.getModelEntity().getName())) return result;
+
+ for (int i = 0; i < COMMON_ATTRS.length; i++) {
+ result.add(COMMON_ATTRS[i]);
+ }
+
+ XModelObject is = o.getChildByPath("Interface");
+ if(is == null) return result;
+
+ XModelObject[] cs = is.getChildren("JSF2ComponentAttribute");
+
+ for (int i = 0; i < cs.length; i++) {
+ result.add(cs[i].getAttributeValue("name"));
+ }
+ return result;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.ca.AbstractELCompletionEngine#getMemberInfoByVariable(org.jboss.tools.common.el.core.resolver.IVariable, boolean)
+ */
+ @Override
+ protected MemberInfo getMemberInfoByVariable(IVariable var,
+ boolean onlyEqualNames) {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.ca.AbstractELCompletionEngine#resolveVariables(org.eclipse.core.resources.IFile, org.jboss.tools.common.el.core.model.ELInvocationExpression, boolean, boolean)
+ */
+ @Override
+ public List<IVariable> resolveVariables(IFile file,
+ ELInvocationExpression expr, boolean isFinal, boolean onlyEqualNames) {
+ return null;
+ }
+
+ @Override
+ protected boolean isStaticMethodsCollectingEnabled() {
+ return false;
+ }
+
+}
Property changes on: branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 8 months
JBoss Tools SVN: r21586 - trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 10:20:47 -0400 (Wed, 21 Apr 2010)
New Revision: 21586
Modified:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5941
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml 2010-04-21 14:18:06 UTC (rev 21585)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml 2010-04-21 14:20:47 UTC (rev 21586)
@@ -1,47 +1,10 @@
-package org.jboss.tools.jst.jsp.test.ca;
-
-import org.jboss.tools.common.test.util.TestProjectProvider;
-
-public class CAForCompositeComponentTest extends ContentAssistantTestCase{
- TestProjectProvider provider = null;
- boolean makeCopy = true;
- private static final String PROJECT_NAME = "CAForCompositeComponentTest";
- private static final String PAGE_NAME = "/WebContent/pages/greeting.xhtml";
- private static final String TAG_NAME = "/WebContent/resources/sample/tag2.xhtml";
-
- public void setUp() throws Exception {
- provider = new TestProjectProvider("org.jboss.tools.jst.jsp.test", null, PROJECT_NAME, makeCopy);
- project = provider.getProject();
- }
-
- protected void tearDown() throws Exception {
- if(provider != null) {
- provider.dispose();
- }
- }
-
- public void testCAForCompositeComponent(){
- String[] proposals = {
- "sample:tag", "sample:tag2", "sample:tag3"
- };
-
- checkProposals(PAGE_NAME, "<sample:tag />", 8, proposals, false);
-
- proposals = new String[]{
- "aaa"
- };
- checkProposals(PAGE_NAME, "<sample:tag />", 12, proposals, false);
- }
-
- /**
- * JBIDE-5941
- */
- public void testCAForCCAttrs(){
- String[] proposals = {
- "cc.attrs.a2", "cc.attrs.b3", "cc.attrs.onclick"
- };
-
- checkProposals(TAG_NAME, "#{cc.attrs.}", 11, proposals, false);
-
- }
-}
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite">
+ <composite:interface>
+ <composite:attribute name="a2"/>
+ <composite:attribute name="b3"/>
+ </composite:interface>
+ #{cc.attrs.}
+</html>
14 years, 8 months
JBoss Tools SVN: r21585 - trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 10:18:06 -0400 (Wed, 21 Apr 2010)
New Revision: 21585
Modified:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5941
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml 2010-04-21 14:16:30 UTC (rev 21584)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml 2010-04-21 14:18:06 UTC (rev 21585)
@@ -1,10 +1,47 @@
-<?xml version="1.0"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite">
- <composite:interface>
- <composite:attribute name="a2"/>
- <composite:attribute name="b3"/>
- </composite:interface>
- #{cc.attrs.}
-</html>
+package org.jboss.tools.jst.jsp.test.ca;
+
+import org.jboss.tools.common.test.util.TestProjectProvider;
+
+public class CAForCompositeComponentTest extends ContentAssistantTestCase{
+ TestProjectProvider provider = null;
+ boolean makeCopy = true;
+ private static final String PROJECT_NAME = "CAForCompositeComponentTest";
+ private static final String PAGE_NAME = "/WebContent/pages/greeting.xhtml";
+ private static final String TAG_NAME = "/WebContent/resources/sample/tag2.xhtml";
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.jst.jsp.test", null, PROJECT_NAME, makeCopy);
+ project = provider.getProject();
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+
+ public void testCAForCompositeComponent(){
+ String[] proposals = {
+ "sample:tag", "sample:tag2", "sample:tag3"
+ };
+
+ checkProposals(PAGE_NAME, "<sample:tag />", 8, proposals, false);
+
+ proposals = new String[]{
+ "aaa"
+ };
+ checkProposals(PAGE_NAME, "<sample:tag />", 12, proposals, false);
+ }
+
+ /**
+ * JBIDE-5941
+ */
+ public void testCAForCCAttrs(){
+ String[] proposals = {
+ "cc.attrs.a2", "cc.attrs.b3", "cc.attrs.onclick"
+ };
+
+ checkProposals(TAG_NAME, "#{cc.attrs.}", 11, proposals, false);
+
+ }
+}
14 years, 8 months
JBoss Tools SVN: r21584 - in branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test: src/org/jboss/tools/jst/jsp/test/ca and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-21 10:16:30 -0400 (Wed, 21 Apr 2010)
New Revision: 21584
Modified:
branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml
branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForCompositeComponentTest.java
Log:
Modified: branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml
===================================================================
--- branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml 2010-04-21 14:10:23 UTC (rev 21583)
+++ branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test/projects/CAForCompositeComponentTest/WebContent/resources/sample/tag2.xhtml 2010-04-21 14:16:30 UTC (rev 21584)
@@ -4,5 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="a2"/>
+ <composite:attribute name="b3"/>
</composite:interface>
+ #{cc.attrs.}
</html>
Modified: branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForCompositeComponentTest.java
===================================================================
--- branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForCompositeComponentTest.java 2010-04-21 14:10:23 UTC (rev 21583)
+++ branches/jbosstools-3.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForCompositeComponentTest.java 2010-04-21 14:16:30 UTC (rev 21584)
@@ -7,6 +7,7 @@
boolean makeCopy = true;
private static final String PROJECT_NAME = "CAForCompositeComponentTest";
private static final String PAGE_NAME = "/WebContent/pages/greeting.xhtml";
+ private static final String TAG_NAME = "/WebContent/resources/sample/tag2.xhtml";
public void setUp() throws Exception {
provider = new TestProjectProvider("org.jboss.tools.jst.jsp.test", null, PROJECT_NAME, makeCopy);
@@ -31,4 +32,16 @@
};
checkProposals(PAGE_NAME, "<sample:tag />", 12, proposals, false);
}
+
+ /**
+ * JBIDE-5941
+ */
+ public void testCAForCCAttrs(){
+ String[] proposals = {
+ "cc.attrs.a2", "cc.attrs.b3", "cc.attrs.onclick"
+ };
+
+ checkProposals(TAG_NAME, "#{cc.attrs.}", 11, proposals, false);
+
+ }
}
14 years, 8 months