Author: scabanovich
Date: 2010-01-15 06:22:39 -0500 (Fri, 15 Jan 2010)
New Revision: 19765
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletAttribute.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/AbstractComponent.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5642
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 2010-01-15
10:58:21 UTC (rev 19764)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2010-01-15
11:22:39 UTC (rev 19765)
@@ -25,6 +25,7 @@
import org.jboss.tools.jst.web.kb.internal.taglib.AbstractComponent;
import org.jboss.tools.jst.web.kb.internal.taglib.AbstractTagLib;
import org.jboss.tools.jst.web.kb.internal.taglib.ELFunction;
+import org.jboss.tools.jst.web.kb.internal.taglib.FaceletAttribute;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTag;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTagLibrary;
import org.jboss.tools.jst.web.kb.internal.taglib.FacesConfigAttribute;
@@ -198,6 +199,19 @@
tag.setComponentType(new XMLValueInfo(d, ATTR_COMPONENT_TYPE)); //$NON-NLS-1$
}
}
+ XModelObject[] as = t.getChildren();
+ for (XModelObject a: as) {
+ String entity2 = a.getModelEntity().getName();
+ if(entity2.startsWith("FaceletTaglibAttribute")) { //$NON-NLS-1$
+ FaceletAttribute attr = new FaceletAttribute();
+ attr.setId(a);
+ attr.setName(new XMLValueInfo(a, XMLStoreConstants.ATTR_NAME));
+ attr.setDescription(new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
+ attr.setRequired(new XMLValueInfo(a, AbstractAttribute.REQUIRED));
+
+ tag.addAttribute(attr);
+ }
+ }
library.addComponent(tag);
} else if(entity.startsWith("FaceletTaglibFunction")) { //$NON-NLS-1$
ELFunction f = new ELFunction();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2010-01-15
10:58:21 UTC (rev 19764)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2010-01-15
11:22:39 UTC (rev 19765)
@@ -580,6 +580,8 @@
c = new FacesConfigAttribute();
} else if(KbXMLStoreConstants.CLS_COMPOSITE_LIBRARY.equals(cls)) {
c = new CompositeAttribute();
+ } else if(KbXMLStoreConstants.CLS_FACELET_LIBRARY.equals(cls)) {
+ c = new FaceletAttribute();
} else {
//consider other cases;
}
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletAttribute.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletAttribute.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletAttribute.java 2010-01-15
11:22:39 UTC (rev 19765)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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 org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class FaceletAttribute extends AbstractAttribute {
+
+ public FaceletAttribute clone() throws CloneNotSupportedException {
+ return (FaceletAttribute)super.clone();
+ }
+
+ public String getXMLClass() {
+ return KbXMLStoreConstants.CLS_FACELET_LIBRARY;
+ }
+
+}
Property changes on:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletAttribute.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain