Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Trimble2015-04-07 13:12:52 -0400
committerIan Trimble2015-04-07 13:12:52 -0400
commit93fe4e6c0509cd72f41a1ba6e68504a6e245e740 (patch)
tree4dc617397d8d6f1ed2166d83218f2443241cd608
parent36b8f5f87b20c156663b955f16056f625d305b57 (diff)
downloadwebtools.jsf-R3_6_maintenance.tar.gz
webtools.jsf-R3_6_maintenance.tar.xz
webtools.jsf-R3_6_maintenance.zip
Bug 453529 - Code assist for composites does not work with the new JSFR3_6_maintenance
2.2 namespaces
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/pom.xml2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contenttype/ContentDescriberForFaceletCompositeComponent.java6
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/facelet/Messages.java2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/META-INF/MANIFEST.MF2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/pom.xml2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java106
7 files changed, 65 insertions, 57 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF b/jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF
index 24691577d..81709996c 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.jst.jsf.core; singleton:=true
-Bundle-Version: 1.7.100.qualifier
+Bundle-Version: 1.7.110.qualifier
Bundle-Activator: org.eclipse.jst.jsf.core.internal.JSFCorePlugin
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/pom.xml b/jsf/plugins/org.eclipse.jst.jsf.core/pom.xml
index fe9c043bf..fdc67d728 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/pom.xml
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/pom.xml
@@ -22,7 +22,7 @@
<groupId>org.eclipse.webtools.jsf</groupId>
<artifactId>org.eclipse.jst.jsf.core</artifactId>
- <version>1.7.100-SNAPSHOT</version>
+ <version>1.7.110-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<profiles>
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contenttype/ContentDescriberForFaceletCompositeComponent.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contenttype/ContentDescriberForFaceletCompositeComponent.java
index 4bb808de7..d0ff2a6ad 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contenttype/ContentDescriberForFaceletCompositeComponent.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contenttype/ContentDescriberForFaceletCompositeComponent.java
@@ -14,7 +14,8 @@ import java.util.regex.Pattern;
/**
* Content Describer for a "facelet composite component" (document element has an xmlns attribute
- * with a value that matches "http://java.sun.com/jsf/composite").
+ * with a value that matches "http://java.sun.com/jsf/composite" or
+ * "http://xmlns.jcp.org/jsf/composite").
*
* @author ian.trimble@oracle.com
*/
@@ -23,7 +24,8 @@ public class ContentDescriberForFaceletCompositeComponent extends AbstractConten
@Override
protected Pattern[] getNSValuePatterns() {
return new Pattern[] {
- Pattern.compile("http://java.sun.com/jsf/composite") //$NON-NLS-1$
+ Pattern.compile("http://java.sun.com/jsf/composite"), //$NON-NLS-1$
+ Pattern.compile("http://xmlns.jcp.org/jsf/composite") //$NON-NLS-1$
};
}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/facelet/Messages.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/facelet/Messages.java
index 4cdfcadf0..61974ac53 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/facelet/Messages.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/facelet/Messages.java
@@ -15,7 +15,7 @@ import org.eclipse.osgi.util.NLS;
class Messages extends NLS
{
- private static final String BUNDLE_NAME = "org.eclipse.jst.jsf.core.validation.internal.facelet.messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.jst.jsf.validation.internal.facelet.messages"; //$NON-NLS-1$
static
{
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/META-INF/MANIFEST.MF b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/META-INF/MANIFEST.MF
index cc4bd15c8..d0028bd8c 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/META-INF/MANIFEST.MF
+++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.jst.jsf.facelet.core;singleton:=true
-Bundle-Version: 1.3.0.qualifier
+Bundle-Version: 1.3.100.qualifier
Bundle-Activator: org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin$Implementation
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/pom.xml b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/pom.xml
index 6a5f08145..f89c0bac9 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/pom.xml
+++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/pom.xml
@@ -22,7 +22,7 @@
<groupId>org.eclipse.webtools.jsf</groupId>
<artifactId>org.eclipse.jst.jsf.facelet.core</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<profiles>
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java
index 5ff74a718..d7ca0af18 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java
@@ -137,6 +137,10 @@ public class JSFResourceBasedTagRecord extends FaceletTagRecord
private static final JSFResourceBasedTagRecord WHOLE_LIB_RECORD = new JSFResourceBasedTagRecord(null, Collections.EMPTY_LIST, null);
private final Map<String, LibEntry> _tags = new HashMap<String, LibEntry>();
private static final String FACELET_FILE_CONTENT_TYPE = "org.eclipse.wst.html.core.htmlsource"; //$NON-NLS-1$
+ private static final String[] COMPOSITE_LIB_NS_PREFIXES = new String[] {
+ "http://java.sun.com/jsf/composite/", //$NON-NLS-1$
+ "http://xmlns.jcp.org/jsf/composite/" //$NON-NLS-1$
+ };
/**
* @param jsfResource
@@ -150,44 +154,45 @@ public class JSFResourceBasedTagRecord extends FaceletTagRecord
{
return;
}
- final String uri = String.format(
- "http://java.sun.com/jsf/composite/%s", libraryName); //$NON-NLS-1$
- LibEntry tags = _tags.get(uri);
- if (tags == null)
- {
- tags = new LibEntry(createDescriptor(jsfResource));
- _tags.put(uri, tags);
- }
- final String resourceName = jsfResource.getId().getResourceName();
- final IPath resourceNamePath = new Path(resourceName)
- .removeFileExtension();
- final FaceletTaglibTag tag = FaceletTaglibFactory.eINSTANCE
- .createFaceletTaglibTag();
- tag.setTagName(resourceNamePath.toString());
- switch (changeType)
- {
- case ADDED:
- case CHANGED:
- // only add to the list on a add/change if the resource
- // exists and is the right type
- // Bug 377405: order the isContentType call first because
- // it has a high probability of returning false and
- // short-circuiting the isAccessible call that can
- // be very expensive (10-100 times)
- if (jsfResource
- .isContentType(FACELET_FILE_CONTENT_TYPE)
- && jsfResource.isAccessible())
- {
+ for (String nsPrefix: COMPOSITE_LIB_NS_PREFIXES) {
+ final String uri = String.format("%s%s", nsPrefix, libraryName); //$NON-NLS-1$
+ LibEntry tags = _tags.get(uri);
+ if (tags == null)
+ {
+ tags = new LibEntry(createDescriptor(jsfResource));
+ _tags.put(uri, tags);
+ }
+ final String resourceName = jsfResource.getId().getResourceName();
+ final IPath resourceNamePath = new Path(resourceName)
+ .removeFileExtension();
+ final FaceletTaglibTag tag = FaceletTaglibFactory.eINSTANCE
+ .createFaceletTaglibTag();
+ tag.setTagName(resourceNamePath.toString());
+ switch (changeType)
+ {
+ case ADDED:
+ case CHANGED:
+ // only add to the list on a add/change if the resource
+ // exists and is the right type
+ // Bug 377405: order the isContentType call first because
+ // it has a high probability of returning false and
+ // short-circuiting the isAccessible call that can
+ // be very expensive (10-100 times)
+ if (jsfResource
+ .isContentType(FACELET_FILE_CONTENT_TYPE)
+ && jsfResource.isAccessible())
+ {
+ tags.addTag(tag);
+ }
+ break;
+ case REMOVED:
+ // add all comers to the remove list. There will only be
+ // removal
+ // on merge if ADDED/CHANGED path decided they should be
+ // there.
tags.addTag(tag);
- }
- break;
- case REMOVED:
- // add all comers to the remove list. There will only be
- // removal
- // on merge if ADDED/CHANGED path decided they should be
- // there.
- tags.addTag(tag);
- break;
+ break;
+ }
}
}
@@ -203,19 +208,20 @@ public class JSFResourceBasedTagRecord extends FaceletTagRecord
{
return;
}
- final String uri = String.format(
- "http://java.sun.com/jsf/composite/%s", libraryName); //$NON-NLS-1$
- if (changeType == CHANGE_TYPE.REMOVED)
- {
- _tags.put(uri, WHOLE_LIBRARY);
- } else
- {
- LibEntry tags = _tags.get(uri);
- if (tags == null)
- {
- tags = new LibEntry(createDescriptor(jsfResource));
- _tags.put(uri, tags);
- }
+ for (String nsPrefix: COMPOSITE_LIB_NS_PREFIXES) {
+ final String uri = String.format("%s%s", nsPrefix, libraryName); //$NON-NLS-1$
+ if (changeType == CHANGE_TYPE.REMOVED)
+ {
+ _tags.put(uri, WHOLE_LIBRARY);
+ } else
+ {
+ LibEntry tags = _tags.get(uri);
+ if (tags == null)
+ {
+ tags = new LibEntry(createDescriptor(jsfResource));
+ _tags.put(uri, tags);
+ }
+ }
}
}

Back to the top