JBoss Tools SVN: r30652 - trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-04-18 19:13:51 -0400 (Mon, 18 Apr 2011)
New Revision: 30652
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
Log:
JBIDE-8747 - null module should still accept if deployment method matches
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-04-18 23:05:52 UTC (rev 30651)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-04-18 23:13:51 UTC (rev 30652)
@@ -35,7 +35,7 @@
private int moduleState = IServer.PUBLISH_STATE_NONE;
public boolean accepts(String method, IServer server, IModule[] module) {
- if( module == null || (publishMethodSpecific() && !method.equals(getTargetedPublishMethodId())))
+ if( (publishMethodSpecific() && !method.equals(getTargetedPublishMethodId())))
return false;
IDeployableServer ds = ServerConverter.getDeployableServer(server);
IModule lastMod = (module == null || module.length == 0 ) ? null : module[module.length -1];
14 years, 12 months
JBoss Tools SVN: r30651 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-04-18 19:05:52 -0400 (Mon, 18 Apr 2011)
New Revision: 30651
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIElementWrapper.java
Log:
https://issues.jboss.org/browse/JBIDE-8705, https://issues.jboss.org/browse/JBIDE-8704
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIElementWrapper.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIElementWrapper.java 2011-04-18 22:29:34 UTC (rev 30650)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIElementWrapper.java 2011-04-18 23:05:52 UTC (rev 30651)
@@ -53,7 +53,10 @@
String type = Signature.getSignatureSimpleName(((ILocalVariable)javaElement).getTypeSignature());
label = method.getDeclaringType().getElementName()+DOT+method.getElementName()+OPEN+type+SPACE+javaElement.getElementName()+CLOSE;
}
- path = javaElement.getResource().getFullPath()+"/"+label;
+ if(javaElement.getResource() != null)
+ path = javaElement.getResource().getFullPath()+"/"+label;
+ else
+ path = "/"+label;
}
public ICDIElement getCDIElement(){
14 years, 12 months
JBoss Tools SVN: r30650 - trunk/hibernatetools/tests.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-18 18:29:34 -0400 (Mon, 18 Apr 2011)
New Revision: 30650
Modified:
trunk/hibernatetools/tests/pom.xml
Log:
comment out org.jboss.tools.hibernate.jpt.core.test and org.jboss.tools.hibernate.ui.bot.test per Sneja
Modified: trunk/hibernatetools/tests/pom.xml
===================================================================
--- trunk/hibernatetools/tests/pom.xml 2011-04-18 20:37:04 UTC (rev 30649)
+++ trunk/hibernatetools/tests/pom.xml 2011-04-18 22:29:34 UTC (rev 30650)
@@ -9,8 +9,8 @@
<modules>
<module>org.hibernate.eclipse.console.test</module>
<module>org.hibernate.eclipse.jdt.ui.test</module>
- <module>org.jboss.tools.hibernate.jpt.core.test</module>
- <module>org.jboss.tools.hibernate.ui.bot.test</module>
+ <!-- <module>org.jboss.tools.hibernate.jpt.core.test</module>
+ <module>org.jboss.tools.hibernate.ui.bot.test</module> -->
<module>org.jboss.tools.hibernate.ui.test</module>
</modules>
</project>
14 years, 12 months
JBoss Tools SVN: r30649 - in trunk/cdi: tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-04-18 16:37:04 -0400 (Mon, 18 Apr 2011)
New Revision: 30649
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIElementWrapper.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIMatch.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/InjectionPointQueryParticipant.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8705, https://issues.jboss.org/browse/JBIDE-8704
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIElementWrapper.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIElementWrapper.java 2011-04-18 20:22:30 UTC (rev 30648)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIElementWrapper.java 2011-04-18 20:37:04 UTC (rev 30649)
@@ -30,6 +30,7 @@
private static String BRACKETS = OPEN+CLOSE;
private ICDIElement element;
private String label;
+ private String path;
private IJavaElement javaElement;
public CDIElementWrapper(ICDIElement element){
@@ -52,7 +53,7 @@
String type = Signature.getSignatureSimpleName(((ILocalVariable)javaElement).getTypeSignature());
label = method.getDeclaringType().getElementName()+DOT+method.getElementName()+OPEN+type+SPACE+javaElement.getElementName()+CLOSE;
}
-
+ path = javaElement.getResource().getFullPath()+"/"+label;
}
public ICDIElement getCDIElement(){
@@ -66,4 +67,8 @@
public String getLabel(){
return label;
}
+
+ public String getPath(){
+ return label;
+ }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIMatch.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIMatch.java 2011-04-18 20:22:30 UTC (rev 30648)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/CDIMatch.java 2011-04-18 20:37:04 UTC (rev 30649)
@@ -23,6 +23,10 @@
return ((CDIElementWrapper)getElement()).getLabel();
}
+ public String getPath(){
+ return ((CDIElementWrapper)getElement()).getPath();
+ }
+
public IJavaElement getJavaElement(){
return ((CDIElementWrapper)getElement()).getJavaElement();
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/InjectionPointQueryParticipant.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/InjectionPointQueryParticipant.java 2011-04-18 20:22:30 UTC (rev 30648)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/search/InjectionPointQueryParticipant.java 2011-04-18 20:37:04 UTC (rev 30649)
@@ -28,7 +28,6 @@
import org.eclipse.jdt.ui.search.IQueryParticipant;
import org.eclipse.jdt.ui.search.ISearchRequestor;
import org.eclipse.jdt.ui.search.QuerySpecification;
-import org.eclipse.search.ui.text.Match;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.CDIUtil;
@@ -41,7 +40,7 @@
import org.jboss.tools.cdi.core.IParameter;
public class InjectionPointQueryParticipant implements IQueryParticipant{
- ArrayList<Object> objects = new ArrayList<Object>();
+ ArrayList<String> objects = new ArrayList<String>();
public int estimateTicks(QuerySpecification specification) {
return 10;
@@ -86,20 +85,20 @@
List<IBean> resultBeanList = CDIUtil.sortBeans(resultBeanSet);
for(IBean bean : resultBeanList){
if(bean != null){
- if(!objects.contains(bean)){
- Match match = new CDIMatch(bean);
+ CDIMatch match = new CDIMatch(bean);
+ if(!objects.contains(match.getPath())){
requestor.reportMatch(match);
- objects.add(bean);
+ objects.add(match.getPath());
}
}
}
Set<IObserverMethod> observerMethods = cdiProject.resolveObserverMethods(injectionPoint);
for(IObserverMethod observerMethod : observerMethods){
// match observer method
- if(!objects.contains(observerMethod)){
- Match match = new CDIMatch(observerMethod);
+ CDIMatch match = new CDIMatch(observerMethod);
+ if(!objects.contains(match.getPath())){
requestor.reportMatch(match);
- objects.add(observerMethod);
+ objects.add(match.getPath());
}
}
}
@@ -109,10 +108,10 @@
Set<IInjectionPoint> events = cdiProject.findObservedEvents(param);
for(IInjectionPoint event : events){
// match event
- if(!objects.contains(event)){
- Match match = new CDIMatch(event);
+ CDIMatch match = new CDIMatch(event);
+ if(!objects.contains(match.getPath())){
requestor.reportMatch(match);
- objects.add(event);
+ objects.add(match.getPath());
}
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-04-18 20:22:30 UTC (rev 30648)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-04-18 20:37:04 UTC (rev 30649)
@@ -17,6 +17,7 @@
import org.jboss.tools.cdi.ui.test.marker.CDIMarkerResolutionTest;
import org.jboss.tools.cdi.ui.test.perspective.CDIPerspectiveTest;
import org.jboss.tools.cdi.ui.test.preferences.CDIPreferencePageTest;
+import org.jboss.tools.cdi.ui.test.search.CDISearchParticipantTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIClassWizardFactoryTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIWizardTest;
@@ -36,6 +37,7 @@
suite.addTestSuite(CDIPreferencePageTest.class);
suite.addTestSuite(NewCDIClassWizardFactoryTest.class);
suite.addTestSuite(CDIPerspectiveTest.class);
+ suite.addTestSuite(CDISearchParticipantTest.class);
return suite;
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java 2011-04-18 20:22:30 UTC (rev 30648)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/search/CDISearchParticipantTest.java 2011-04-18 20:37:04 UTC (rev 30649)
@@ -10,6 +10,7 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory;
@@ -18,9 +19,16 @@
import org.eclipse.jdt.ui.search.ISearchRequestor;
import org.eclipse.jdt.ui.search.QuerySpecification;
import org.eclipse.search.ui.text.Match;
+import org.eclipse.ui.IMarkerResolution;
+import org.jboss.tools.cdi.core.ICDIElement;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.cdi.internal.core.impl.ClassBean;
+import org.jboss.tools.cdi.internal.core.impl.InjectionPointField;
+import org.jboss.tools.cdi.internal.core.impl.InjectionPointParameter;
import org.jboss.tools.cdi.ui.marker.MarkerResolutionUtils;
+import org.jboss.tools.cdi.ui.search.CDIBeanQueryParticipant;
import org.jboss.tools.cdi.ui.search.CDIMatch;
+import org.jboss.tools.cdi.ui.search.InjectionPointQueryParticipant;
import org.jboss.tools.common.EclipseUtil;
public class CDISearchParticipantTest extends TCKTest {
@@ -29,7 +37,9 @@
private static final int TYPE_SEARCH = 3;
private static final int PARAMETER_SEARCH = 4;
- private void testSearchParticipant(IFile file, int searchType, String elementName, String parameterName, IQueryParticipant participant, List<MatchStructure> matches){
+ private void testSearchParticipant(String fileName, int searchType, String elementName, String parameterName, IQueryParticipant participant, List<MatchStructure> matches){
+ IFile file = tckProject.getFile(fileName);
+ assertNotNull("File - "+fileName+" not found", file);
try{
ICompilationUnit compilationUnit = EclipseUtil.getCompilationUnit(file);
IJavaElement element = null;
@@ -39,11 +49,11 @@
if(searchType == FIELD_SEARCH){
element = type.getField(elementName);
}else if(searchType == METHOD_SEARCH){
- element = type.getMethod(elementName, new String[]{});
+ element = getMethod(type, elementName);
}else if(searchType == TYPE_SEARCH){
element = type;
}else if(searchType == PARAMETER_SEARCH){
- IMethod method = type.getMethod(elementName, new String[]{});
+ IMethod method = getMethod(type, elementName);
element = MarkerResolutionUtils.getParameter(method, parameterName);
}
@@ -67,18 +77,25 @@
}
}
+ private IMethod getMethod(IType type, String name) throws JavaModelException{
+ IMethod[] methods = type.getMethods();
+ for(IMethod method : methods){
+ if(method.getElementName().equals(name))
+ return method;
+ }
+ return null;
+ }
+
private void checkMatches(List<Match> matchesForCheck, List<MatchStructure> matchList) throws CoreException {
- assertEquals("There is unexpected number of matches",matchList.size(), matchesForCheck.size());
-
for(Match match : matchesForCheck){
assertTrue("Match must be CDIMatch", match instanceof CDIMatch);
MatchStructure ms = findMatch(matchList, (CDIMatch)match);
- assertNotNull("Match not found", ms);
+ assertNotNull("Unexpected mutch found (class - "+((CDIMatch)match).getCDIElement().getClass()+" label - "+((CDIMatch)match).getLabel()+")", ms);
ms.checked = true;
}
for(MatchStructure ms : matchList){
- assertTrue("Not all matches found", ms.checked);
+ assertTrue("Match not found (class - "+ms.type+" label - "+ms.name, ms.checked);
}
}
@@ -104,23 +121,46 @@
}
class MatchStructure{
- String type; // CDIElement.getClass()
+ Class<? extends ICDIElement> type;
String name; // label
boolean checked;
- public MatchStructure(String type, String name){
+ public MatchStructure(Class<? extends ICDIElement> type, String name){
this.type = type;
this.name = name;
checked = false;
}
}
- public void testInjectionPointQueryParticipant(){
+ public void testInjectionPointQueryParticipant1(){
+ ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
- //testSearchParticipant();
+ matches.add(new MatchStructure(ClassBean.class, "BeanWithInjectionPointMetadata"));
+
+ testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java", FIELD_SEARCH, "injectedBean", "", new InjectionPointQueryParticipant(), matches);
}
+ public void testInjectionPointQueryParticipant2(){
+ ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
+
+ matches.add(new MatchStructure(ClassBean.class, "BeanWithInjectionPointMetadata"));
+
+ testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java", PARAMETER_SEARCH, "ConstructorInjectionPointBean", "injectedBean", new InjectionPointQueryParticipant(), matches);
+ }
+
public void testCDIBeanQueryParticipant(){
+ ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
+ matches.add(new MatchStructure(InjectionPointField.class, "FieldInjectionPointBean.injectedBean"));
+ matches.add(new MatchStructure(InjectionPointField.class, "NamedDecoratorBroken.logger"));
+ matches.add(new MatchStructure(InjectionPointField.class, "NamedStereotypedDecoratorBroken.logger"));
+ matches.add(new MatchStructure(InjectionPointField.class, "TransientFieldInjectionPointBean.injectedBean"));
+ matches.add(new MatchStructure(InjectionPointField.class, "SpecializingDecoratorBroken.logger"));
+ matches.add(new MatchStructure(InjectionPointField.class, "ObserverMethodInDecoratorBroken.logger"));
+
+ matches.add(new MatchStructure(InjectionPointParameter.class, "ConstructorInjectionPointBean.ConstructorInjectionPointBean(BeanWithInjectionPointMetadata injectedBean)"));
+ matches.add(new MatchStructure(InjectionPointParameter.class, "MethodInjectionPointBean.methodWithInjectedMetadata(BeanWithInjectionPointMetadata injectedBean)"));
+
+ testSearchParticipant("JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java", TYPE_SEARCH, "BeanWithInjectionPointMetadata", "", new CDIBeanQueryParticipant(), matches);
}
}
14 years, 12 months
JBoss Tools SVN: r30648 - trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-18 16:22:30 -0400 (Mon, 18 Apr 2011)
New Revision: 30648
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java
Log:
JBIDE--8746
https://issues.jboss.org/browse/JBIDE-8746
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java 2011-04-18 20:21:47 UTC (rev 30647)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java 2011-04-18 20:22:30 UTC (rev 30648)
@@ -86,6 +86,7 @@
assertEquals(1, fs.length);
assertEquals("f1", fs[0].getName());
assertEquals("s1", fs[0].getFunctionSignature());
+ assertEquals("String", fs[0].getFunctionClass());
//TODO continue
14 years, 12 months
JBoss Tools SVN: r30647 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb: internal/taglib and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-18 16:21:47 -0400 (Mon, 18 Apr 2011)
New Revision: 30647
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IELFunction.java
Log:
JBIDE--8746
https://issues.jboss.org/browse/JBIDE-8746
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2011-04-18 19:53:46 UTC (rev 30646)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2011-04-18 20:21:47 UTC (rev 30647)
@@ -186,6 +186,7 @@
f.setId(t);
f.setName(new XMLValueInfo(t, XModelObjectConstants.ATTR_NAME));
f.setSignature(new XMLValueInfo(t, ATTR_FUNC_SIGN));
+ f.setFunctionClass(new XMLValueInfo(t, ELFunction.FUNCTION_CLASS));
library.addFunction(f);
}
}
@@ -233,6 +234,7 @@
f.setId(t);
f.setName(new XMLValueInfo(t, ATTR_FUNC_NAME));
f.setSignature(new XMLValueInfo(t, ATTR_FUNC_SIGN));
+ f.setFunctionClass(new XMLValueInfo(t, ELFunction.FUNCTION_CLASS));
library.addFunction(f);
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java 2011-04-18 19:53:46 UTC (rev 30646)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java 2011-04-18 20:21:47 UTC (rev 30647)
@@ -27,8 +27,10 @@
public class ELFunction extends KbObject implements IELFunction {
public static final String SIGNATURE = "signature"; //$NON-NLS-1$
+ public static final String FUNCTION_CLASS = "function-class"; //$NON-NLS-1$
private String name;
private String signature;
+ private String functionClass;
public ELFunction() {}
@@ -40,6 +42,10 @@
return signature;
}
+ public String getFunctionClass() {
+ return functionClass;
+ }
+
public void setName(IValueInfo s) {
name = s == null ? null : s.getValue();
attributesInfo.put(XMLStoreConstants.ATTR_NAME, s);
@@ -50,6 +56,11 @@
attributesInfo.put(SIGNATURE, s);
}
+ public void setFunctionClass(IValueInfo s) {
+ functionClass = s == null ? null : s.getValue();
+ attributesInfo.put(FUNCTION_CLASS, s);
+ }
+
public ELFunction clone() throws CloneNotSupportedException {
return (ELFunction)super.clone();
}
@@ -73,6 +84,7 @@
setName(attributesInfo.get(XMLStoreConstants.ATTR_NAME));
setSignature(attributesInfo.get(SIGNATURE));
+ setFunctionClass(attributesInfo.get(FUNCTION_CLASS));
if(name == null && element.hasAttribute(XMLStoreConstants.ATTR_NAME)) {
name = element.getAttribute(XMLStoreConstants.ATTR_NAME);
@@ -95,6 +107,7 @@
String attrname = a.getModelEntity().getAttribute(XMLScanner.ATTR_FUNC_NAME) != null ? XMLScanner.ATTR_FUNC_NAME : XModelObjectConstants.ATTR_NAME;
attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, attrname));
attributesInfo.put(SIGNATURE, new XMLValueInfo(a, XMLScanner.ATTR_FUNC_SIGN));
+ attributesInfo.put(FUNCTION_CLASS, new XMLValueInfo(a, FUNCTION_CLASS));
} else {
super.loadAttributesInfo(element, context);
}
@@ -113,6 +126,10 @@
changes = Change.addChange(changes, new Change(this, SIGNATURE, signature, a.signature));
signature = a.signature;
}
+ if(!stringsEqual(functionClass, a.functionClass)) {
+ changes = Change.addChange(changes, new Change(this, FUNCTION_CLASS, functionClass, a.functionClass));
+ functionClass = a.functionClass;
+ }
return changes;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IELFunction.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IELFunction.java 2011-04-18 19:53:46 UTC (rev 30646)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IELFunction.java 2011-04-18 20:21:47 UTC (rev 30647)
@@ -24,4 +24,9 @@
* @return the signature
*/
String getFunctionSignature();
+
+ /**
+ * @return function class
+ */
+ String getFunctionClass();
}
\ No newline at end of file
14 years, 12 months
JBoss Tools SVN: r30646 - in trunk/jst/tests/org.jboss.tools.jst.web.kb.test: src/org/jboss/tools/jst/web/kb/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-18 15:53:46 -0400 (Mon, 18 Apr 2011)
New Revision: 30646
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/taglib2.tld
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java
Log:
JBIDE-8744
https://issues.jboss.org/browse/JBIDE-8744
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/taglib2.tld
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/taglib2.tld 2011-04-18 19:27:56 UTC (rev 30645)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/taglib2.tld 2011-04-18 19:53:46 UTC (rev 30646)
@@ -1,15 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
- "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
-<taglib>
+<taglib version="2.1" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd">
+
<tlib-version>1.0</tlib-version>
- <jsp-version>1.2</jsp-version>
<short-name>taglib2</short-name>
<uri>taglib2</uri>
<tag>
+ <description>Tag A</description>
<name>tagA</name>
<tag-class>com.TagA</tag-class>
<body-content>empty</body-content>
- <description>Tag A</description>
</tag>
+ <function>
+ <name>f1</name>
+ <function-class>String</function-class>
+ <function-signature>s1</function-signature>
+ </function>
</taglib>
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java 2011-04-18 19:27:56 UTC (rev 30645)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java 2011-04-18 19:53:46 UTC (rev 30646)
@@ -21,6 +21,9 @@
import org.jboss.tools.jst.web.kb.internal.scanner.LoadedDeclarations;
import org.jboss.tools.jst.web.kb.internal.scanner.ScannerException;
import org.jboss.tools.jst.web.kb.internal.scanner.XMLScanner;
+import org.jboss.tools.jst.web.kb.internal.taglib.ELFunction;
+import org.jboss.tools.jst.web.kb.taglib.IELFunction;
+import org.jboss.tools.jst.web.kb.taglib.IFunctionLibrary;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
import org.jboss.tools.test.util.JUnitUtils;
@@ -73,8 +76,19 @@
// }
}
- public void toDoTestKbProjectObjects() {
+ public void testKbProjectObjects() {
+ IKbProject kbProject = getKbProject();
+ ITagLibrary[] ls = kbProject.getTagLibraries("taglib2");
+ assertEquals(1, ls.length);
+ ITagLibrary l = ls[0];
+ assertTrue(l instanceof IFunctionLibrary);
+ IELFunction[] fs = ((IFunctionLibrary)l).getFunctions();
+ assertEquals(1, fs.length);
+ assertEquals("f1", fs[0].getName());
+ assertEquals("s1", fs[0].getFunctionSignature());
+ //TODO continue
+
}
public void toDoXMLSerialization() {
14 years, 12 months
JBoss Tools SVN: r30645 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb: taglib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-18 15:27:56 -0400 (Mon, 18 Apr 2011)
New Revision: 30645
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java
Log:
JBIDE-8744
https://issues.jboss.org/browse/JBIDE-8744
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java 2011-04-18 19:26:25 UTC (rev 30644)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java 2011-04-18 19:27:56 UTC (rev 30645)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.taglib;
import java.util.ArrayList;
@@ -14,6 +24,11 @@
import org.jboss.tools.jst.web.kb.taglib.IFunctionLibrary;
import org.w3c.dom.Element;
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
public abstract class FunctionTagLib extends AbstractTagLib implements IFunctionLibrary {
protected List<ELFunction> functions = new ArrayList<ELFunction>();
protected IELFunction[] functionArray = null;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java 2011-04-18 19:26:25 UTC (rev 30644)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java 2011-04-18 19:27:56 UTC (rev 30645)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
+ * Copyright (c) 2011 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,
14 years, 12 months
JBoss Tools SVN: r30644 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb: internal/taglib and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-18 15:26:25 -0400 (Mon, 18 Apr 2011)
New Revision: 30644
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDLibrary.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFaceletTagLibrary.java
Log:
JBIDE-8744
https://issues.jboss.org/browse/JBIDE-8744
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2011-04-18 19:09:25 UTC (rev 30643)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2011-04-18 19:26:25 UTC (rev 30644)
@@ -16,6 +16,7 @@
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.XModelObjectConstants;
import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
@@ -177,6 +178,17 @@
library.addComponent(tag);
}
}
+ XModelObject functions = o.getChildByPath("Functions"); //$NON-NLS-1$
+ if(functions != null) {
+ ts = functions.getChildren();
+ for (XModelObject t: ts) {
+ ELFunction f = new ELFunction();
+ f.setId(t);
+ f.setName(new XMLValueInfo(t, XModelObjectConstants.ATTR_NAME));
+ f.setSignature(new XMLValueInfo(t, ATTR_FUNC_SIGN));
+ library.addFunction(f);
+ }
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java 2011-04-18 19:09:25 UTC (rev 30643)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java 2011-04-18 19:26:25 UTC (rev 30644)
@@ -10,10 +10,13 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.taglib;
+import java.util.List;
import java.util.Properties;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.XModelObjectConstants;
import org.jboss.tools.common.model.project.ext.IValueInfo;
+import org.jboss.tools.common.model.project.ext.event.Change;
import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
@@ -89,11 +92,28 @@
protected void loadAttributesInfo(Element element, Properties context) {
if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId() && getId() != null) {
XModelObject a = (XModelObject)getId();
- attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLScanner.ATTR_FUNC_NAME));
+ String attrname = a.getModelEntity().getAttribute(XMLScanner.ATTR_FUNC_NAME) != null ? XMLScanner.ATTR_FUNC_NAME : XModelObjectConstants.ATTR_NAME;
+ attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, attrname));
attributesInfo.put(SIGNATURE, new XMLValueInfo(a, XMLScanner.ATTR_FUNC_SIGN));
} else {
super.loadAttributesInfo(element, context);
}
}
+ @Override
+ public List<Change> merge(KbObject s) {
+ List<Change> changes = super.merge(s);
+
+ ELFunction a = (ELFunction)s;
+ if(!stringsEqual(name, a.name)) {
+ changes = Change.addChange(changes, new Change(this, XMLStoreConstants.ATTR_NAME, name, a.name));
+ name = a.name;
+ }
+ if(!stringsEqual(signature, a.signature)) {
+ changes = Change.addChange(changes, new Change(this, SIGNATURE, signature, a.signature));
+ signature = a.signature;
+ }
+ return changes;
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java 2011-04-18 19:09:25 UTC (rev 30643)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java 2011-04-18 19:26:25 UTC (rev 30644)
@@ -10,115 +10,24 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.taglib;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.jboss.tools.common.model.project.ext.event.Change;
-import org.jboss.tools.common.xml.XMLUtilities;
-import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
-import org.jboss.tools.jst.web.kb.taglib.IELFunction;
import org.jboss.tools.jst.web.kb.taglib.IFaceletTagLibrary;
-import org.w3c.dom.Element;
/**
* @author Viacheslav Kabanovich
*/
-public class FaceletTagLibrary extends AbstractTagLib implements
+public class FaceletTagLibrary extends FunctionTagLib implements
IFaceletTagLibrary {
- List<ELFunction> functions = new ArrayList<ELFunction>();
- IELFunction[] functionArray = null;
- public FaceletTagLibrary() {
-
+ public FaceletTagLibrary() {
}
- public IELFunction[] getFunctions() {
- if(functionArray == null) {
- functionArray = functions.toArray(new ELFunction[0]);
- }
- return functionArray;
- }
-
- public void addFunction(ELFunction f) {
- functions.add(f);
- functionArray = null;
- }
-
public FaceletTagLibrary clone() throws CloneNotSupportedException {
- FaceletTagLibrary copy = (FaceletTagLibrary)super.clone();
- copy.functions = new ArrayList<ELFunction>();
- copy.functionArray = null;
- for (IELFunction f: getFunctions()) {
- copy.addFunction(((ELFunction)f).clone());
- }
- return copy;
+ return (FaceletTagLibrary)super.clone();
}
public String getXMLClass() {
return KbXMLStoreConstants.CLS_FACELET_LIBRARY;
}
- public List<Change> merge(KbObject s) {
- List<Change> changes = super.merge(s);
- FaceletTagLibrary t = (FaceletTagLibrary)s;
- Change children = new Change(this, null, null, null);
- mergeFunctions(t, children);
- changes = Change.addChange(changes, children);
- return changes;
- }
-
- public void mergeFunctions(FaceletTagLibrary c, Change children) {
- Map<Object,ELFunction> functionMap = new HashMap<Object, ELFunction>();
- for (IELFunction f: getFunctions()) functionMap.put(((KbObject)f).getId(), (ELFunction)f);
- for (IELFunction f: c.getFunctions()) {
- ELFunction loaded = (ELFunction)f;
- ELFunction current = functionMap.get(loaded.getId());
- if(current == null) {
- addFunction(loaded);
- Change change = new Change(this, null, null, loaded);
- children.addChildren(Change.addChange(null, change));
- } else {
- List<Change> rc = current.merge(loaded);
- if(rc != null) children.addChildren(rc);
- }
- }
- for (ELFunction f: functionMap.values()) {
- ELFunction removed = f;
- synchronized (functions) {
- if(functions.contains(removed)) {
- continue;
- }
- functions.remove(removed.getName());
- functionArray = null;
- }
- Change change = new Change(this, null, removed, null);
- children.addChildren(Change.addChange(null, change));
- }
- }
-
- public Element toXML(Element parent, Properties context) {
- Element element = super.toXML(parent, context);
-
- for (IELFunction f: getFunctions()) {
- ((KbObject)f).toXML(element, context);
- }
-
- return element;
- }
-
- public void loadXML(Element element, Properties context) {
- super.loadXML(element, context);
-
- Element[] cs = XMLUtilities.getChildren(element, KbXMLStoreConstants.TAG_FUNCTION);
- for (Element e: cs) {
- ELFunction f = new ELFunction();
- f.loadXML(e, context);
- addFunction(f);
- }
- }
-
}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java 2011-04-18 19:26:25 UTC (rev 30644)
@@ -0,0 +1,104 @@
+package org.jboss.tools.jst.web.kb.internal.taglib;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.jboss.tools.common.model.project.ext.event.Change;
+import org.jboss.tools.common.xml.XMLUtilities;
+import org.jboss.tools.jst.web.kb.internal.KbObject;
+import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.kb.taglib.IELFunction;
+import org.jboss.tools.jst.web.kb.taglib.IFunctionLibrary;
+import org.w3c.dom.Element;
+
+public abstract class FunctionTagLib extends AbstractTagLib implements IFunctionLibrary {
+ protected List<ELFunction> functions = new ArrayList<ELFunction>();
+ protected IELFunction[] functionArray = null;
+
+ public FunctionTagLib() {}
+
+ public IELFunction[] getFunctions() {
+ if(functionArray == null) {
+ functionArray = functions.toArray(new ELFunction[0]);
+ }
+ return functionArray;
+ }
+
+ public FunctionTagLib clone() throws CloneNotSupportedException {
+ FunctionTagLib copy = (FunctionTagLib)super.clone();
+ copy.functions = new ArrayList<ELFunction>();
+ copy.functionArray = null;
+ for (IELFunction f: getFunctions()) {
+ copy.addFunction(((ELFunction)f).clone());
+ }
+ return copy;
+ }
+
+ public void addFunction(ELFunction f) {
+ functions.add(f);
+ functionArray = null;
+ }
+
+ public List<Change> merge(KbObject s) {
+ List<Change> changes = super.merge(s);
+ FunctionTagLib t = (FunctionTagLib)s;
+ Change children = new Change(this, null, null, null);
+ mergeFunctions(t, children);
+ changes = Change.addChange(changes, children);
+ return changes;
+ }
+
+ public void mergeFunctions(FunctionTagLib c, Change children) {
+ Map<Object,ELFunction> functionMap = new HashMap<Object, ELFunction>();
+ for (IELFunction f: getFunctions()) functionMap.put(((KbObject)f).getId(), (ELFunction)f);
+ for (IELFunction f: c.getFunctions()) {
+ ELFunction loaded = (ELFunction)f;
+ ELFunction current = functionMap.get(loaded.getId());
+ if(current == null) {
+ addFunction(loaded);
+ Change change = new Change(this, null, null, loaded);
+ children.addChildren(Change.addChange(null, change));
+ } else {
+ List<Change> rc = current.merge(loaded);
+ if(rc != null) children.addChildren(rc);
+ }
+ }
+ for (ELFunction f: functionMap.values()) {
+ ELFunction removed = f;
+ synchronized (functions) {
+ if(functions.contains(removed)) {
+ continue;
+ }
+ functions.remove(removed.getName());
+ functionArray = null;
+ }
+ Change change = new Change(this, null, removed, null);
+ children.addChildren(Change.addChange(null, change));
+ }
+ }
+
+ public Element toXML(Element parent, Properties context) {
+ Element element = super.toXML(parent, context);
+
+ for (IELFunction f: getFunctions()) {
+ ((KbObject)f).toXML(element, context);
+ }
+
+ return element;
+ }
+
+ public void loadXML(Element element, Properties context) {
+ super.loadXML(element, context);
+
+ Element[] cs = XMLUtilities.getChildren(element, KbXMLStoreConstants.TAG_FUNCTION);
+ for (Element e: cs) {
+ ELFunction f = new ELFunction();
+ f.loadXML(e, context);
+ addFunction(f);
+ }
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FunctionTagLib.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDLibrary.java 2011-04-18 19:09:25 UTC (rev 30643)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDLibrary.java 2011-04-18 19:26:25 UTC (rev 30644)
@@ -22,7 +22,7 @@
/**
* @author Viacheslav Kabanovich
*/
-public class TLDLibrary extends AbstractTagLib implements ITLDLibrary {
+public class TLDLibrary extends FunctionTagLib implements ITLDLibrary {
public static final String DISPLAY_NAME = "display-name"; //$NON-NLS-1$
public static final String SHORT_NAME = "short-name"; //$NON-NLS-1$
public static final String VERSION = "version"; //$NON-NLS-1$
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFaceletTagLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFaceletTagLibrary.java 2011-04-18 19:09:25 UTC (rev 30643)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFaceletTagLibrary.java 2011-04-18 19:26:25 UTC (rev 30644)
@@ -13,10 +13,6 @@
/**
* @author Alexey Kazakov
*/
-public interface IFaceletTagLibrary extends ITagLibrary {
+public interface IFaceletTagLibrary extends IFunctionLibrary {
- /**
- * @return EL functions
- */
- IELFunction[] getFunctions();
}
\ No newline at end of file
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java 2011-04-18 19:26:25 UTC (rev 30644)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.kb.taglib;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public interface IFunctionLibrary extends ITagLibrary {
+
+ /**
+ * @return EL functions
+ */
+ IELFunction[] getFunctions();
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFunctionLibrary.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 12 months