Author: vrubezhny
Date: 2009-10-19 09:36:57 -0400 (Mon, 19 Oct 2009)
New Revision: 18158
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextBuilder.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextDefinition.java
Log:
JBIDE-3563: Code assist for "class" and "styleClass" attributes for
html and jsf tags.
The tag and attribute names are used to be case insensitive for the standard HTML tags
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextBuilder.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextBuilder.java 2009-10-19
13:30:23 UTC (rev 18157)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextBuilder.java 2009-10-19
13:36:57 UTC (rev 18158)
@@ -261,7 +261,7 @@
String[] defTags = def.getCSSTags();
if (defTags != null) {
for (String tag : defTags) {
- if (tagName.equals(tag)) {
+ if (tagName.equals(tag) || ("".equals(uri) &&
tagName.equalsIgnoreCase(tag))) { //$NON-NLS-1$
isHolder = true;
// Check that the tag have no attributes defined
// If so - the tag itself is used to define the CSS
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextDefinition.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextDefinition.java 2009-10-19
13:30:23 UTC (rev 18157)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeContextDefinition.java 2009-10-19
13:36:57 UTC (rev 18158)
@@ -29,6 +29,8 @@
}
public boolean addTag(String tagName, IConfigurationElement element) {
+ if ("".equals(fUri)) //$NON-NLS-1$
+ tagName = tagName.toLowerCase();
if (isInParentElements(element, IncludeContextBuilder.TAG_INCLUDE)) {
addIncludeTag(tagName, element);
return true;
@@ -75,6 +77,8 @@
parentTagName = IncludeContextBuilder.getName(parentTagElement);
}
parentTagName = parentTagName == null ? "" : parentTagName; //$NON-NLS-1$
+ if ("".equals(fUri)) //$NON-NLS-1$
+ parentTagName = parentTagName.toLowerCase();
if (isInParentElements(element, IncludeContextBuilder.TAG_INCLUDE)) {
if (fIncludeTags.get(parentTagName) == null) {
@@ -150,6 +154,9 @@
}
public String[] getIncludeTagAttributes(String tagName) {
+ if ("".equals(fUri)) //$NON-NLS-1$
+ tagName = tagName.toLowerCase();
+
Set<String> attrSet = fIncludeTags == null ? null : fIncludeTags.get(tagName);
return attrSet == null ? EMPTY_CHILDREN :
@@ -157,6 +164,9 @@
}
public String[] getCSSTagAttributes(String tagName) {
+ if ("".equals(fUri)) //$NON-NLS-1$
+ tagName = tagName.toLowerCase();
+
Set<String> attrSet = fCSSTags == null ? null : fCSSTags.get(tagName);
return attrSet == null ? EMPTY_CHILDREN :