Bug 453529 - Code assist for composites does not work with the new JSF
2.2 namespaces
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 2469157..8170999 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 @@
 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 fe9c043..fdc67d7 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 4bb808d..d0ff2a6 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 @@
 
 /**
  * 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 @@
 	@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 4cdfcad..61974ac 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 @@
 
 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 cc4bd15..d0028bd 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 @@
 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 6a5f081..f89c0ba 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 5ff74a7..d7ca0af 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 @@
         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 @@
             {
                 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 @@
             {
                 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);
+	                }
+	            }
             }
         }