Author: akazakov
Date: 2010-02-15 09:33:20 -0500 (Mon, 15 Feb 2010)
New Revision: 20279
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/CustomTagLibComponent.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5848
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-02-15
13:42:22 UTC (rev 20278)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2010-02-15
14:33:20 UTC (rev 20279)
@@ -138,23 +138,7 @@
}
protected boolean checkExtended(IAttribute attribute, IPageContext context, KbQuery
query) {
- if(!attribute.isExtended()) {
- return true;
- }
- IComponent parentComponent = attribute.getComponent();
- IComponent[] parentComponents = null;
- if(parentComponent==null) {
- parentComponents = PageProcessor.getInstance().getComponents(query, context, false);
- } else {
- parentComponents = new IComponent[]{parentComponent};
- }
- for (IComponent component : parentComponents) {
- IAttribute at = component.getAttribute(attribute.getName());
- if(at!=null && !at.isExtended()) {
- return true;
- }
- }
- return false;
+ return true;
}
private static final IAttribute[] EMPTY_ARRAY = new IAttribute[0];
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomTagLibComponent.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomTagLibComponent.java 2010-02-15
13:42:22 UTC (rev 20278)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/CustomTagLibComponent.java 2010-02-15
14:33:20 UTC (rev 20279)
@@ -10,6 +10,11 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.taglib;
+import org.jboss.tools.jst.web.kb.IPageContext;
+import org.jboss.tools.jst.web.kb.KbQuery;
+import org.jboss.tools.jst.web.kb.PageProcessor;
+import org.jboss.tools.jst.web.kb.taglib.IAttribute;
+import org.jboss.tools.jst.web.kb.taglib.IComponent;
import org.jboss.tools.jst.web.kb.taglib.ICustomTagLibComponent;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
@@ -52,4 +57,23 @@
public void setParentTagLib(CustomTagLibrary parentTagLib) {
this.parentTagLib = parentTagLib;
}
+
+ /*
+ * (non-Javadoc)
+ * @see
org.jboss.tools.jst.web.kb.internal.taglib.AbstractComponent#checkExtended(org.jboss.tools.jst.web.kb.taglib.IAttribute,
org.jboss.tools.jst.web.kb.IPageContext, org.jboss.tools.jst.web.kb.KbQuery)
+ */
+ @Override
+ protected boolean checkExtended(IAttribute attribute, IPageContext context, KbQuery
query) {
+ if(!attribute.isExtended()) {
+ return true;
+ }
+ IComponent[] parentComponents = PageProcessor.getInstance().getComponents(query,
context, false);
+ for (IComponent component : parentComponents) {
+ IAttribute at = component.getAttribute(attribute.getName());
+ if(at!=null && !at.isExtended()) {
+ return true;
+ }
+ }
+ return false;
+ }
}
\ No newline at end of file