diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentFactory.java index 68c0f7992..37a0ae843 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentFactory.java @@ -81,43 +81,83 @@ public class ComponentFactory * Base class name for UIInput's */ public final static String BASE_CLASS_UIINPUT = "javax.faces.component.UIInput"; //$NON-NLS-1$ + /** + * Base class name for UIInput's (Jakarta EE) + */ + public final static String BASE_CLASS_UIINPUT_JAKARTA = "jakarta.faces.component.UIInput"; //$NON-NLS-1$ /** * Base class name for UIOutput's */ public final static String BASE_CLASS_UIOUTPUT = "javax.faces.component.UIOutput"; //$NON-NLS-1$ + /** + * Base class name for UIOutput's (Jakarta EE) + */ + public final static String BASE_CLASS_UIOUTPUT_JAKARTA = "jakarta.faces.component.UIOutput"; //$NON-NLS-1$ /** * Base class name for UICommand's */ public final static String BASE_CLASS_UICOMMAND = "javax.faces.component.UICommand"; //$NON-NLS-1$ + /** + * Base class name for UICommand's (Jakarta EE) + */ + public final static String BASE_CLASS_UICOMMAND_JAKARTA = "jakarta.faces.component.UICommand"; //$NON-NLS-1$ /** * Base class name for UIData's */ public final static String BASE_CLASS_UIDATA = "javax.faces.component.UIData"; //$NON-NLS-1$ + /** + * Base class name for UIData's (Jakarta EE) + */ + public final static String BASE_CLASS_UIDATA_JAKARTA = "jakarta.faces.component.UIData"; //$NON-NLS-1$ /** * Base class name for UIForm's */ public final static String BASE_CLASS_UIFORM = "javax.faces.component.UIForm"; //$NON-NLS-1$ + /** + * Base class name for UIForm's (Jakarta EE) + */ + public final static String BASE_CLASS_UIFORM_JAKARTA = "jakarta.faces.component.UIForm"; //$NON-NLS-1$ /** * Interface name for ValueHolder's */ public final static String INTERFACE_VALUEHOLDER = "javax.faces.component.ValueHolder"; //$NON-NLS-1$ + /** + * Interface name for ValueHolder's (Jakarta EE) + */ + public final static String INTERFACE_VALUEHOLDER_JAKARTA = "jakarta.faces.component.ValueHolder"; //$NON-NLS-1$ /** * Interface name for EditableValueHolder's */ public final static String INTERFACE_EDITABLEVALUEHOLDER = "javax.faces.component.EditableValueHolder"; //$NON-NLS-1$ + /** + * Interface name for EditableValueHolder's (Jakarta EE) + */ + public final static String INTERFACE_EDITABLEVALUEHOLDER_JAKARTA = "jakarta.faces.component.EditableValueHolder"; //$NON-NLS-1$ /** * Interface name for ActionSource's */ public final static String INTERFACE_ACTIONSOURCE = "javax.faces.component.ActionSource"; //$NON-NLS-1$ + /** + * Interface name for ActionSource's (Jakarta EE) + */ + public final static String INTERFACE_ACTIONSOURCE_JAKARTA = "jakarta.faces.component.ActionSource"; //$NON-NLS-1$ /** * Interface name for ActionSource2's */ public final static String INTERFACE_ACTIONSOURCE2 = "javax.faces.component.ActionSource2"; //$NON-NLS-1$ + /** + * Interface name for ActionSource2's (Jakarta EE) + */ + public final static String INTERFACE_ACTIONSOURCE2_JAKARTA = "jakarta.faces.component.ActionSource2"; //$NON-NLS-1$ /** * Interface name for NamingContainer's */ public final static String INTERFACE_NAMINGCONTAINER = "javax.faces.component.NamingContainer"; //$NON-NLS-1$ + /** + * Interface name for NamingContainer's (Jakarta EE) + */ + public final static String INTERFACE_NAMINGCONTAINER_JAKARTA = "jakarta.faces.component.NamingContainer"; //$NON-NLS-1$ /** * @param id diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagElement.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagElement.java index 52f61d2e4..8ad34aca7 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagElement.java @@ -36,7 +36,7 @@ public interface ITagElement extends Serializable /** * @return the fully qualified class name in dot separated format - * (i.e. javax.faces.webapp.ConverterTag) + * (i.e. javax.faces.webapp.ConverterTag or jakarta.faces.webapp.ConverterTag) */ public abstract String getTagHandlerClassName(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/TypeConstants.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/TypeConstants.java index 19e987f5d..0e68ecb4d 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/TypeConstants.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/TypeConstants.java @@ -101,6 +101,10 @@ public class TypeConstants * Type signature for the JSF Data Model type */ public static final String TYPE_DATA_MODEL = "Ljavax.faces.model.DataModel;"; //$NON-NLS-1$ + /** + * Type signature for the Jakarta Faces Data Model type + */ + public static final String TYPE_DATA_MODEL_JAKARTA = "Ljakarta.faces.model.DataModel;"; //$NON-NLS-1$ /** * Type signature for the Result Set type */ @@ -109,6 +113,10 @@ public class TypeConstants * Type signature for the JSTL ResultSet type */ public static final String TYPE_JAVAX_SERVLET_JSP_JSTL_SQL_RESULT = "Ljavax.servlet.jsp.jstl.sql.Result;"; //$NON-NLS-1$ + /** + * Type signature for the JSTL ResultSet type (Jakarta EE) + */ + public static final String TYPE_JAKARTA_SERVLET_JSP_JSTL_SQL_RESULT = "Ljakarta.servlet.jsp.jstl.sql.Result;"; //$NON-NLS-1$ /** * Type signature of the base type of all enum types */ 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 0d908e83d..a6b7cf196 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,8 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Automatic-Module-Name: org.eclipse.jst.jsf.core Bundle-Name: %plugin.name -Bundle-SymbolicName: org.eclipse.jst.jsf.core; singleton:=true +Bundle-SymbolicName: org.eclipse.jst.jsf.core;singleton:=true Bundle-Version: 1.9.3.qualifier +Bundle-ClassPath: . Bundle-Activator: org.eclipse.jst.jsf.core.internal.JSFCorePlugin Bundle-Vendor: %plugin.provider Bundle-Localization: plugin @@ -26,9 +27,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", org.eclipse.wst.common.emf;bundle-version="[1.1.103,2.0.0)", org.eclipse.jem.util;bundle-version="[2.0.0,3.0.0)", org.eclipse.emf.common;bundle-version="[2.2.0,3.0.0)", - org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)", + org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)";visibility:=reexport, org.eclipse.core.commands;bundle-version="[3.2.0,4.0.0)", - org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)", + org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)";visibility:=reexport, org.eclipse.emf.edit;bundle-version="[2.2.0,3.0.0)", org.eclipse.jst.common.project.facet.core;bundle-version="[1.1.0,2.0.0)", org.eclipse.jst.jsf.common.runtime;bundle-version="[1.0.0,2.0.0)", @@ -37,7 +38,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", org.eclipse.wst.css.core;bundle-version="[1.1.200,2.0.0)", org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)", org.eclipse.ui;bundle-version="3.6.0" -Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.jst.jsf.core.internal.contenttype" +Eclipse-LazyStart: true +Bundle-ActivationPolicy: lazy;exclude:=org.eclipse.jst.jsf.core.internal.contenttype Export-Package: org.eclipse.jst.jsf.core, org.eclipse.jst.jsf.core.internal;x-friends:="org.eclipse.jst.jsf.core.tests,org.eclipse.jst.jsf.ui,org.eclipse.jst.jsf.ui.tests", org.eclipse.jst.jsf.core.internal.contentassist.el;x-friends:="org.eclipse.jst.jsf.contentassist.tests", @@ -53,9 +55,12 @@ Export-Package: org.eclipse.jst.jsf.core, org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl;x-friends:="org.eclipse.jst.jsf.core.tests,org.eclipse.jst.jsf.ui,org.eclipse.jst.jsf.ui.tests", org.eclipse.jst.jsf.core.internal.jsflibraryregistry.util;x-friends:="org.eclipse.jst.jsf.core.tests,org.eclipse.jst.jsf.ui,org.eclipse.jst.jsf.ui.tests", org.eclipse.jst.jsf.core.internal.launch;x-internal:=true, + org.eclipse.jst.jsf.core.internal.preferences, org.eclipse.jst.jsf.core.internal.project.facet;x-friends:="org.eclipse.jst.jsf.core.tests,org.eclipse.jst.jsf.ui,org.eclipse.jst.jsf.ui.tests", + org.eclipse.jst.jsf.core.internal.provisional.contenttype, org.eclipse.jst.jsf.core.internal.region;x-internal:=true, org.eclipse.jst.jsf.core.internal.tld;x-friends:="org.eclipse.jst.pagedesigner,org.eclipse.jst.jsf.core.tests", + org.eclipse.jst.jsf.core.internal.util, org.eclipse.jst.jsf.core.jsfappconfig, org.eclipse.jst.jsf.core.jsfappconfig.internal;x-internal:=true, org.eclipse.jst.jsf.core.jsflibraryconfiguration, @@ -120,3 +125,4 @@ Export-Package: org.eclipse.jst.jsf.core, org.eclipse.jst.jsf.validation.internal.facelet, org.eclipse.jst.jsf.validation.internal.strategy;x-internal:=true Bundle-RequiredExecutionEnvironment: JavaSE-17 +Import-Package: org.eclipse.core.filebuffers diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/build.properties b/jsf/plugins/org.eclipse.jst.jsf.core/build.properties index 816585f13..8a9e050f8 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/build.properties +++ b/jsf/plugins/org.eclipse.jst.jsf.core/build.properties @@ -16,6 +16,7 @@ bin.includes = META-INF/,\ .,\ plugin.xml,\ plugin.properties,\ + icons/,\ schema/,\ about.html,\ .options,\ diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/icons/jsf_facet.gif b/jsf/plugins/org.eclipse.jst.jsf.core/icons/jsf_facet.gif new file mode 100644 index 000000000..d28e39cd2 Binary files /dev/null and b/jsf/plugins/org.eclipse.jst.jsf.core/icons/jsf_facet.gif differ diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/model/jsflibraryregistry.ecore b/jsf/plugins/org.eclipse.jst.jsf.core/model/jsflibraryregistry.ecore index dfbc002fa..d5af6e0c9 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/model/jsflibraryregistry.ecore +++ b/jsf/plugins/org.eclipse.jst.jsf.core/model/jsflibraryregistry.ecore @@ -84,5 +84,12 @@ + + + + + + + diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/model/jsflibraryregistry.genmodel b/jsf/plugins/org.eclipse.jst.jsf.core/model/jsflibraryregistry.genmodel index 2c7c455fe..46c01f01c 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/model/jsflibraryregistry.genmodel +++ b/jsf/plugins/org.eclipse.jst.jsf.core/model/jsflibraryregistry.genmodel @@ -1,11 +1,9 @@ - + jsflibraryregistry.ecore @@ -13,6 +11,13 @@ + + + + + + + diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/plugin.properties b/jsf/plugins/org.eclipse.jst.jsf.core/plugin.properties index 76f6b814a..7dc757c6f 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/plugin.properties +++ b/jsf/plugins/org.eclipse.jst.jsf.core/plugin.properties @@ -9,7 +9,7 @@ # # Contributors: # Gerry Kessler - initial API and implementation -############################################################################### +############################################################################### plugin.name=JSF Tools - Core plugin.provider=Eclipse Web Tools Platform plugin.facet.name=JavaServer Faces @@ -17,23 +17,14 @@ plugin.facet.description=Enables the project to be deployed with JSF capabilitie JSFELValidator=JSP JSF EL Validator -JSFv11Project=JavaServer Faces v1.1 Project -JSFv11PresetDesc=Configures a Dynamic Web application to use JSF v1.1 - -JSFv12Project=JavaServer Faces v1.2 Project -JSFv12PresetDesc=Configures a Dynamic Web application to use JSF v1.2 - -JSFv20Project=JavaServer Faces v2.0 Project -JSFv20PresetDesc=Configures a Dynamic Web application to use JSF v2.0 - -JSFv21Project=JavaServer Faces v2.1 Project -JSFv21PresetDesc=Configures a Dynamic Web application to use JSF v2.1 - -JSFv22Project=JavaServer Faces v2.2 Project -JSFv22PresetDesc=Configures a Dynamic Web application to use JSF v2.2 - JSFv23Project=JavaServer Faces v2.3 Project JSFv23PresetDesc=Configures a Dynamic Web application to use JSF v2.3 + +JSFv40Project=Jakarta Faces v4.0 Project +JSFv40PresetDesc=Configures a Dynamic Web application to use JSF v4.0 + +JSFv41Project=Jakarta Faces v4.1 Project +JSFv41PresetDesc=Configures a Dynamic Web application to use JSF v4.1 # ==================================================================== pluginName = Constraints Model @@ -67,4 +58,6 @@ extension-point.name.14 = JSF AppConfig Locator Provider Factory (internal) extension-point.name.15 = JSF AppConfig Manager Factory (internal) Facelet.name=Facelet FaceletComposite.name=Facelet Composite Component -extension-point.name.viewHandlerOverride = viewHandlerOverride \ No newline at end of file +extension-point.name.viewHandlerOverride = viewHandlerOverride + +JSF_Content_Type_Extension_Element.name=JSF diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml b/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml index 820cd4cbc..1186aa776 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml +++ b/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml @@ -18,6 +18,14 @@ + + + + + - + @@ -54,7 +62,7 @@ - + @@ -62,7 +70,7 @@ - + @@ -70,120 +78,66 @@ - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - ` - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - + + + - - - - - - - - + + - - - - - - - - - - - - - - - - - - - + - - + + + + + + - + - - - - - - %JSFv11PresetDesc - - - - - - - - %JSFv12PresetDesc - - - - - - - - - - - - %JSFv20PresetDesc - - - - - - - - - - - - %JSFv21PresetDesc - - - - - - - - - - - - %JSFv22PresetDesc - - - @@ -284,16 +155,31 @@ %JSFv23PresetDesc - + + + + + + + %JSFv40PresetDesc + + + + + + + + %JSFv41PresetDesc + - + - + @@ -434,6 +320,9 @@ + @@ -514,13 +403,13 @@ point="org.eclipse.jst.jsf.core.tagregistry"> + description="%JSF_TAG_REGISTRY_DESCRIPTION" + id="default.jsf"> + contentTypeId="org.eclipse.jst.jsf.core.jsfsource"> + contentTypeId="org.eclipse.jst.jsf.core.jsffragmentsource"> @@ -597,6 +486,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -678,4 +594,36 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/IJSFCoreConstants.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/IJSFCoreConstants.java index eabd62cf0..ef652105a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/IJSFCoreConstants.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/IJSFCoreConstants.java @@ -93,6 +93,33 @@ public final class IJSFCoreConstants */ public static final String JSF_VERSION_2_3 = FACET_VERSION_2_3; + /** + * The facet version for a Jakarta Faces 3.0 project + */ + public static final String FACET_VERSION_3_0 = "3.0"; //$NON-NLS-1$ + /** + * The version string for a Jakarta Faces 3.0 project + */ + public static final String JSF_VERSION_3_0 = FACET_VERSION_3_0; + + /** + * The facet version for a Jakarta Faces 4.0 project + */ + public static final String FACET_VERSION_4_0 = "4.0"; //$NON-NLS-1$ + /** + * The version string for a Jakarta Faces 4.0 project + */ + public static final String JSF_VERSION_4_0 = FACET_VERSION_4_0; + + /** + * The facet version for a Jakarta Faces 4.1 project + */ + public static final String FACET_VERSION_4_1 = "4.1"; //$NON-NLS-1$ + /** + * The version string for a Jakarta Faces 4.1 project + */ + public static final String JSF_VERSION_4_1 = FACET_VERSION_4_1; + /** * @param facet * @return true if the facet is a jsf facet. diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/JSFVersion.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/JSFVersion.java index d112baa6e..a12ab3c00 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/JSFVersion.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/JSFVersion.java @@ -9,7 +9,7 @@ * * Contributors: * Oracle Corporation - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.jst.jsf.core; import org.eclipse.core.resources.IProject; @@ -60,7 +60,19 @@ public enum JSFVersion { /** * Supports JSF Version 2.3 */ - V2_3; + V2_3, + /** + * Supports Jakarta Faces Version 3.0 + */ + V3_0, + /** + * Supports Jakarta Faces Version 4.0 + */ + V4_0, + /** + * Supports Jakarta Faces Version 4.1 + */ + V4_1; // WARNING: you MUST add newer versions to the end; the ordinal value of // of the version is used in compareTo. @@ -82,6 +94,12 @@ public String toString() { return IJSFCoreConstants.JSF_VERSION_2_2; case V2_3: return IJSFCoreConstants.JSF_VERSION_2_3; + case V3_0: + return IJSFCoreConstants.JSF_VERSION_3_0; + case V4_0: + return IJSFCoreConstants.JSF_VERSION_4_0; + case V4_1: + return IJSFCoreConstants.JSF_VERSION_4_1; case UNKNOWN: return "unknown"; //$NON-NLS-1$ default: @@ -123,6 +141,18 @@ else if (IJSFCoreConstants.JSF_VERSION_2_3.equals(valueAsString)) { return V2_3; } + else if (IJSFCoreConstants.JSF_VERSION_3_0.equals(valueAsString)) + { + return V3_0; + } + else if (IJSFCoreConstants.JSF_VERSION_4_0.equals(valueAsString)) + { + return V4_0; + } + else if (IJSFCoreConstants.JSF_VERSION_4_1.equals(valueAsString)) + { + return V4_1; + } else if ("unknown".equals(valueAsString)) //$NON-NLS-1$ { return UNKNOWN; @@ -206,6 +236,11 @@ public static JSFVersion guessJSFVersion(final IProject project) { jsfVersion = JSFVersion.V2_1; } } + else if (javaProj.findType("jakarta.faces.component.html.HtmlBody") != null) //$NON-NLS-1$ + { + // at least 3.0 inside here + jsfVersion = JSFVersion.V3_0; + } } } catch (JavaModelException jme) diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contenttype/ContentDescriberForJSF.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contenttype/ContentDescriberForJSF.java new file mode 100644 index 000000000..fe0eed310 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/contenttype/ContentDescriberForJSF.java @@ -0,0 +1,256 @@ +/******************************************************************************* + * Copyright (c) 2004-2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.contenttype; + +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; + +import org.eclipse.core.runtime.QualifiedName; +import org.eclipse.core.runtime.content.IContentDescriber; +import org.eclipse.core.runtime.content.IContentDescription; +import org.eclipse.core.runtime.content.ITextContentDescriber; +import org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector; +import org.eclipse.jst.jsp.core.internal.provisional.contenttype.IContentDescriptionForJSP; +import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeFamilyForHTML; +import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento; +import org.eclipse.wst.sse.core.internal.encoding.IContentDescriptionExtended; +import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector; + +public class ContentDescriberForJSF implements ITextContentDescriber { + private final static QualifiedName[] SUPPORTED_OPTIONS = {IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK, IContentDescriptionExtended.DETECTED_CHARSET, IContentDescriptionExtended.UNSUPPORTED_CHARSET, IContentDescriptionExtended.APPROPRIATE_DEFAULT, IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE, IContentDescriptionForJSP.LANGUAGE_ATTRIBUTE, IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE}; + + /* + * (non-Javadoc) + * + * @see org.eclipse.core.runtime.content.IContentDescriber#describe(java.io.InputStream, + * org.eclipse.core.runtime.content.IContentDescription) + */ + public int describe(InputStream contents, IContentDescription description) throws IOException { + int result = IContentDescriber.INVALID; + + // if discription is null, we are just being asked to + // assess contents validity + if (description != null) { + result = calculateSupportedOptions(contents, description); + } + else { + result = determineValidity(contents); + } + + return result; + } + + private int determineValidity(InputStream contents) { + // There's little to prove, via contents, that + // a file is JSP, so always return interminant, and + // let filetypes decide. + return IContentDescriber.INDETERMINATE; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.core.runtime.content.ITextContentDescriber#describe(java.io.Reader, + * org.eclipse.core.runtime.content.IContentDescription) + */ + public int describe(Reader contents, IContentDescription description) throws IOException { + int result = IContentDescriber.INVALID; + + // if discription is null, we are just being asked to + // assess contents validity + if (description != null) { + result = calculateSupportedOptions(contents, description); + } + else { + result = determineValidity(contents); + } + + return result; + } + + private int determineValidity(Reader contents) { + // There's little to prove, via contents, that + // a file is JSP, so always return interminant, and + // let filetypes decide. + return IContentDescriber.INDETERMINATE; + } + + public QualifiedName[] getSupportedOptions() { + return SUPPORTED_OPTIONS; + } + + private int calculateSupportedOptions(InputStream contents, IContentDescription description) throws IOException { + int result = IContentDescriber.INDETERMINATE; + if (isRelevent(description)) { + IResourceCharsetDetector detector = getDetector(); + detector.set(contents); + handleCalculations(description, detector); + result = IContentDescriber.VALID; + } + return result; + } + + /** + * @param contents + * @param description + * @throws IOException + */ + private int calculateSupportedOptions(Reader contents, IContentDescription description) throws IOException { + int result = IContentDescriber.INDETERMINATE; + if (isRelevent(description)) { + IResourceCharsetDetector detector = getDetector(); + detector.set(contents); + handleCalculations(description, detector); + result = IContentDescriber.VALID; + } + return result; + } + + private IResourceCharsetDetector getDetector() { + return new JSPResourceEncodingDetector(); + } + + private void handleCalculations(IContentDescription description, IResourceCharsetDetector detector) throws IOException { + // handle standard ones first, to be sure detector processes + handleStandardCalculations(description, detector); + // now do those specific for JSPs + // note: detector should always be of correct instance, but we'll + // check, for now. + if (detector instanceof JSPResourceEncodingDetector) { + JSPResourceEncodingDetector jspDetector = (JSPResourceEncodingDetector) detector; + String language = jspDetector.getLanguage(); + if (language != null && language.length() > 0) { + description.setProperty(IContentDescriptionForJSP.LANGUAGE_ATTRIBUTE, language); + } + /* + * content type is literally the content type that's in the page + * directive + */ + String contentTypeAttribute = jspDetector.getContentType(); + if (contentTypeAttribute != null && contentTypeAttribute.length() > 0) { + description.setProperty(IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE, contentTypeAttribute); + } + /* + * content family is the general class of content, when its + * different from what's defined by content type + */ + if (jspDetector.isXHTML() || jspDetector.isWML()) { + // ISSUE: long term this logic and value should be contributed by extension point + description.setProperty(IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE, ContentTypeFamilyForHTML.HTML_FAMILY); + } + + + } + } + + private void handleDetectedSpecialCase(IContentDescription description, Object detectedCharset, Object javaCharset) { + if (detectedCharset != null) { + // Once we detected a charset, we should set the property even + // though it's the same as javaCharset + // because there are clients that rely on this property to + // determine if the charset is actually detected in file or not. + description.setProperty(IContentDescriptionExtended.DETECTED_CHARSET, detectedCharset); + } + } + + /** + * @param description + * @param detector + * @throws IOException + */ + private void handleStandardCalculations(IContentDescription description, IResourceCharsetDetector detector) throws IOException { + // note: if we're asked for one, we set them all. I need to be sure if + // called + // mulitiple times (one for each, say) that we don't waste time + // processing same + // content again. + EncodingMemento encodingMemento = ((JSPResourceEncodingDetector) detector).getEncodingMemento(); + // TODO: I need to verify to see if this BOM work is always done + // by text type. + Object detectedByteOrderMark = encodingMemento.getUnicodeBOM(); + if (detectedByteOrderMark != null) { + Object existingByteOrderMark = description.getProperty(IContentDescription.BYTE_ORDER_MARK); + // not sure why would ever be different, so if is different, may + // need to "push" up into base. + if (!detectedByteOrderMark.equals(existingByteOrderMark)) + description.setProperty(IContentDescription.BYTE_ORDER_MARK, detectedByteOrderMark); + } + + + if (!encodingMemento.isValid()) { + // note: after setting here, its the mere presence of + // IContentDescriptionExtended.UNSUPPORTED_CHARSET + // in the resource's description that can be used to determine if + // invalid + // in those cases, the "detected" property contains an + // "appropriate default" to use. + description.setProperty(IContentDescriptionExtended.UNSUPPORTED_CHARSET, encodingMemento.getInvalidEncoding()); + description.setProperty(IContentDescriptionExtended.APPROPRIATE_DEFAULT, encodingMemento.getAppropriateDefault()); + } + + Object detectedCharset = encodingMemento.getDetectedCharsetName(); + Object javaCharset = encodingMemento.getJavaCharsetName(); + + // we always include detected, if its different than java + handleDetectedSpecialCase(description, detectedCharset, javaCharset); + + if (javaCharset != null) { + Object existingCharset = description.getProperty(IContentDescription.CHARSET); + if (javaCharset.equals(existingCharset)) { + handleDetectedSpecialCase(description, detectedCharset, javaCharset); + } + else { + // we may need to add what we found, but only need to add + // if different from the default. + Object defaultCharset = detector.getSpecDefaultEncoding(); + if (defaultCharset != null) { + if (!defaultCharset.equals(javaCharset)) { + description.setProperty(IContentDescription.CHARSET, javaCharset); + } + } + else { + // assuming if there is no spec default, we always need to + // add, I'm assuming + description.setProperty(IContentDescription.CHARSET, javaCharset); + } + } + } + + } + + /** + * @param description + * @return + */ + private boolean isRelevent(IContentDescription description) { + boolean result = false; + if (description == null) + result = false; + else if (description.isRequested(IContentDescription.BYTE_ORDER_MARK)) + result = true; + else if (description.isRequested(IContentDescription.CHARSET)) + result = true; + else if (description.isRequested(IContentDescriptionExtended.APPROPRIATE_DEFAULT)) + result = true; + else if (description.isRequested(IContentDescriptionExtended.DETECTED_CHARSET)) + result = true; + else if (description.isRequested(IContentDescriptionExtended.UNSUPPORTED_CHARSET)) + result = true; + else if (description.isRequested(IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE)) + result = true; + else if (description.isRequested(IContentDescriptionForJSP.LANGUAGE_ATTRIBUTE)) + result = true; + return result; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/ArchiveFile.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/ArchiveFile.java index 3706b8b87..ab667d3b1 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/ArchiveFile.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/ArchiveFile.java @@ -21,18 +21,17 @@ * *

* The following features are supported: + *

*
    *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile#isRelativeToWorkspace Relative To Workspace}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile#getSourceLocation Source Location}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile#getRelativeDestLocation Relative Dest Location}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.ArchiveFile#getJSFLibrary JSF Library}
  • *
- *

* * @see org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryPackage#getArchiveFile() * @model * @generated - * @deprecated */ public interface ArchiveFile extends EObject{ /** @@ -137,7 +136,7 @@ public interface ArchiveFile extends EObject{ * @see #setJSFLibrary(JSFLibrary) * @see org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryPackage#getArchiveFile_JSFLibrary() * @see org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary#getArchiveFiles - * @model opposite="ArchiveFiles" required="true" + * @model opposite="ArchiveFiles" required="true" transient="false" * @generated */ JSFLibrary getJSFLibrary(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFLibrary.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFLibrary.java index 28bb3ff4a..653c3b6a8 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFLibrary.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFLibrary.java @@ -22,6 +22,7 @@ * *

* The following features are supported: + *

*
    *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary#getID ID}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary#getName Name}
  • @@ -30,12 +31,10 @@ *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary#isImplementation Implementation}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary#getArchiveFiles Archive Files}
  • *
- *

* * @see org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryPackage#getJSFLibrary() * @model * @generated - * @deprecated */ public interface JSFLibrary extends EObject{ /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFLibraryRegistry.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFLibraryRegistry.java index adf3d6a6e..1e1f71efa 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFLibraryRegistry.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFLibraryRegistry.java @@ -23,17 +23,16 @@ * *

* The following features are supported: + *

*
    *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry#getDefaultImplementationID Default Implementation ID}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry#getJSFLibraries JSF Libraries}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistry#getPluginProvidedJSFLibraries Plugin Provided JSF Libraries}
  • *
- *

* * @see org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryPackage#getJSFLibraryRegistry() * @model * @generated - * @deprecated */ public interface JSFLibraryRegistry extends EObject{ /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFVersion.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFVersion.java index 7e8ac1447..cbf2e0137 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFVersion.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/JSFVersion.java @@ -26,7 +26,6 @@ * @see org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryPackage#getJSFVersion() * @model * @generated - * @deprecated */ public final class JSFVersion extends AbstractEnumerator { /** @@ -81,6 +80,83 @@ public final class JSFVersion extends AbstractEnumerator { */ public static final int V1_2 = 2; + /** + * The 'V2 0' literal value. + * + * + * @see #V2_0_LITERAL + * @model name="v2_0" + * @generated + * @ordered + */ + public static final int V2_0 = 3; + + /** + * The 'V2 1' literal value. + * + * + * @see #V2_1_LITERAL + * @model name="v2_1" + * @generated + * @ordered + */ + public static final int V2_1 = 4; + + /** + * The 'V2 2' literal value. + * + * + * @see #V2_2_LITERAL + * @model name="v2_2" + * @generated + * @ordered + */ + public static final int V2_2 = 5; + + /** + * The 'V2 3' literal value. + * + * + * @see #V2_3_LITERAL + * @model name="v2_3" + * @generated + * @ordered + */ + public static final int V2_3 = 6; + + /** + * The 'V3 0' literal value. + * + * + * @see #V3_0_LITERAL + * @model name="v3_0" + * @generated + * @ordered + */ + public static final int V3_0 = 7; + + /** + * The 'V4 0' literal value. + * + * + * @see #V4_0_LITERAL + * @model name="v4_0" + * @generated + * @ordered + */ + public static final int V4_0 = 8; + + /** + * The 'V4 1' literal value. + * + * + * @see #V4_1_LITERAL + * @model name="v4_1" + * @generated + * @ordered + */ + public static final int V4_1 = 9; + /** * The 'UNKNOWN' literal object. * @@ -111,6 +187,76 @@ public final class JSFVersion extends AbstractEnumerator { */ public static final JSFVersion V1_2_LITERAL = new JSFVersion(V1_2, "v1_2", "v1_2"); //$NON-NLS-1$ //$NON-NLS-2$ + /** + * The 'V2 0' literal object. + * + * + * @see #V2_0 + * @generated + * @ordered + */ + public static final JSFVersion V2_0_LITERAL = new JSFVersion(V2_0, "v2_0", "v2_0"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The 'V2 1' literal object. + * + * + * @see #V2_1 + * @generated + * @ordered + */ + public static final JSFVersion V2_1_LITERAL = new JSFVersion(V2_1, "v2_1", "v2_1"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The 'V2 2' literal object. + * + * + * @see #V2_2 + * @generated + * @ordered + */ + public static final JSFVersion V2_2_LITERAL = new JSFVersion(V2_2, "v2_2", "v2_2"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The 'V2 3' literal object. + * + * + * @see #V2_3 + * @generated + * @ordered + */ + public static final JSFVersion V2_3_LITERAL = new JSFVersion(V2_3, "v2_3", "v2_3"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The 'V3 0' literal object. + * + * + * @see #V3_0 + * @generated + * @ordered + */ + public static final JSFVersion V3_0_LITERAL = new JSFVersion(V3_0, "v3_0", "v3_0"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The 'V4 0' literal object. + * + * + * @see #V4_0 + * @generated + * @ordered + */ + public static final JSFVersion V4_0_LITERAL = new JSFVersion(V4_0, "v4_0", "v4_0"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** + * The 'V4 1' literal object. + * + * + * @see #V4_1 + * @generated + * @ordered + */ + public static final JSFVersion V4_1_LITERAL = new JSFVersion(V4_1, "v4_1", "v4_1"); //$NON-NLS-1$ //$NON-NLS-2$ + /** * An array of all the 'JSF Version' enumerators. * @@ -122,6 +268,13 @@ public final class JSFVersion extends AbstractEnumerator { UNKNOWN_LITERAL, V1_1_LITERAL, V1_2_LITERAL, + V2_0_LITERAL, + V2_1_LITERAL, + V2_2_LITERAL, + V2_3_LITERAL, + V3_0_LITERAL, + V4_0_LITERAL, + V4_1_LITERAL, }; /** @@ -138,6 +291,8 @@ public final class JSFVersion extends AbstractEnumerator { * @param literal value * @return the JSF version for name value * + * @param literal the literal. + * @return the matching enumerator or null. * @generated */ public static JSFVersion get(String literal) { @@ -156,6 +311,8 @@ public static JSFVersion get(String literal) { * @param name * @return JSFVersion * + * @param name the name. + * @return the matching enumerator or null. * @generated */ public static JSFVersion getByName(String name) { @@ -174,6 +331,8 @@ public static JSFVersion getByName(String name) { * @param value * @return the JSFVersion for the integer 'value' * + * @param value the integer value. + * @return the matching enumerator or null. * @generated */ public static JSFVersion get(int value) { @@ -181,6 +340,13 @@ public static JSFVersion get(int value) { case UNKNOWN: return UNKNOWN_LITERAL; case V1_1: return V1_1_LITERAL; case V1_2: return V1_2_LITERAL; + case V2_0: return V2_0_LITERAL; + case V2_1: return V2_1_LITERAL; + case V2_2: return V2_2_LITERAL; + case V2_3: return V2_3_LITERAL; + case V3_0: return V3_0_LITERAL; + case V4_0: return V4_0_LITERAL; + case V4_1: return V4_1_LITERAL; } return null; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/PluginProvidedJSFLibrary.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/PluginProvidedJSFLibrary.java index c028d6755..0d3028855 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/PluginProvidedJSFLibrary.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/PluginProvidedJSFLibrary.java @@ -20,16 +20,15 @@ * *

* The following features are supported: + *

*
    *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.PluginProvidedJSFLibrary#getPluginID Plugin ID}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.PluginProvidedJSFLibrary#getLabel Label}
  • *
- *

* * @see org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibraryRegistryPackage#getPluginProvidedJSFLibrary() * @model * @generated - * @deprecated */ public interface PluginProvidedJSFLibrary extends JSFLibrary{ /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java index d7bc8f28a..536abfb55 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/ArchiveFileImpl.java @@ -51,16 +51,15 @@ * *

* The following features are implemented: + *

*
    *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.ArchiveFileImpl#isRelativeToWorkspace Relative To Workspace}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.ArchiveFileImpl#getSourceLocation Source Location}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.ArchiveFileImpl#getRelativeDestLocation Relative Dest Location}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.ArchiveFileImpl#getJSFLibrary JSF Library}
  • *
- *

* * @generated - * @deprecated */ public class ArchiveFileImpl extends EObjectImpl implements ArchiveFile { /** @@ -253,8 +252,8 @@ public void setRelativeDestLocation(String newRelativeDestLocation) { * @generated */ public JSFLibrary getJSFLibrary() { - if (eContainerFeatureID != JSFLibraryRegistryPackage.ARCHIVE_FILE__JSF_LIBRARY) return null; - return (JSFLibrary)eContainer(); + if (eContainerFeatureID() != JSFLibraryRegistryPackage.ARCHIVE_FILE__JSF_LIBRARY) return null; + return (JSFLibrary)eInternalContainer(); } /** @@ -277,9 +276,9 @@ public NotificationChain basicSetJSFLibrary(JSFLibrary newJSFLibrary, Notificati * @generated */ public void setJSFLibrary(JSFLibrary newJSFLibrary) { - if (newJSFLibrary != eInternalContainer() || (eContainerFeatureID != JSFLibraryRegistryPackage.ARCHIVE_FILE__JSF_LIBRARY && newJSFLibrary != null)) { + if (newJSFLibrary != eInternalContainer() || (eContainerFeatureID() != JSFLibraryRegistryPackage.ARCHIVE_FILE__JSF_LIBRARY && newJSFLibrary != null)) { if (EcoreUtil.isAncestor(this, newJSFLibrary)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); @@ -544,7 +543,7 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, * @generated */ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID) { + switch (eContainerFeatureID()) { case JSFLibraryRegistryPackage.ARCHIVE_FILE__JSF_LIBRARY: return eInternalContainer().eInverseRemove(this, JSFLibraryRegistryPackage.JSF_LIBRARY__ARCHIVE_FILES, JSFLibrary.class, msgs); } @@ -695,11 +694,11 @@ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (RelativeToWorkspace: "); //$NON-NLS-1$ + result.append(" (RelativeToWorkspace: "); result.append(relativeToWorkspace); - result.append(", SourceLocation: "); //$NON-NLS-1$ + result.append(", SourceLocation: "); result.append(sourceLocation); - result.append(", RelativeDestLocation: "); //$NON-NLS-1$ + result.append(", RelativeDestLocation: "); result.append(relativeDestLocation); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/JSFLibraryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/JSFLibraryImpl.java index 9d6c8a8a0..4f70b447e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/JSFLibraryImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/JSFLibraryImpl.java @@ -37,6 +37,7 @@ * *

* The following features are implemented: + *

*
    *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryImpl#getID ID}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryImpl#getName Name}
  • @@ -45,10 +46,8 @@ *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryImpl#isImplementation Implementation}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryImpl#getArchiveFiles Archive Files}
  • *
- *

* * @generated - * @deprecated */ public class JSFLibraryImpl extends EObjectImpl implements JSFLibrary { /** @@ -543,15 +542,15 @@ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (ID: "); //$NON-NLS-1$ + result.append(" (ID: "); result.append(id); - result.append(", Name: "); //$NON-NLS-1$ + result.append(", Name: "); result.append(name); - result.append(", JSFVersion: "); //$NON-NLS-1$ + result.append(", JSFVersion: "); result.append(jsfVersion); - result.append(", Deployed: "); //$NON-NLS-1$ + result.append(", Deployed: "); result.append(deployed); - result.append(", Implementation: "); //$NON-NLS-1$ + result.append(", Implementation: "); result.append(implementation); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/JSFLibraryRegistryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/JSFLibraryRegistryImpl.java index 1edc3a64d..0bcd78e88 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/JSFLibraryRegistryImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/jsflibraryregistry/impl/JSFLibraryRegistryImpl.java @@ -36,15 +36,14 @@ * *

* The following features are implemented: + *

*
    *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl#getDefaultImplementationID Default Implementation ID}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl#getJSFLibraries JSF Libraries}
  • *
  • {@link org.eclipse.jst.jsf.core.internal.jsflibraryregistry.impl.JSFLibraryRegistryImpl#getPluginProvidedJSFLibraries Plugin Provided JSF Libraries}
  • *
- *

* * @generated - * @deprecated */ public class JSFLibraryRegistryImpl extends EObjectImpl implements JSFLibraryRegistry { /** @@ -426,7 +425,7 @@ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (DefaultImplementationID: "); //$NON-NLS-1$ + result.append(" (DefaultImplementationID: "); result.append(defaultImplementationID); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/messages.properties b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/messages.properties index 765385efb..4dea887df 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/messages.properties +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/messages.properties @@ -19,7 +19,7 @@ JSFLibraryConfigModel_Null_Data_Source=Data Source is not provided. JSFLibraryRegistry_ErrorLoadingFromExtPt=Error while loading JSF Libraries from extension points JSFLibraryClasspathContainer_IMPL_LIBRARY=[JSF Library - implementation] -JSFLibraryValidator_MISSING_JSF_IMPLEMENTATION_CLASSES=Selected libraries are missing key JSF implementation classes (javax.faces.*) +JSFLibraryValidator_MISSING_JSF_IMPLEMENTATION_CLASSES=Selected libraries are missing key JSF implementation classes (javax.faces.* or jakarta.faces.*) JSFFacetInstallDataModelProvider_ValidateServletName=Specify a servlet name to use JSFLibraryConfigPersistData_SAVED_IMPLLIB_NOT_FOUND=Saved JSF implementation library in {0} is unavailable in JSF Library Registry diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/modelhandler/ModelHandlerForJSF.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/modelhandler/ModelHandlerForJSF.java new file mode 100644 index 000000000..2c50082af --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/modelhandler/ModelHandlerForJSF.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2004, 2010 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.modelhandler; + +import org.eclipse.core.runtime.Preferences; +import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; +import org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP; + +public class ModelHandlerForJSF extends ModelHandlerForJSP { + + /** + * Needs to match what's in plugin registry. In fact, can be overwritten + * at run time with what's in registry! (so should never be 'final') + */ + static String AssociatedContentTypeID = "org.eclipse.jst.jsf.core.jsfsource"; //$NON-NLS-1$ + /** + * Needs to match what's in plugin registry. In fact, can be overwritten + * at run time with what's in registry! (so should never be 'final') + */ + private static String ModelHandlerID = "org.eclipse.jst.jsf.core.modelhandler"; //$NON-NLS-1$ + + + public ModelHandlerForJSF() { + super(); + setId(ModelHandlerID); + setAssociatedContentTypeId(AssociatedContentTypeID); + } + + public Preferences getPreferences() { + return JSFCorePlugin.getDefault().getPluginPreferences(); + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/preferences/JSFCorePreferenceInitializer.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/preferences/JSFCorePreferenceInitializer.java new file mode 100644 index 000000000..2bbd3240d --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/preferences/JSFCorePreferenceInitializer.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2005, 2011 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.preferences; + +import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; +import org.eclipse.core.runtime.preferences.DefaultScope; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.jst.jsp.core.internal.JSPCorePlugin; +import org.eclipse.wst.sse.core.internal.encoding.CommonCharsetNames; +import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames; +import org.eclipse.wst.sse.core.internal.validate.ValidationMessage; + +/** + * Sets default values for JSF Core preferences + */ +public class JSFCorePreferenceInitializer extends AbstractPreferenceInitializer { + + public void initializeDefaultPreferences() { + IEclipsePreferences node = new DefaultScope().getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName()); + + // compiler/validation preferences + node.putBoolean(JSFCorePreferenceNames.VALIDATE_FRAGMENTS, true); + + // code generation preferences + node.put(CommonEncodingPreferenceNames.INPUT_CODESET, ""); //$NON-NLS-1$ + String defaultEnc = "ISO-8859-1";//$NON-NLS-1$ + String systemEnc = System.getProperty("file.encoding"); //$NON-NLS-1$ + if (systemEnc != null) { + defaultEnc = CommonCharsetNames.getPreferredDefaultIanaName(systemEnc, "ISO-8859-1");//$NON-NLS-1$ + } + node.put(CommonEncodingPreferenceNames.OUTPUT_CODESET, defaultEnc); + node.put(CommonEncodingPreferenceNames.END_OF_LINE_CODE, ""); //$NON-NLS-1$ + + // this could be made smarter by actually looking up the content + // type's valid extensions + node.put(JSFCorePreferenceNames.DEFAULT_EXTENSION, "xhtml"); //$NON-NLS-1$ + + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS, ValidationMessage.IGNORE); + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME, ValidationMessage.ERROR); + + node.putInt(JSFCorePreferenceNames.VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED, ValidationMessage.IGNORE); + node.putInt(JSFCorePreferenceNames.VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED, ValidationMessage.IGNORE); + node.putInt(JSFCorePreferenceNames.VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE, ValidationMessage.IGNORE); + node.putInt(JSFCorePreferenceNames.VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE, ValidationMessage.IGNORE); + node.putInt(JSFCorePreferenceNames.VALIDATION_JAVA_UNUSED_IMPORT, ValidationMessage.IGNORE); + + node.putInt(JSFCorePreferenceNames.VALIDATION_EL_SYNTAX, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_EL_LEXER, ValidationMessage.IGNORE); + node.putInt(JSFCorePreferenceNames.VALIDATION_EL_FUNCTION_UNDEFINED, ValidationMessage.ERROR); + + node.putInt(JSFCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE, ValidationMessage.WARNING); + node.putInt(JSFCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG, ValidationMessage.WARNING); + node.putInt(JSFCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE, ValidationMessage.WARNING); + + node.putInt(JSFCorePreferenceNames.VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND, ValidationMessage.WARNING); + node.putInt(JSFCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED, ValidationMessage.WARNING); + node.putInt(JSFCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION, ValidationMessage.WARNING); + node.putInt(JSFCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND, ValidationMessage.WARNING); + node.putInt(JSFCorePreferenceNames.VALIDATION_TRANSLATION_USEBEAN_INVALID_ID, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO, ValidationMessage.ERROR); + node.putInt(JSFCorePreferenceNames.VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO, ValidationMessage.WARNING); + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/preferences/JSFCorePreferenceNames.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/preferences/JSFCorePreferenceNames.java new file mode 100644 index 000000000..ff2fa8c35 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/preferences/JSFCorePreferenceNames.java @@ -0,0 +1,86 @@ +/******************************************************************************* + * Copyright (c) 2005, 2011 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + * + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.preferences; + + +/** + * Common preference keys used by JSF core + */ +public class JSFCorePreferenceNames { + private JSFCorePreferenceNames() { + // empty private constructor so users cannot instantiate class + } + + /** + * The default extension to use when none is specified in the New JSP File + * Wizard. + *

+ * Value is of type String. + *

+ */ + public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$ + + /** + * Indicates if JSP fragments should be compiled/validated. JSP fragments + * will be validated when true. + *

+ * Value is of type Boolean. + *

+ */ + public static final String VALIDATE_FRAGMENTS = "validateFragments";//$NON-NLS-1$ + + /** + * Indicates that JSP validation will use per-project preferences + *

+ * Value is of type Boolean. + *

+ */ + public static final String VALIDATION_USE_PROJECT_SETTINGS = "validation.use-project-settings"; //$NON-NLS-1$ + + /** + * Validation preference keys + */ + public static final String VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS="validation.directive-taglib-duplicate-prefixes-different-uris";//$NON-NLS-1$ + public static final String VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS="validation.directive-taglib-duplicate-prefixes-same-uris";//$NON-NLS-1$ + public static final String VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX="validation.directive-taglib-missing-prefix";//$NON-NLS-1$ + public static final String VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR="validation.directive-taglib-missing-uri-or-tagdir";//$NON-NLS-1$ + public static final String VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR="validation.directive-taglib-unresolvable-uri-or-tagdir";//$NON-NLS-1$ + public static final String VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND="validation.directive-page-superclass-not-found";//$NON-NLS-1$ + public static final String VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED="validation.directive-include-fragment-file-not-specified";//$NON-NLS-1$ + public static final String VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND="validation.directive-include-fragment-file-not-found";//$NON-NLS-1$ + public static final String VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME="validation.directive-attribute-duplicate";//$NON-NLS-1$ + public static final String VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED ="validation.java-local-variable-is-never-used"; //$NON-NLS-1$ + public static final String VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED ="validation.java-"; //$NON-NLS-1$ + public static final String VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE ="validation.java-null-local-variable-reference"; //$NON-NLS-1$ + public static final String VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE ="validation.java-potential-null-local-variable-reference"; //$NON-NLS-1$ + public static final String VALIDATION_JAVA_UNUSED_IMPORT ="validation.java-unused-import"; //$NON-NLS-1$ + + public static final String VALIDATION_EL_SYNTAX ="validation.el-general-syntax"; //$NON-NLS-1$ + public static final String VALIDATION_EL_LEXER ="validation.el-lexical-failure"; //$NON-NLS-1$ + public static final String VALIDATION_EL_FUNCTION_UNDEFINED = "validation.el-function-undefined"; //$NON-NLS-1$ + + public static final String VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE = "validation.actions-missing-required-attribute"; //$NON-NLS-1$ + public static final String VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE = "validation.actions-unknown-attribute"; //$NON-NLS-1$ + public static final String VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE = "validation.actions-unexpected-rtexprvalue"; //$NON-NLS-1$ + public static final String VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG = "validation.actions-non-empty-inline-tag"; //$NON-NLS-1$ + + public static final String VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE = "validation.translation-tei-message"; //$NON-NLS-1$ + public static final String VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND = "validation.translation-tei-class-not-found"; //$NON-NLS-1$ + public static final String VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED = "validation.translation-tei-class-not-instantiated"; //$NON-NLS-1$ + public static final String VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION = "validation.translation-tei-class-runtime-exception"; //$NON-NLS-1$ + public static final String VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND = "validation.translation-tag-class-not-found"; //$NON-NLS-1$ + public static final String VALIDATION_TRANSLATION_USEBEAN_INVALID_ID= "validation.translation-usebean-invalid-id"; //$NON-NLS-1$ + public static final String VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO= "validation.translation-usebean-missing-type-info"; //$NON-NLS-1$ + public static final String VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO = "validation.translation-usebean-ambiguous-type-info"; //$NON-NLS-1$ +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java index f09da98be..72d06cbca 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java @@ -134,9 +134,9 @@ public Object getDefaultProperty(String propertyName) { } else if (propertyName.equals(SERVLET_NAME)) { return JSFUtils.JSF_DEFAULT_SERVLET_NAME; } else if (propertyName.equals(SERVLET_CLASSNAME)) { - return JSFUtils.JSF_SERVLET_CLASS; + return getServletClassName(); } else if (propertyName.equals(SERVLET_URL_PATTERNS)) { - return new String[] {JSFUtils.JSF_DEFAULT_URL_MAPPING }; + return new String[] { getServletUrlMapping() }; } else if (propertyName.equals(FACET_ID)) { return IJSFCoreConstants.JSF_CORE_FACET_ID; } else if (propertyName.equals(WEBCONTENT_DIR)){ @@ -150,7 +150,15 @@ public Object getDefaultProperty(String propertyName) { } return super.getDefaultProperty(propertyName); } - + + protected String getServletClassName() { + return JSFUtils.JSF_SERVLET_CLASS; + } + + protected String getServletUrlMapping() { + return JSFUtils.JSF_DEFAULT_URL_MAPPING; + } + @Override public boolean propertySet( final String propertyName, final Object propertyValue ) diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDelegate.java index 1cffb6eb3..d01654690 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDelegate.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDelegate.java @@ -38,6 +38,7 @@ import org.eclipse.jst.javaee.web.WebApp; import org.eclipse.jst.jsf.common.facet.libraryprovider.jsf.JsfLibraryUtil; import org.eclipse.jst.jsf.common.webxml.WebXmlUpdater; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; import org.eclipse.jst.jsf.core.internal.Messages; import org.eclipse.osgi.util.NLS; @@ -222,8 +223,14 @@ public static void updateWebXmlForMyfaces (final IProject project, { final WebXmlUpdater updater = new WebXmlUpdater(project, monitor); - updater.addContextParam("javax.servlet.jsp.jstl.fmt.localizationContext", "resources.application", null); //$NON-NLS-1$//$NON-NLS-2$ - updater.addContextParam("javax.faces.STATE_SAVING_METHOD", "client", Messages.JSFFacetInstallDelegate_StateSavingMethod); //$NON-NLS-1$ //$NON-NLS-2$ + boolean isJakartaEE = JSFVersion.guessAtLeast(JSFVersion.V3_0, project); + if (isJakartaEE) { + updater.addContextParam("jakarta.servlet.jsp.jstl.fmt.localizationContext", "resources.application", null); //$NON-NLS-1$//$NON-NLS-2$ + updater.addContextParam("jakarta.faces.STATE_SAVING_METHOD", "client", Messages.JSFFacetInstallDelegate_StateSavingMethod); //$NON-NLS-1$ //$NON-NLS-2$ + } else { + updater.addContextParam("javax.servlet.jsp.jstl.fmt.localizationContext", "resources.application", null); //$NON-NLS-1$//$NON-NLS-2$ + updater.addContextParam("javax.faces.STATE_SAVING_METHOD", "client", Messages.JSFFacetInstallDelegate_StateSavingMethod); //$NON-NLS-1$ //$NON-NLS-2$ + } updater.addContextParam("org.apache.myfaces.ALLOW_JAVASCRIPT", "true", Messages.JSFFacetInstallDelegate_AllowJavascriptDescription); //$NON-NLS-1$ //$NON-NLS-2$ updater.addContextParam("org.apache.myfaces.PRETTY_HTML", "true", Messages.JSFFacetInstallDelegate_PrettyHtmlDescription); //$NON-NLS-1$ //$NON-NLS-2$ updater.addContextParam("org.apache.myfaces.DETECT_JAVASCRIPT", "false", null); //$NON-NLS-1$//$NON-NLS-2$ @@ -264,9 +271,14 @@ public static void updateWebXmlForSunRi (final IProject project, final IProgressMonitor monitor) { final WebXmlUpdater updater = new WebXmlUpdater(project, monitor); - - updater.addContextParam("javax.faces.STATE_SAVING_METHOD", "client", Messages.JSFFacetInstallDelegate_StateSavingMethod); //$NON-NLS-1$//$NON-NLS-2$ - updater.addContextParam("javax.servlet.jsp.jstl.fmt.localizationContext", "resources.application", null); //$NON-NLS-1$ //$NON-NLS-2$ + boolean isJakartaEE = JSFVersion.guessAtLeast(JSFVersion.V3_0, project); + if (isJakartaEE) { + updater.addContextParam("jakarta.faces.STATE_SAVING_METHOD", "client", Messages.JSFFacetInstallDelegate_StateSavingMethod); //$NON-NLS-1$//$NON-NLS-2$ + updater.addContextParam("jakarta.servlet.jsp.jstl.fmt.localizationContext", "resources.application", null); //$NON-NLS-1$ //$NON-NLS-2$ + } else { + updater.addContextParam("javax.faces.STATE_SAVING_METHOD", "client", Messages.JSFFacetInstallDelegate_StateSavingMethod); //$NON-NLS-1$//$NON-NLS-2$ + updater.addContextParam("javax.servlet.jsp.jstl.fmt.localizationContext", "resources.application", null); //$NON-NLS-1$ //$NON-NLS-2$ + } updater.addListener("com.sun.faces.config.ConfigureListener"); //$NON-NLS-1$ //Following 3 lines disabled for https://bugs.eclipse.org/bugs/show_bug.cgi?id=317865 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=317868 diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtilFactory.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtilFactory.java index 1b84e05d8..a058b371b 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtilFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtilFactory.java @@ -74,11 +74,17 @@ public JSFUtils create(final JSFVersion version, final IModelProvider modelProvi case V2_0: return new JSFUtils20(modelProvider); case V2_1: - return new JSFUtils21(modelProvider); + return new JSFUtils21(modelProvider); case V2_2: - return new JSFUtils22(modelProvider); + return new JSFUtils22(modelProvider); case V2_3: - return new JSFUtils23(modelProvider); + return new JSFUtils23(modelProvider); + case V3_0: + return new JSFUtils30(modelProvider); + case V4_0: + return new JSFUtils40(modelProvider); + case V4_1: + return new JSFUtils41(modelProvider); default: throw new IllegalArgumentException("Unknown version: "+version); //$NON-NLS-1$ } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils.java index 0c0f257de..d84dbe7e6 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils.java @@ -136,7 +136,7 @@ protected final String getDisplayName(IDataModel config) { * @param config * @return servlet display name to use from wizard data model */ - protected final String getServletClassname(IDataModel config) { + protected String getServletClassname(IDataModel config) { String className = config.getStringProperty(IJSFFacetInstallDataModelProperties.SERVLET_CLASSNAME); if (className == null || className.trim().equals("")) //$NON-NLS-1$ className = JSF_SERVLET_CLASS; diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils30.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils30.java new file mode 100644 index 000000000..fc5fcf1db --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils30.java @@ -0,0 +1,159 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 IBM Corporation and others. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.project.facet; + +import java.io.PrintWriter; + +import org.eclipse.jst.j2ee.model.IModelProvider; +import org.eclipse.jst.jsf.core.JSFVersion; +import org.eclipse.wst.common.frameworks.datamodel.IDataModel; + +/** + * JSF Utils instance for JSF 3.0. + * + */ +class JSFUtils30 extends JSFUtils23 { + + /** + * The default name of the Faces servlet class for Jakarta EE + */ + public static final String JAKARTA_FACES_SERVLET_CLASS = "jakarta.faces.webapp.FacesServlet"; //$NON-NLS-1$ + /** + * Default URL mapping to faces servlet (for Jakarta EE) + */ + public static final String JAKARTA_FACES_DEFAULT_URL_MAPPING = "*.xhtml"; //$NON-NLS-1$ + /** + * The name of the context parameter used for JSF configuration files (for Jakarta EE) + */ + public static final String JAKARTA_FACES_CONFIG_CONTEXT_PARAM = "jakarta.faces.CONFIG_FILES"; //$NON-NLS-1$ + /** + * The name of the context parameter used for defining the default JSF file extension (for Jakarta EE) + */ + public static final String JAKARTA_FACES_DEFAULT_SUFFIX_CONTEXT_PARAM = "jakarta.faces.DEFAULT_SUFFIX"; //$NON-NLS-1$ + /** + * @param modelProvider + */ + protected JSFUtils30(final IModelProvider modelProvider) { + super(JSFVersion.V3_0, modelProvider); + } + + /** + * @param jsfVersion + * @param modelProvider + */ + protected JSFUtils30(final JSFVersion jsfVersion, final IModelProvider modelProvider) { + super(jsfVersion, modelProvider); + if (jsfVersion.compareTo(JSFVersion.V3_0) < 0) { + throw new IllegalArgumentException("JSF Version must be at least 3.0"); //$NON-NLS-1$ + } + } + + @Override + protected String getServletClassname(IDataModel config) { + String className = config.getStringProperty(IJSFFacetInstallDataModelProperties.SERVLET_CLASSNAME); + if (className == null || className.trim().equals("")) //$NON-NLS-1$ + className = JAKARTA_FACES_SERVLET_CLASS; + return className.trim(); + } + + protected void removeJSFContextParams(final Object webApp) { + if (isJavaEE(webApp)) { + JEEUtils.removeContextParam((org.eclipse.jst.javaee.web.WebApp) webApp, JAKARTA_FACES_CONFIG_CONTEXT_PARAM); + } else { + J2EEUtils.removeContextParam((org.eclipse.jst.j2ee.webapplication.WebApp) webApp, JSF_CONFIG_CONTEXT_PARAM); + } + } + + /** + * @return default url mapping + * */ + protected String getDefaultUrlMapping() { + return JAKARTA_FACES_DEFAULT_URL_MAPPING; + } + + /** + * @param webApp + * @return the default file extension from the context param. Default is + * "xhtml" if no context param. + */ + protected String getDefaultSuffix(Object webApp) { + String contextParam = null; + if (webApp != null) { + if (isJavaEE(webApp)) { + contextParam = JEEUtils.getContextParam((org.eclipse.jst.javaee.web.WebApp) webApp, JAKARTA_FACES_DEFAULT_SUFFIX_CONTEXT_PARAM); + } else { + contextParam = J2EEUtils.getContextParam((org.eclipse.jst.j2ee.webapplication.WebApp) webApp, JSF_DEFAULT_SUFFIX_CONTEXT_PARAM); + } + } + if (contextParam == null) { + return getDefaultDefaultSuffix(); + } + return normalizeSuffix(contextParam); + } + + /** + * Finds and returns a JSF Servlet definition, or null if servlet is not defined. + * + * @param webApp + * @return Servlet or null + */ + protected Object findJSFServlet(Object webApp) { + if(isJavaEE(webApp)) { + return JEEUtils.findServlet((org.eclipse.jst.javaee.web.WebApp) webApp, JAKARTA_FACES_SERVLET_CLASS); + } + return J2EEUtils.findServlet((org.eclipse.jst.j2ee.webapplication.WebApp) webApp, JSF_SERVLET_CLASS); + } + + /** + * Creates or updates context-params + * @param webApp + * @param config + */ + protected void setupContextParams(final Object webApp, final IDataModel config) { + final String paramValue = config.getStringProperty(IJSFFacetInstallDataModelProperties.CONFIG_PATH); + if (paramValue != null && !paramValue.equals(JSF_DEFAULT_CONFIG_PATH)) { + if (isJavaEE(webApp)) { + JEEUtils.setupContextParam((org.eclipse.jst.javaee.web.WebApp) webApp, JAKARTA_FACES_CONFIG_CONTEXT_PARAM, paramValue); + } else { + J2EEUtils.setupContextParam((org.eclipse.jst.j2ee.webapplication.WebApp) webApp, JSF_CONFIG_CONTEXT_PARAM, paramValue); + } + } + } + + @Override + public void doVersionSpecificConfigFile(PrintWriter pw) { + final String QUOTE = new String(new char[] { '"' }); + final String schemaVersionString = getVersion().toString().replaceAll("\\.", "_"); //$NON-NLS-1$//$NON-NLS-2$ + pw.write("\n"); //$NON-NLS-1$ + pw.write("\n\n"); //$NON-NLS-1$ + pw.write("\n"); //$NON-NLS-1$ + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils40.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils40.java new file mode 100644 index 000000000..1312eb1d7 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils40.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 IBM Corporation and others. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.project.facet; + +import org.eclipse.jst.j2ee.model.IModelProvider; +import org.eclipse.jst.jsf.core.JSFVersion; + +/** + * JSF Utils instance for JSF 4.0. + * + */ +class JSFUtils40 extends JSFUtils30 { + + /** + * @param modelProvider + */ + protected JSFUtils40(final IModelProvider modelProvider) { + super(JSFVersion.V4_0, modelProvider); + } + + /** + * @param jsfVersion + * @param modelProvider + */ + protected JSFUtils40(final JSFVersion jsfVersion, final IModelProvider modelProvider) { + super(jsfVersion, modelProvider); + if (jsfVersion.compareTo(JSFVersion.V4_0) < 0) { + throw new IllegalArgumentException("JSF Version must be at least 4.0"); //$NON-NLS-1$ + } + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils41.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils41.java new file mode 100644 index 000000000..055125e45 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFUtils41.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 IBM Corporation and others. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.project.facet; + +import org.eclipse.jst.j2ee.model.IModelProvider; +import org.eclipse.jst.jsf.core.JSFVersion; + +/** + * JSF Utils instance for JSF 4.1. + * + */ +class JSFUtils41 extends JSFUtils40 { + + /** + * @param modelProvider + */ + protected JSFUtils41(final IModelProvider modelProvider) { + super(JSFVersion.V4_1, modelProvider); + } + + /** + * @param jsfVersion + * @param modelProvider + */ + protected JSFUtils41(final JSFVersion jsfVersion, final IModelProvider modelProvider) { + super(jsfVersion, modelProvider); + if (jsfVersion.compareTo(JSFVersion.V4_1) < 0) { + throw new IllegalArgumentException("JSF Version must be at least 4.1"); //$NON-NLS-1$ + } + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JakartaFacesFacetInstallDataModelProvider.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JakartaFacesFacetInstallDataModelProvider.java new file mode 100644 index 000000000..48723cc69 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JakartaFacesFacetInstallDataModelProvider.java @@ -0,0 +1,12 @@ +package org.eclipse.jst.jsf.core.internal.project.facet; + +public class JakartaFacesFacetInstallDataModelProvider extends JSFFacetInstallDataModelProvider { + + protected String getServletClassName() { + return JSFUtils30.JAKARTA_FACES_SERVLET_CLASS; + } + + protected String getServletUrlMapping() { + return JSFUtils30.JAKARTA_FACES_DEFAULT_URL_MAPPING; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/provisional/contenttype/ContentTypeIdForJSF.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/provisional/contenttype/ContentTypeIdForJSF.java new file mode 100644 index 000000000..0f8fcf033 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/provisional/contenttype/ContentTypeIdForJSF.java @@ -0,0 +1,165 @@ +/******************************************************************************* + * Copyright (c) 2004, 2018 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + * + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.provisional.contenttype; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.content.IContentType; +import org.eclipse.core.runtime.content.IContentTypeManager.ContentTypeChangeEvent; +import org.eclipse.core.runtime.content.IContentTypeManager.IContentTypeChangeListener; + +/** + * This class, with its one field, is a convience to provide compile-time + * safety when refering to a contentType ID. The value of the contenttype id + * field must match what is specified in plugin.xml file. + */ +public class ContentTypeIdForJSF { + /** + * The value of the contenttype id field must match what is specified in + * plugin.xml file. Note: this value is intentially set with default + * protected method so it will not be inlined. + */ + public final static String ContentTypeID_JSF = getConstantString(); + /** + * The value of the contenttype id field must match what is specified in + * plugin.xml file. Note: this value is intentially set with default + * protected method so it will not be inlined. + */ + public final static String ContentTypeID_JSFFRAGMENT = getFragmentConstantString(); + + static char[][] JSF_EXTENSIONS; + static char[][] JSF_FILENAMES; + private static String XHTML = "xhtml"; //$NON-NLS-1$ + + private static ContentTypeChangeListener typeChangeListener = new ContentTypeChangeListener(); + + /** + * Don't allow instantiation. + */ + private ContentTypeIdForJSF() { + super(); + } + + static String getConstantString() { + return "org.eclipse.jst.jsf.core.jsfsource"; //$NON-NLS-1$ + } + + static String getFragmentConstantString() { + return "org.eclipse.jst.jsf.core.jsffragmentsource"; //$NON-NLS-1$ + } + + static String getTagConstantString() { + return "org.eclipse.jst.jsf.core.tagsource"; //$NON-NLS-1$ + } + + public static IContentTypeChangeListener getTypeChangeListener() { + return typeChangeListener; + } + + /** + * @param fileName + * @return the first index within an array of filename extensions that + * denote the JSF content type or a subtype and match the + * extension of the given filename, or the index within an + * array of explicitly defined filenames that matches. + */ + public static int indexOfJSFExtension(String fileName) { + char[] name = fileName.toCharArray(); + int fileNameLength = fileName.length(); + char[][] jsfExtensions = getJSFExtensions(); + extensions: for (int i = 0, length = jsfExtensions.length; i < length; i++) { + char[] extension = jsfExtensions[i]; + int extensionLength = extension.length; + int extensionStart = fileNameLength - extensionLength; + int dotIndex = extensionStart - 1; + if (dotIndex < 0) continue; + if (name[dotIndex] != '.') continue; + for (int j = 0; j < extensionLength; j++) { + if (name[extensionStart + j] != extension[j]) + continue extensions; + } + return dotIndex; + } + char[][] filenames = JSF_FILENAMES; + if (filenames != null) { + for (int i = 0; i < filenames.length; i++) { + if (Arrays.equals(name, filenames[i])) + return i; + } + } + return -1; + } + + /** + * @return an array of all filename extensions that are of the JSF content + * type or one of its subtypes + */ + public static char[][] getJSFExtensions() { + if (JSF_EXTENSIONS == null) { + IContentType jspContentType = Platform.getContentTypeManager().getContentType(getConstantString()); + Set fileExtensions = new HashSet<>(); + Set fileNames = new HashSet<>(); + // content types derived from JSP content type should be included (https://bugs.eclipse.org/bugs/show_bug.cgi?id=121715) + IContentType[] contentTypes = Platform.getContentTypeManager().getAllContentTypes(); + for (int i = 0, length = contentTypes.length; i < length; i++) { + if (contentTypes[i].isKindOf(jspContentType)) { // note that jspContentType.isKindOf(jspContentType) == true + String[] fileExtension = contentTypes[i].getFileSpecs(IContentType.FILE_EXTENSION_SPEC); + for (int j = 0; j < fileExtension.length; j++) { + fileExtensions.add(fileExtension[j]); + } + String[] names = contentTypes[i].getFileSpecs(IContentType.FILE_NAME_SPEC); + for (int j = 0; j < names.length; j++) { + fileNames.add(names[j]); + } + } + } + int length = fileExtensions.size(); + // note that file extensions contains "xhtml" + char[][] extensions = new char[length][]; + extensions[0] = XHTML.toCharArray(); // ensure that "jsp" is first + int index = 1; + Iterator iterator = fileExtensions.iterator(); + while (iterator.hasNext()) { + String fileExtension = iterator.next(); + if (XHTML.equalsIgnoreCase(fileExtension)) + continue; + extensions[index++] = fileExtension.toCharArray(); + } + JSF_EXTENSIONS = extensions; + + char[][] names = new char[fileNames.size()][]; + iterator = fileNames.iterator(); + int i = 0; + while (iterator.hasNext()) { + names[i++] = iterator.next().toCharArray(); + } + JSF_FILENAMES = names; + } + return JSF_EXTENSIONS; + } + + static class ContentTypeChangeListener implements IContentTypeChangeListener { + @Override + public void contentTypeChanged(ContentTypeChangeEvent event) { + String id = event.getContentType().getId(); + if (getConstantString().equals(id) || getFragmentConstantString().equals(id) || getTagConstantString().equals(id)) { + JSF_EXTENSIONS = null; + } + } + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/util/FacetModuleCoreSupport.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/util/FacetModuleCoreSupport.java new file mode 100644 index 000000000..121ffad78 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/util/FacetModuleCoreSupport.java @@ -0,0 +1,349 @@ +/******************************************************************************* + * Copyright (c) 2007, 2023 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.util; + + +import org.eclipse.core.filebuffers.FileBuffers; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; + +/** + * This class encapsulates any used Module Core and Facets APIs along with + * fallbacks for use on non-compliant projects and when those services are not + * available at runtime. + * + * Because ModuleCore API calls can result in locks needing to be acquired, + * none of these methods should be called while other thread locks have + * already been acquired. + */ +public class FacetModuleCoreSupport { + static final boolean _dump_NCDFE = false; + private static final String WEB_INF = "WEB-INF"; //$NON-NLS-1$ + private static final IPath WEB_INF_PATH = new Path(WEB_INF); + static final String META_INF_RESOURCES = "META-INF/resources/"; //$NON-NLS-1$ + static final IPath META_INF_RESOURCES_PATH = new Path(META_INF_RESOURCES); + + static final float DEFAULT_SERVLET_VERSION = 6.0f; + + /** + * @param path + * @return the computed IPath to the "root" of the web contents, either from facet knowledge or hueristics, or null if one can not be determined + */ + public static IPath computeWebContentRootPath(IPath path) { + IPath root = null; + try { + root = FacetModuleCoreSupportDelegate.getWebContentRootPath(ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0))); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + } + if(root == null) { + /* + * https://bugs.eclipse.org/bugs/show_bug.cgi?id=213245 + * + * NPE in JSPTaglibDirectiveContentAssistProcessor with + * non-faceted project + */ + root = getLocalRoot(path); + } + return root; + } + + /** + * @param project + * @return the version of the JST Web Fragment facet installed on the project, -1 otherwise + */ + public static float getDynamicWebFragmentVersion(IProject project) { + float version = -1; + try { + version = FacetModuleCoreSupportDelegate.getDynamicWebFragmentVersion(project); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + } + return version; + } + + /** + * @param project + * @return the version of the JST Web facet installed on the project, -1 otherwise + */ + public static float getDynamicWebProjectVersion(IProject project) { + float version = -1; + try { + version = FacetModuleCoreSupportDelegate.getDynamicWebProjectVersion(project); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + } + return version; + } + + /** + * @param project + * @return the IPath to the "root" of the web contents + */ + public static IPath getWebContentRootPath(IProject project) { + if (project == null) + return null; + + IPath path = null; + try { + path = FacetModuleCoreSupportDelegate.getWebContentRootPath(project); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + } + return path; + } + + /** + * @param project + * @return the IPaths to acceptable "roots" in a project + */ + public static IPath[] getAcceptableRootPaths(IProject project) { + if (project == null) + return null; + IPath[] paths = null; + try { + paths = FacetModuleCoreSupportDelegate.getAcceptableRootPaths(project); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + return new IPath[]{project.getFullPath()}; + } + return paths; + } + + /** + * @param path + * - the full path to a resource within the workspace + * @return - the runtime path of the resource if one exists, an + * approximation otherwise + */ + public static IPath getRuntimePath(IPath path) { + IPath result = null; + try { + result = FacetModuleCoreSupportDelegate.getRuntimePath(path); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + } + if (result == null) { + IPath root = getLocalRoot(path); + result = path.removeFirstSegments(root.segmentCount()).makeAbsolute(); + } + return result; + } + + /** + * @param project + * @return whether this project has the jst.web facet installed on it + */ + public static boolean isDynamicWebProject(IProject project) { + if (project == null) + return false; + + try { + return FacetModuleCoreSupportDelegate.isDynamicWebProject(project); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + } + return true; + } + + /** + * @param project + * @return whether this project has the jst.webfragment facet installed on it + */ + public static boolean isWebFragmentProject(IProject project) { + if (project == null) + return false; + + try { + return FacetModuleCoreSupportDelegate.isWebFragmentProject(project); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + } + return true; + } + + /** + * @param basePath - + * the full path to a resource within the workspace + * @param reference - + * the reference string to resolve + * @return - the full path within the workspace that corresponds to the + * given reference according to the virtual pathing support + */ + public static IPath resolve(IPath basePath, String reference) { + IPath resolvedPath = null; + try { + resolvedPath = FacetModuleCoreSupportDelegate.resolve(basePath, reference); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + } + + if (resolvedPath == null) { + IPath rootPath = getLocalRoot(basePath); + if (reference.startsWith(Path.ROOT.toString())) { + resolvedPath = rootPath.append(reference); + } + else { + resolvedPath = basePath.removeLastSegments(1).append(reference); + } + } + + return resolvedPath; + } + + /** + * @param basePath + * @return an approximation of the applicable Web context root path, if one could be found + */ + private static IPath getLocalRoot(IPath basePath) { + IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); + + // existing workspace resources - this is the 93% case + IResource file = FileBuffers.getWorkspaceFileAtLocation(basePath); + + // Try the base path as a folder first + if (file == null && basePath.segmentCount() > 1) { + file = workspaceRoot.getFolder(basePath); + } + // If not a folder, then try base path as a file + if (file != null && !file.exists() && basePath.segmentCount() > 1) { + file = workspaceRoot.getFile(basePath); + } + + if (file == null && basePath.segmentCount() == 1) { + file = workspaceRoot.getProject(basePath.segment(0)); + } + + if (file == null) { + /* + * https://bugs.eclipse.org/bugs/show_bug.cgi?id=116529 + * + * This method produces a less accurate result, but doesn't + * require that the file exist yet. + */ + IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(basePath); + if (files.length > 0) + file = files[0]; + } + + while (file != null) { + /** + * Treat any parent folder with a WEB-INF subfolder as a web-app + * root + */ + IContainer folder = null; + if ((file.getType() & IResource.FOLDER) != 0) { + folder = (IContainer) file; + } + else { + folder = file.getParent(); + } + // getFolder on a workspace root must use a full path, skip + if (folder != null && (folder.getType() & IResource.ROOT) == 0) { + IFolder webinf = folder.getFolder(WEB_INF_PATH); + IFolder metaResources = folder.getFolder(META_INF_RESOURCES_PATH); + if ((webinf != null && webinf.exists()) || (metaResources != null && metaResources.exists())) { + return folder.getFullPath(); + } + } + file = file.getParent(); + } + + return basePath.uptoSegment(1); + } + + /** + * @param project + * @return the projects referenced by this project for deployment, but not + * necessarily on its Java Build path, e.g. web gfragments, or + * null + */ + public static IProject[] getReferenced(IProject project) { + if (project == null) + return null; + IProject[] projects = null; + try { + projects = FacetModuleCoreSupportDelegate.getReferenced(project); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + return null; + } + return projects; + } + + /** + * Gets the root container for the path in the project + * @param project + * @param path + */ + public static IPath getRootContainerForPath(IProject project, IPath path) { + if (project == null) + return null; + IPath root = null; + try { + root = FacetModuleCoreSupportDelegate.getRootContainerForPath(project, path); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + return null; + } + return root; + } + + /** + * Gets the default root container for the project + * @param project + */ + public static IPath getDefaultRootContainer(IProject project) { + if (project == null) + return null; + IPath root = null; + try { + root = FacetModuleCoreSupportDelegate.getDefaultRoot(project); + } + catch (NoClassDefFoundError e) { + if (_dump_NCDFE) + e.printStackTrace(); + return null; + } + return root; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/util/FacetModuleCoreSupportDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/util/FacetModuleCoreSupportDelegate.java new file mode 100644 index 000000000..7d3e71385 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/util/FacetModuleCoreSupportDelegate.java @@ -0,0 +1,439 @@ +/******************************************************************************* + * Copyright (c) 2007, 2023 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.jst.jsf.core.internal.util; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; +import org.eclipse.wst.common.componentcore.ComponentCore; +import org.eclipse.wst.common.componentcore.ModuleCoreNature; +import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; +import org.eclipse.wst.common.componentcore.resources.IVirtualFile; +import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; +import org.eclipse.wst.common.componentcore.resources.IVirtualReference; +import org.eclipse.wst.common.componentcore.resources.IVirtualResource; +import org.eclipse.wst.common.project.facet.core.IFacetedProject; +import org.eclipse.wst.common.project.facet.core.IProjectFacet; +import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager; + +/** + * Wrapper class for all Facet-related calls. If the Facet or ModuleCore + * bundles are not available, this class will not load, or if it does, its + * methods will cause NoClassDefFoundErrors. This allows us to + * compartmentalize the dependencies. + * + */ +public class FacetModuleCoreSupportDelegate { + private static final String SLASH = "/"; //$NON-NLS-1$ + + /** + * Copied to avoid unneeded extra dependency (plus it's unclear why the + * valuse are in that plug-in). + * + * @see org.eclipse.wst.common.componentcore.internal.util.IModuleConstants.JST_WEB_MODULE + */ + private final static String JST_WEB_MODULE = "jst.web"; //$NON-NLS-1$ + /** + * @see org.eclipse.wst.common.componentcore.internal.util.IModuleConstants.JST_WEBFRAGMENT_MODULE + */ + private final static String JST_WEBFRAGMENT_MODULE = "jst.webfragment"; //$NON-NLS-1$ + + /** + * @param project + * @return the version of the JST Web facet, a default version otherwise + * @throws CoreException + */ + static float getDynamicWebProjectVersion(IProject project) { + if (project == null) + return -1; + + float version = -1; + try { + IFacetedProject faceted = ProjectFacetsManager.create(project); + if (faceted != null && ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) { + IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE); + if (faceted.hasProjectFacet(webModuleFacet)) { + version = Float.parseFloat(faceted.getInstalledVersion(webModuleFacet).getVersionString()); + } + } + } + catch (NumberFormatException e) { + JSFCorePlugin.log(IStatus.ERROR, e.getMessage(), e); + } + catch (CoreException e) { + JSFCorePlugin.log(IStatus.ERROR, e.getMessage(), e); + } + return version; + } + + /** + * @param project + * @return the version of the JST Web Fragment facet, a default version otherwise + * @throws CoreException + */ + static float getDynamicWebFragmentVersion(IProject project) { + if (project == null) + return -1; + + float version = -1; + try { + IFacetedProject faceted = ProjectFacetsManager.create(project); + if (faceted != null && ProjectFacetsManager.isProjectFacetDefined(JST_WEBFRAGMENT_MODULE)) { + IProjectFacet webFragmentFacet = ProjectFacetsManager.getProjectFacet(JST_WEBFRAGMENT_MODULE); + if (faceted.hasProjectFacet(webFragmentFacet)) { + version = Float.parseFloat(faceted.getInstalledVersion(webFragmentFacet).getVersionString()); + } + } + } + catch (NumberFormatException e) { + JSFCorePlugin.log(IStatus.ERROR, e.getMessage(), e); + } + catch (CoreException e) { + JSFCorePlugin.log(IStatus.ERROR, e.getMessage(), e); + } + return version; + } + + /** + * @param path - + * the full path to a resource within the workspace + * @return - the runtime path of the resource if one exists, null + * otherwise + */ + static IPath getRuntimePath(IPath path) { + if (path == null) + return null; + + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0)); + + if (!ModuleCoreNature.isFlexibleProject(project)) + return null; + + IVirtualResource[] virtualResources = ComponentCore.createResources(ResourcesPlugin.getWorkspace().getRoot().getFile(path)); + if (virtualResources != null && virtualResources.length > 0) { + return virtualResources[0].getRuntimePath(); + } + return null; + } + + /** + * @param project + * @return the IPath to the "root" of the web contents + */ + static IPath getWebContentRootPath(IProject project) { + if (project == null) + return null; + + if (!ModuleCoreNature.isFlexibleProject(project)) + return null; + + IPath path = null; + IVirtualComponent component = ComponentCore.createComponent(project); + if (component != null && component.exists() && component.getRootFolder() != null) { + path = component.getRootFolder().getWorkspaceRelativePath(); + if (component.getRootFolder().getFolder(FacetModuleCoreSupport.META_INF_RESOURCES_PATH).getUnderlyingFolder().isAccessible()) { + path = path.append(FacetModuleCoreSupport.META_INF_RESOURCES_PATH); + } + } + return path; + } + + /** + * @param project + * @return + * @throws CoreException + */ + static boolean isDynamicWebProject(IProject project) { + if (project == null) + return false; + + try { + if (ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) { + IFacetedProject faceted = ProjectFacetsManager.create(project); + IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE); + if (faceted != null && faceted.hasProjectFacet(webModuleFacet)) { + return true; + } + } + } + catch (CoreException e) { + JSFCorePlugin.log(IStatus.ERROR, e.getMessage(), e); + } + return false; + } + + /** + * @param project + * @return + * @throws CoreException + */ + static boolean isWebFragmentProject(IProject project) { + if (project == null) + return false; + + try { + if (ProjectFacetsManager.isProjectFacetDefined(JST_WEBFRAGMENT_MODULE)) { + IFacetedProject faceted = ProjectFacetsManager.create(project); + IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEBFRAGMENT_MODULE); + if (faceted != null && faceted.hasProjectFacet(webModuleFacet)) { + return true; + } + } + } + catch (CoreException e) { + JSFCorePlugin.log(IStatus.ERROR, e.getMessage(), e); + } + return false; + } + + /* + * Handle resolution in a required web fragment + */ + private static IPath resolveInReferenced(IProject project, IPath runtimeReference) { + IVirtualReference[] references = ComponentCore.createComponent(project).getReferences(); + if (references != null) { + for (int i = 0; i < references.length; i++) { + IVirtualComponent referencedComponent = references[i].getReferencedComponent(); + if (referencedComponent == null) + continue; + IVirtualComponent component = referencedComponent.getComponent(); + if (component == null) + continue; + IVirtualFolder rootFolder = component.getRootFolder(); + if (rootFolder == null) + continue; + IPath referencedPathRoot = rootFolder.getWorkspaceRelativePath(); + /* http://bugs.eclipse.org/410161 */ + if (referencedPathRoot != null) { + /* + * See Servlet 3.0, section 4.6, web fragments as required + * projects + */ + /* https://bugs.eclipse.org/398698 */ + IPath resolved = referencedPathRoot.append(FacetModuleCoreSupport.META_INF_RESOURCES).append(runtimeReference); + if (resolved != null && component.getProject().findMember(resolved.removeFirstSegments(1)) != null) { + return resolved; + } + /* + * Handle multi-root fragments, and ones where the default root marked for deployment doesn't exist + */ + IVirtualFile virtualFile = ComponentCore.createFile(component.getProject(), FacetModuleCoreSupport.META_INF_RESOURCES_PATH.append(runtimeReference)); + if (virtualFile != null) { + IFile[] underlyingFiles = virtualFile.getUnderlyingFiles(); + for (int j = 0; j < underlyingFiles.length; j++) { + if (underlyingFiles[i].isAccessible()) { + return underlyingFiles[i].getFullPath(); + } + } + } + IVirtualFolder virtualFolder = ComponentCore.createFolder(component.getProject(), FacetModuleCoreSupport.META_INF_RESOURCES_PATH.append(runtimeReference)); + if (virtualFolder != null) { + IContainer[] underlyingFolders = virtualFolder.getUnderlyingFolders(); + for (int j = 0; j < underlyingFolders.length; j++) { + if (underlyingFolders[i].isAccessible()) { + return underlyingFolders[i].getFullPath(); + } + } + } + } + // overlay? + IVirtualResource member = rootFolder.findMember(runtimeReference); + if (member != null) { + return member.getWorkspaceRelativePath(); + } + } + } + return null; + } + + /** + * @param basePath - + * the full path to a resource within the workspace + * @param reference - + * the reference string to resolve + * @return - the full path within the workspace that corresponds to the + * given reference according to the virtual pathing support + */ + static IPath resolve(IPath basePath, String reference) { + if (reference == null || basePath == null || basePath.segmentCount() == 0) + return null; + + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0)); + + if (!ModuleCoreNature.isFlexibleProject(project)) + return null; + + if (basePath.segmentCount() > 1) { + IResource baseResource = ResourcesPlugin.getWorkspace().getRoot().findMember(basePath); + if (baseResource != null) { + IVirtualResource[] virtualResources = ComponentCore.createResources(baseResource); + for (int i = 0; i < virtualResources.length; i++) { + IPath referenceRuntimePath = null; + if (reference.startsWith(SLASH)) { + referenceRuntimePath = new Path(reference); + } + else { + IPath baseRuntimePath = virtualResources[i].getRuntimePath(); + referenceRuntimePath = baseRuntimePath.removeLastSegments(1).append(reference); + } + + IVirtualFile virtualFile = ComponentCore.createFile(project, referenceRuntimePath); + if (virtualFile != null && virtualFile.exists()) { + IFile[] underlyingFiles = virtualFile.getUnderlyingFiles(); + for (int j = 0; j < underlyingFiles.length; j++) { + if (underlyingFiles[j].isAccessible()) { + return underlyingFiles[j].getFullPath(); + } + } + if (underlyingFiles.length > 0) { + return underlyingFiles[0].getFullPath(); + } + } + else { + // http://bugs.eclipse.org/338751 + IVirtualFolder virtualFolder = ComponentCore.createFolder(project, referenceRuntimePath); + if (virtualFolder != null && virtualFolder.exists()) { + IContainer[] underlyingFolders = virtualFolder.getUnderlyingFolders(); + for (int j = 0; j < underlyingFolders.length; j++) { + if (underlyingFolders[j].isAccessible()) { + return underlyingFolders[j].getFullPath(); + } + } + if (underlyingFolders.length > 0) { + return underlyingFolders[0].getFullPath(); + } + } + else { + // check assembled projects + return resolveInReferenced(project, referenceRuntimePath); + } + } + } + } + } + else { + IVirtualFile virtualFile = ComponentCore.createFile(project, new Path(reference)); + if (virtualFile != null && virtualFile.exists()) { + return virtualFile.getUnderlyingFile().getFullPath(); + } + } + return null; + } + + static IPath[] getAcceptableRootPaths(IProject project) { + if (!ModuleCoreNature.isFlexibleProject(project)) { + return new IPath[]{project.getFullPath()}; + } + + List paths = new ArrayList<>(); + IVirtualFolder componentFolder = ComponentCore.createFolder(project, Path.ROOT); + if (componentFolder != null && componentFolder.exists()) { + IContainer[] workspaceFolders = componentFolder.getUnderlyingFolders(); + for (int i = 0; i < workspaceFolders.length; i++) { + if (workspaceFolders[i].getFolder(FacetModuleCoreSupport.META_INF_RESOURCES_PATH).isAccessible()) + paths.add(workspaceFolders[i].getFullPath().append(FacetModuleCoreSupport.META_INF_RESOURCES_PATH)); + else + paths.add(workspaceFolders[i].getFullPath()); + } + + IVirtualReference[] references = ComponentCore.createComponent(project).getReferences(); + if (references != null) { + for (int i = 0; i < references.length; i++) { + IVirtualComponent referencedComponent = references[i].getReferencedComponent(); + if (referencedComponent == null) + continue; + IVirtualComponent component = referencedComponent.getComponent(); + if (component == null) + continue; + IVirtualFolder rootFolder = component.getRootFolder(); + if (rootFolder == null) + continue; + IPath referencedPathRoot = rootFolder.getWorkspaceRelativePath(); + /* http://bugs.eclipse.org/410161 */ + if (referencedPathRoot != null) { + /* + * See Servlet 3.0, section 4.6 ; this is the only + * referenced module/component type we support + */ + IPath resourcesPath = referencedPathRoot.append(FacetModuleCoreSupport.META_INF_RESOURCES); + if (resourcesPath != null && component.getProject().findMember(resourcesPath.removeFirstSegments(1)) != null) { + paths.add(resourcesPath); + } + } + } + } + + } + else { + paths.add(project.getFullPath()); + } + return paths.toArray(new IPath[paths.size()]); + } + + static IPath getDefaultRoot(IProject project) { + if (ModuleCoreNature.isFlexibleProject(project)) { + IVirtualFolder componentFolder = ComponentCore.createFolder(project, Path.ROOT); + if (componentFolder != null && componentFolder.exists()) { + return componentFolder.getWorkspaceRelativePath(); + } + } + return null; + } + + static IProject[] getReferenced(IProject current) { + if (!ModuleCoreNature.isFlexibleProject(current)) + return new IProject[0]; + + Set projects = new HashSet(); + IVirtualReference[] references = ComponentCore.createComponent(current).getReferences(); + if (references != null) { + for (int i = 0; i < references.length; i++) { + IVirtualComponent referencedComponent = references[i].getReferencedComponent(); + if (referencedComponent == null) + continue; + IProject project = referencedComponent.getProject(); + if (project == null || project.equals(current)) + continue; + projects.add(project); + } + } + return projects.toArray(new IProject[projects.size()]); + } + + static IPath getRootContainerForPath(IProject project, IPath path) { + if (ModuleCoreNature.isFlexibleProject(project)) { + IVirtualFolder componentFolder = ComponentCore.createFolder(project, Path.ROOT); + if (componentFolder != null && componentFolder.exists()) { + IContainer[] workspaceFolders = componentFolder.getUnderlyingFolders(); + for (int i = 0; i < workspaceFolders.length; i++) { + if (workspaceFolders[i].getFullPath().isPrefixOf(path)) { + return workspaceFolders[i].getFullPath(); + } + } + } + } + return null; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/ContextParamSpecifiedJSFAppConfigLocater.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/ContextParamSpecifiedJSFAppConfigLocater.java index 5a5e8a30e..4064eba42 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/ContextParamSpecifiedJSFAppConfigLocater.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/ContextParamSpecifiedJSFAppConfigLocater.java @@ -294,7 +294,9 @@ protected boolean isConfigFilesContextParam(EObject contextParam) { else if (contextParam instanceof org.eclipse.jst.javaee.core.ParamValue) name = ((org.eclipse.jst.javaee.core.ParamValue)contextParam).getParamName(); - if (name != null && name.equals(JSFAppConfigUtils.CONFIG_FILES_CONTEXT_PARAM_NAME)) { + if (name != null && + (name.equals(JSFAppConfigUtils.CONFIG_FILES_CONTEXT_PARAM_NAME) + || name.equals(JSFAppConfigUtils.CONFIG_FILES_CONTEXT_PARAM_NAME_JAKARTA))) { isConfigFiles = true; } } @@ -318,7 +320,9 @@ protected boolean isConfigFilesParamValue(EObject paramVal) { else if (paramVal instanceof org.eclipse.jst.javaee.core.ParamValue) name = ((org.eclipse.jst.javaee.core.ParamValue)paramVal).getParamName(); - if (name != null && name.equals(JSFAppConfigUtils.CONFIG_FILES_CONTEXT_PARAM_NAME)) { + if (name != null && + (name.equals(JSFAppConfigUtils.CONFIG_FILES_CONTEXT_PARAM_NAME) + || name.equals(JSFAppConfigUtils.CONFIG_FILES_CONTEXT_PARAM_NAME_JAKARTA))) { isConfigFiles = true; } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/ImplicitRuntimeJSFAppConfigProvider.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/ImplicitRuntimeJSFAppConfigProvider.java index 6c5247eca..17cb19cb1 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/ImplicitRuntimeJSFAppConfigProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/ImplicitRuntimeJSFAppConfigProvider.java @@ -12,8 +12,10 @@ *******************************************************************************/ package org.eclipse.jst.jsf.core.jsfappconfig; +import org.eclipse.core.resources.IProject; import org.eclipse.emf.common.util.EList; import org.eclipse.jst.jsf.core.IJSFCoreConstants; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.ComponentClassType; import org.eclipse.jst.jsf.facesconfig.emf.ComponentType; import org.eclipse.jst.jsf.facesconfig.emf.ComponentTypeType; @@ -70,9 +72,10 @@ public void releaseFacesConfigModel() { */ protected void createModel() { //Bug 340093 - [JSF2.0] Need version mechanism for determining what implicit components are valid + IProject project = jsfAppConfigLocater.getJSFAppConfigManager().getProject(); final boolean isAtLeastJSF20Project = JSFAppConfigUtils.isValidJSFProject( - jsfAppConfigLocater.getJSFAppConfigManager().getProject(), - IJSFCoreConstants.FACET_VERSION_2_0); + project, IJSFCoreConstants.FACET_VERSION_2_0); + boolean isJakartaEE = JSFVersion.guessAtLeast(JSFVersion.V3_0, project); facesConfig = FacesConfigFactory.eINSTANCE.createFacesConfigType(); //create and add converters by id EList converters = facesConfig.getConverter(); @@ -92,16 +95,25 @@ protected void createModel() { converters.add(createConverter("Enum")); //$NON-NLS-1$ } // converters by for-class (see spec 3.3.3 -- Standard Converter Implementions - converters.add(createForClassConverter("java.lang.Boolean", "javax.faces.convert.BooleanConverter")); //$NON-NLS-1$ //$NON-NLS-2$ - converters.add(createForClassConverter("java.lang.Byte", "javax.faces.convert.ByteConverter")); //$NON-NLS-1$ //$NON-NLS-2$ - converters.add(createForClassConverter("java.lang.Character", "javax.faces.convert.CharacterConverter")); //$NON-NLS-1$ //$NON-NLS-2$ - converters.add(createForClassConverter("java.lang.Double", "javax.faces.convert.DoubleConverter")); //$NON-NLS-1$ //$NON-NLS-2$ - converters.add(createForClassConverter("java.lang.Float", "javax.faces.convert.FloatConverter")); //$NON-NLS-1$ //$NON-NLS-2$ - converters.add(createForClassConverter("java.lang.Integer", "javax.faces.convert.IntegerConverter")); //$NON-NLS-1$ //$NON-NLS-2$ - converters.add(createForClassConverter("java.lang.Long", "javax.faces.convert.LongConverter")); //$NON-NLS-1$ //$NON-NLS-2$ - converters.add(createForClassConverter("java.lang.Short", "javax.faces.converter.ShortConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Boolean", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.BooleanConverter" : "javax.faces.convert.BooleanConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Byte", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.ByteConverter" : "javax.faces.convert.ByteConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Character", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.CharacterConverter" : "javax.faces.convert.CharacterConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Double", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.DoubleConverter" : "javax.faces.convert.DoubleConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Float", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.FloatConverter" : "javax.faces.convert.FloatConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Integer", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.IntegerConverter" : "javax.faces.convert.IntegerConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Long", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.LongConverter" : "javax.faces.convert.LongConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Short", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.ShortConverter" : "javax.faces.converter.ShortConverter")); //$NON-NLS-1$ //$NON-NLS-2$ if (isAtLeastJSF20Project) { - converters.add(createForClassConverter("java.lang.Enum", "javax.faces.converter.EnumConverter")); //$NON-NLS-1$ //$NON-NLS-2$ + converters.add(createForClassConverter("java.lang.Enum", //$NON-NLS-1$ + isJakartaEE ? "jakarta.faces.convert.EnumConverter" : "javax.faces.converter.EnumConverter")); //$NON-NLS-1$ //$NON-NLS-2$ } //create and add validators EList validators = facesConfig.getValidator(); @@ -172,18 +184,21 @@ protected void createModel() { * @return {@link ConverterType} instance. */ protected ConverterType createConverter(String name) { + IProject project = jsfAppConfigLocater.getJSFAppConfigManager().getProject(); + boolean isJakartaEE = JSFVersion.guessAtLeast(JSFVersion.V3_0, project); + ConverterType converterType = FacesConfigFactory.eINSTANCE.createConverterType(); //set converter-id ConverterIdType converterIdType = FacesConfigFactory.eINSTANCE.createConverterIdType(); StringBuffer sb = new StringBuffer(); - sb.append("javax.faces."); //$NON-NLS-1$ + sb.append(isJakartaEE ? "jakarta.faces.": "javax.faces."); //$NON-NLS-1$ //$NON-NLS-2$ sb.append(name); converterIdType.setTextContent(sb.toString()); converterType.setConverterId(converterIdType); //set converter-class ConverterClassType converterClassType = FacesConfigFactory.eINSTANCE.createConverterClassType(); sb = new StringBuffer(); - sb.append("javax.faces.convert."); //$NON-NLS-1$ + sb.append(isJakartaEE ? "jakarta.faces.convert." : "javax.faces.convert."); //$NON-NLS-1$ //$NON-NLS-2$ sb.append(name); sb.append("Converter"); //$NON-NLS-1$ converterClassType.setTextContent(sb.toString()); @@ -213,18 +228,21 @@ private ConverterType createForClassConverter(String forClass, String converterC * @return {@link ValidatorType} instance. */ protected ValidatorType createValidator(String id, String classname) { + IProject project = jsfAppConfigLocater.getJSFAppConfigManager().getProject(); + boolean isJakartaEE = JSFVersion.guessAtLeast(JSFVersion.V3_0, project); + ValidatorType validatorType = FacesConfigFactory.eINSTANCE.createValidatorType(); //set validator-id ValidatorIdType validatorIdType = FacesConfigFactory.eINSTANCE.createValidatorIdType(); StringBuffer sb = new StringBuffer(); - sb.append("javax.faces."); //$NON-NLS-1$ + sb.append(isJakartaEE ? "jakarta.faces." : "javax.faces."); //$NON-NLS-1$ //$NON-NLS-2$ sb.append(id); validatorIdType.setTextContent(sb.toString()); validatorType.setValidatorId(validatorIdType); //set validator-class ValidatorClassType validatorClassType = FacesConfigFactory.eINSTANCE.createValidatorClassType(); sb = new StringBuffer(); - sb.append("javax.faces.validator."); //$NON-NLS-1$ + sb.append(isJakartaEE ? "jakarta.faces.validator." : "javax.faces.validator."); //$NON-NLS-1$ //$NON-NLS-2$ sb.append(classname); sb.append("Validator"); //$NON-NLS-1$ validatorClassType.setTextContent(sb.toString()); @@ -252,18 +270,21 @@ protected ValidatorType createValidator(String name) { * @return {@link ComponentType} instance. */ protected ComponentType createUIComponent(String name) { + IProject project = jsfAppConfigLocater.getJSFAppConfigManager().getProject(); + boolean isJakartaEE = JSFVersion.guessAtLeast(JSFVersion.V3_0, project); + ComponentType componentType = FacesConfigFactory.eINSTANCE.createComponentType(); //set component-type ComponentTypeType componentTypeType = FacesConfigFactory.eINSTANCE.createComponentTypeType(); StringBuffer sb = new StringBuffer(); - sb.append("javax.faces."); //$NON-NLS-1$ + sb.append(isJakartaEE ? "jakarta.faces." : "javax.faces."); //$NON-NLS-1$ //$NON-NLS-2$ sb.append(name); componentTypeType.setTextContent(sb.toString()); componentType.setComponentType(componentTypeType); //set component-class ComponentClassType componentClassType = FacesConfigFactory.eINSTANCE.createComponentClassType(); sb = new StringBuffer(); - sb.append("javax.faces.component.UI"); //$NON-NLS-1$ + sb.append(isJakartaEE ? "javax.faces.component.UI" : "javax.faces.component.UI"); //$NON-NLS-1$ //$NON-NLS-2$ sb.append(name); componentClassType.setTextContent(sb.toString()); componentType.setComponentClass(componentClassType); @@ -279,18 +300,21 @@ protected ComponentType createUIComponent(String name) { * @return {@link ComponentType} instance. */ protected ComponentType createHTMLComponent(String name) { + IProject project = jsfAppConfigLocater.getJSFAppConfigManager().getProject(); + boolean isJakartaEE = JSFVersion.guessAtLeast(JSFVersion.V3_0, project); + ComponentType componentType = FacesConfigFactory.eINSTANCE.createComponentType(); //set component-type ComponentTypeType componentTypeType = FacesConfigFactory.eINSTANCE.createComponentTypeType(); StringBuffer sb = new StringBuffer(); - sb.append("javax.faces."); //$NON-NLS-1$ + sb.append(isJakartaEE ? "jakarta.faces." : "javax.faces."); //$NON-NLS-1$ //$NON-NLS-2$ sb.append(name); componentTypeType.setTextContent(sb.toString()); componentType.setComponentType(componentTypeType); //set component-class ComponentClassType componentClassType = FacesConfigFactory.eINSTANCE.createComponentClassType(); sb = new StringBuffer(); - sb.append("javax.faces.component.html."); //$NON-NLS-1$ + sb.append(isJakartaEE ? "jakarta.faces.component.html." : "javax.faces.component.html."); //$NON-NLS-1$ //$NON-NLS-2$ sb.append(name); componentClassType.setTextContent(sb.toString()); componentType.setComponentClass(componentClassType); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/JSFAppConfigUtils.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/JSFAppConfigUtils.java index 9dc45c13b..4c52c4cdf 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/JSFAppConfigUtils.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/JSFAppConfigUtils.java @@ -77,6 +77,10 @@ public class JSFAppConfigUtils { * Name of JSF CONFIG_FILES context parameter ("javax.faces.CONFIG_FILES"). */ public static final String CONFIG_FILES_CONTEXT_PARAM_NAME = "javax.faces.CONFIG_FILES"; //$NON-NLS-1$ + /** + * Name of Jakarta Faces CONFIG_FILES context parameter ("jakarta.faces.CONFIG_FILES"). + */ + public static final String CONFIG_FILES_CONTEXT_PARAM_NAME_JAKARTA = "jakarta.faces.CONFIG_FILES"; //$NON-NLS-1$ /** * Location in JAR file of application configuration resource file @@ -227,7 +231,8 @@ public static IPath getWebContentFolderRelativePath(IFile file) { * @param project IProject instance for which to get the context * parameter's value. * @return List of application configuration file names as listed in the - * JSF CONFIG_FILES context parameter ("javax.faces.CONFIG_FILES"); list + * JSF CONFIG_FILES context parameter ("javax.faces.CONFIG_FILES" or + * "jakarta.faces.CONFIG_FILES"); list * may be empty. */ public static List getConfigFilesFromContextParam(IProject project) { @@ -252,7 +257,7 @@ private static List getConfigFilesForJEEApp(org.eclipse.jst.javaee.web.WebApp we Iterator itContextParams = contextParams.iterator(); while (itContextParams.hasNext()) { org.eclipse.jst.javaee.core.ParamValue paramValue = (org.eclipse.jst.javaee.core.ParamValue)itContextParams.next(); - if (paramValue.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME)) { + if (paramValue.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME) || paramValue.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME_JAKARTA)) { filesString = paramValue.getParamValue(); break; } @@ -281,7 +286,8 @@ private static List getConfigFilesForJ2EEApp(IProject project){ Iterator itContexts = contexts.iterator(); while (itContexts.hasNext()) { ContextParam contextParam = (ContextParam)itContexts.next(); - if (contextParam.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME)) { + if (contextParam.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME) + || contextParam.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME_JAKARTA)) { filesString = contextParam.getParamValue(); break; } @@ -291,7 +297,8 @@ private static List getConfigFilesForJ2EEApp(IProject project){ Iterator itContextParams = contextParams.iterator(); while (itContextParams.hasNext()) { ParamValue paramValue = (ParamValue)itContextParams.next(); - if (paramValue.getName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME)) { + if (paramValue.getName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME) + || paramValue.getName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME_JAKARTA)) { filesString = paramValue.getValue(); break; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/el/DefaultDTPropertyResolver.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/el/DefaultDTPropertyResolver.java index bb0f0e8df..c4d44e63d 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/el/DefaultDTPropertyResolver.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/el/DefaultDTPropertyResolver.java @@ -47,7 +47,8 @@ */ public class DefaultDTPropertyResolver extends AbstractDTPropertyResolver { - private static final String UICOMPONENT_SYMBOL_SIGNATURE = "Ljavax.faces.component.UIComponent;"; //$NON-NLS-1$ + private static final String UICOMPONENT_SYMBOL_SIGNATURE = "Ljavax.faces.component.UIComponent;"; //$NON-NLS-1$ + private static final String UICOMPONENT_JAKARTA_SYMBOL_SIGNATURE = "Ljakarta.faces.component.UIComponent;"; //$NON-NLS-1$ private static final String ATTRS_SYMBOL_NAME = "attrs"; //$NON-NLS-1$ private JSFSymbolFactory _symbolFactory = new JSFSymbolFactory(); @@ -257,7 +258,7 @@ public void setProject(IProject project) { private ISymbol getCCAttrsSymbolIfNecessary(final ITypeDescriptor typeDesc) { ISymbol attrsSymbol = null; - if (typeDesc.instanceOf(UICOMPONENT_SYMBOL_SIGNATURE) && + if ((typeDesc.instanceOf(UICOMPONENT_SYMBOL_SIGNATURE) || typeDesc.instanceOf(UICOMPONENT_JAKARTA_SYMBOL_SIGNATURE)) && JSFAppConfigUtils.isValidJSFProject(_project, IJSFCoreConstants.FACET_VERSION_2_0)) { attrsSymbol = _symbolFactory.createUnknownInstanceSymbol(ATTRS_SYMBOL_NAME, ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DefaultDTUIViewRoot.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DefaultDTUIViewRoot.java index 05a8b5585..182c9c079 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DefaultDTUIViewRoot.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DefaultDTUIViewRoot.java @@ -24,6 +24,7 @@ import org.eclipse.jst.jsf.context.symbol.ISymbol; import org.eclipse.jst.jsf.context.symbol.source.ISymbolSourceProvider; import org.eclipse.jst.jsf.context.symbol.source.ISymbolSourceProviderFactory; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.designtime.context.DTFacesContext; /** @@ -47,8 +48,10 @@ public class DefaultDTUIViewRoot extends DTUIViewRoot public DefaultDTUIViewRoot(final DTFacesContext facesContext) { // TODO: refactor constants - super(null, null, new ComponentTypeInfo("javax.faces.ViewRoot", //$NON-NLS-1$ - "javax.faces.component.UIViewRoot", "javax.faces.ViewRoot", //$NON-NLS-1$ //$NON-NLS-2$ + super(null, null, new ComponentTypeInfo( + JSFVersion.guessAtLeast(JSFVersion.V3_0, facesContext.adaptContextObject().getProject()) ? "jakarta.faces.ViewRoot" : "javax.faces.ViewRoot", //$NON-NLS-1$ //$NON-NLS-2$ + JSFVersion.guessAtLeast(JSFVersion.V3_0, facesContext.adaptContextObject().getProject()) ? "jakarta.faces.component.UIViewRoot" : "javax.faces.component.UIViewRoot", //$NON-NLS-1$ //$NON-NLS-2$ + JSFVersion.guessAtLeast(JSFVersion.V3_0, facesContext.adaptContextObject().getProject()) ? "jakarta.faces.ViewRoot" : "javax.faces.ViewRoot", //$NON-NLS-1$ //$NON-NLS-2$ null)); _defaultServices = new DefaultServices(); _facesContext = facesContext; diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLComponentTreeConstructionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLComponentTreeConstructionStrategy.java index 4d796ac5a..7e5c1de52 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLComponentTreeConstructionStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLComponentTreeConstructionStrategy.java @@ -134,8 +134,9 @@ protected void populateViewRoot(final DTUIViewRoot viewRoot, { final ComponentInfo topLevelChild = (ComponentInfo) it.next(); - if ("javax.faces.ViewRoot".equals(topLevelChild //$NON-NLS-1$ - .getComponentTypeInfo().getComponentType())) + String topLevelChildType = topLevelChild.getComponentTypeInfo().getComponentType(); + if ("javax.faces.ViewRoot".equals(topLevelChildType) || //$NON-NLS-1$ + "jakarta.faces.ViewRoot".equals(topLevelChildType)) //$NON-NLS-1$ { foundRoot = topLevelChild; break FIND_VIEWROOT; diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java index 51222f5f3..7062c081a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java @@ -189,27 +189,27 @@ private ComponentInfo findBestComponent(final String uri, // if we have a well-established base type, try that first // sub-classes must occur before superclasses to ensure most accurate // detection. - if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIINPUT)) + if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIINPUT) || typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIINPUT_JAKARTA)) { bestComponent = ComponentFactory.createUIInputInfo(parent, typeInfo, initMap); } - else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIOUTPUT)) + else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIOUTPUT) || typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIOUTPUT_JAKARTA)) { bestComponent = ComponentFactory.createUIOutputInfo(parent, typeInfo, initMap); } - else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UICOMMAND)) + else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UICOMMAND) || typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UICOMMAND_JAKARTA)) { bestComponent = ComponentFactory.createUICommandInfo(parent, typeInfo, initMap); } - else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIDATA)) + else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIDATA) || typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIDATA_JAKARTA)) { bestComponent = ComponentFactory.createUIDataInfo(parent, typeInfo, initMap); } - else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIFORM)) + else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIFORM) || typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIFORM_JAKARTA)) { // TODO: how handle prepend ids? bestComponent = ComponentFactory.createUIFormInfo(parent, typeInfo, diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/AbstractDataModelVariableFactory.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/AbstractDataModelVariableFactory.java index 4911ded66..eaa351ff3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/AbstractDataModelVariableFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/AbstractDataModelVariableFactory.java @@ -134,8 +134,10 @@ private ISymbol internalCreateFromBaseType(String symbolName, // template info, these row containers are opaque to us else if (valueType .isInstanceOf(TypeConstants.TYPE_JAVAX_SERVLET_JSP_JSTL_SQL_RESULT) + || valueType.isInstanceOf(TypeConstants.TYPE_JAKARTA_SERVLET_JSP_JSTL_SQL_RESULT) || valueType.isInstanceOf(TypeConstants.TYPE_RESULT_SET) - || valueType.isInstanceOf(TypeConstants.TYPE_DATA_MODEL)) + || valueType.isInstanceOf(TypeConstants.TYPE_DATA_MODEL) + || valueType.isInstanceOf(TypeConstants.TYPE_DATA_MODEL_JAKARTA)) { return getSymbolFactory().createDefaultSymbol(symbolName, ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL, Messages .getString("AbstractDataModelVariableFactory.DataModel.Symbol.RowVariable.DetailedDescription")); //$NON-NLS-1$ diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/DefaultBuiltInSymbolProvider.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/DefaultBuiltInSymbolProvider.java index e90226544..05449b73d 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/DefaultBuiltInSymbolProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/DefaultBuiltInSymbolProvider.java @@ -23,6 +23,7 @@ import java.util.Set; import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jst.jsf.context.symbol.ERuntimeSource; import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; @@ -73,8 +74,10 @@ public synchronized static DefaultBuiltInSymbolProvider getInstance() private static final String PARAM_VALUES_IMPLICIT_OBJ = "paramValues"; //$NON-NLS-1$ private static final String VIEW_IMPLICIT_OBJ = "view"; //$NON-NLS-1$ - private static final String FACES_CONTEXT_FULLY_QUALIFIED_CLASS = "javax.faces.context.FacesContext"; //$NON-NLS-1$ + private static final String FACES_CONTEXT_FULLY_QUALIFIED_CLASS = "javax.faces.context.FacesContext"; //$NON-NLS-1$ + private static final String FACES_CONTEXT_JAKARTA_FULLY_QUALIFIED_CLASS = "jakarta.faces.context.FacesContext"; //$NON-NLS-1$ private static final String VIEW_FULLY_QUALIFIED_CLASS = "javax.faces.component.UIViewRoot"; //$NON-NLS-1$ + private static final String VIEW_JAKARTA_FULLY_QUALIFIED_CLASS = "jakarta.faces.component.UIViewRoot"; //$NON-NLS-1$ private static final ISymbol SYMBOL_COOKIE_IMPLICIT_OBJ; private static final ISymbol SYMBOL_HEADER_IMPLICIT_OBJ; @@ -90,7 +93,8 @@ public synchronized static DefaultBuiltInSymbolProvider getInstance() private static final String COMPONENT_IMPLICIT_OBJ = "component"; //$NON-NLS-1$ private static final String RESOURCE_IMPLICIT_OBJ = "resource"; //$NON-NLS-1$ - private static final String UICOMPONENT_FULLY_QUALIFIED_CLASS = "javax.faces.component.UIComponent";//$NON-NLS-1$ + private static final String UICOMPONENT_FULLY_QUALIFIED_CLASS = "javax.faces.component.UIComponent";//$NON-NLS-1$ + private static final String UICOMPONENT_JAKARTA_FULLY_QUALIFIED_CLASS = "jakarta.faces.component.UIComponent";//$NON-NLS-1$ static { @@ -249,32 +253,31 @@ private Map getRequestScopeSymbols(final IFile file) requestSymbols.put(SYMBOL_PARAM_IMPLICIT_OBJ.getName(), SYMBOL_PARAM_IMPLICIT_OBJ); requestSymbols.put(SYMBOL_PARAM_VALUES_IMPLICIT_OBJ.getName(), SYMBOL_PARAM_VALUES_IMPLICIT_OBJ); + IProject project = file.getProject(); + boolean isJakartaEE = JSFVersion.guessAtLeast(JSFVersion.V3_0, project); // TODO: these aren't maps; need to find way to handle - symbol = _symbolFactory.createBeanOrUnknownInstanceSymbol(file - .getProject(), FACES_CONTEXT_FULLY_QUALIFIED_CLASS, - FACES_CONTEXT_IMPLICIT_OBJ, - ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); + symbol = _symbolFactory.createBeanOrUnknownInstanceSymbol(project, + isJakartaEE ? FACES_CONTEXT_JAKARTA_FULLY_QUALIFIED_CLASS : FACES_CONTEXT_FULLY_QUALIFIED_CLASS, + FACES_CONTEXT_IMPLICIT_OBJ, ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); requestSymbols.put(symbol.getName(), symbol); - symbol = _symbolFactory.createBeanOrUnknownInstanceSymbol(file - .getProject(), VIEW_FULLY_QUALIFIED_CLASS, VIEW_IMPLICIT_OBJ, - ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); + symbol = _symbolFactory.createBeanOrUnknownInstanceSymbol(project, + isJakartaEE ? VIEW_JAKARTA_FULLY_QUALIFIED_CLASS : VIEW_FULLY_QUALIFIED_CLASS, + VIEW_IMPLICIT_OBJ, ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); requestSymbols.put(symbol.getName(), symbol); //add jsf2.0 implicits if (JSFVersion.guessAtLeast(JSFVersion.V2_0, file.getProject()) ) { - symbol = _symbolFactory.createBeanOrUnknownInstanceSymbol(file - .getProject(), UICOMPONENT_FULLY_QUALIFIED_CLASS, - CC_IMPLICIT_OBJ, - ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); + symbol = _symbolFactory.createBeanOrUnknownInstanceSymbol(project, + isJakartaEE ? UICOMPONENT_JAKARTA_FULLY_QUALIFIED_CLASS : UICOMPONENT_FULLY_QUALIFIED_CLASS, + CC_IMPLICIT_OBJ, ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); requestSymbols.put(symbol.getName(), symbol); // _symbolFactory.createJavaComponentSymbol(CC_IMPLICIT_OBJ, typeDesc, ""); //$NON-NLS-1$ - symbol = _symbolFactory.createBeanOrUnknownInstanceSymbol(file - .getProject(), UICOMPONENT_FULLY_QUALIFIED_CLASS, - COMPONENT_IMPLICIT_OBJ, - ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); + symbol = _symbolFactory.createBeanOrUnknownInstanceSymbol(project, + isJakartaEE ? UICOMPONENT_JAKARTA_FULLY_QUALIFIED_CLASS : UICOMPONENT_FULLY_QUALIFIED_CLASS, + COMPONENT_IMPLICIT_OBJ, ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); requestSymbols.put(symbol.getName(), symbol); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/JSFSymbolFactory.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/JSFSymbolFactory.java index bc12ab2d4..2ad40985b 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/JSFSymbolFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/JSFSymbolFactory.java @@ -114,11 +114,12 @@ public ValueType getValueTypeFromEL(final String elText, /** * @param type * @return true, if the given {@link ValueType} represents - * an instance of javax.faces.model.DataModel + * an instance of javax.faces.model.DataModel or + * jakarta.faces.model.DataModel */ private boolean isFacesDataModel(ValueType type) { - return type.isInstanceOf(TypeConstants.TYPE_DATA_MODEL); + return type.isInstanceOf(TypeConstants.TYPE_DATA_MODEL) || type.isInstanceOf(TypeConstants.TYPE_DATA_MODEL_JAKARTA); } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/DateTimePatternType.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/DateTimePatternType.java index 754cdce38..86f2170dc 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/DateTimePatternType.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/DateTimePatternType.java @@ -13,11 +13,18 @@ ********************************************************************************/ package org.eclipse.jst.jsf.taglibprocessing.attributevalues; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; import org.eclipse.jst.jsf.context.resolver.structureddocument.IDOMContextResolver; import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory; +import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; import org.eclipse.jst.jsf.metadataprocessors.AbstractRootTypeDescriptor; import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues; import org.eclipse.jst.jsf.metadataprocessors.features.PossibleValue; @@ -33,37 +40,77 @@ public class DateTimePatternType extends AbstractRootTypeDescriptor implements IPossibleValues{ //should we ever validate the patterns, extend EnumerationType - final private static String[] DATEPATTERNS = {"M/d/yy", "EEE, M/d/yy", "MM/dd/yyyy", "EEE, MM/dd/yyyy", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + final private static String[] DATEPATTERNS = {"dd.MM.yyyy", "M/d/yy", "EEE, M/d/yy", "MM/dd/yyyy", "EEE, MM/dd/yyyy", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ "MMM d, yyyy", "EEE, MMM d, yyyy", "MMMM d, yyyy", "EEEE, MMMM d, yyyy", "MMMM yyyy" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ }; }; final private static String[] TIMEPATTERNS = {"hh:mm", "hh:mm z", "HH:mm z", "HH:mm:ss z" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ }; - final private static String[] DATETIMEPATTERNS = {"M/d/yy hh:mm", "EEE, M/d/yy hh:mm", "MM/dd/yyyy HH:mm:ss z", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + final private static String[] DATETIMEPATTERNS = {"dd.MM.yyyy HH:mm", "M/d/yy hh:mm", "EEE, M/d/yy hh:mm", "MM/dd/yyyy HH:mm:ss z", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ "EEE, MM/dd/yyyy HH:mm:ss z", "MMM d, yyyy HH:mm z", "EEE, MMM d, yyyy HH:mm z", "MMMM d, yyyy HH:mm z", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ "EEEE, MMMM d, yyyy HH:mm z" //$NON-NLS-1$ }; public List getPossibleValues() { - List ret = new ArrayList(); + List ret = new ArrayList(); String typeVal = getTypeValue(); - if ("date".equalsIgnoreCase(typeVal)){ //$NON-NLS-1$ + if ("date".equalsIgnoreCase(typeVal) || "localDate".equalsIgnoreCase(typeVal)) { //$NON-NLS-1$ //$NON-NLS-2$ for (int i=0;i result = new ArrayList<>(); + result.addAll(ret.stream().map(item -> toPossibleValue(item, false)).collect(Collectors.toList())); + String currentValue = getCurrentAttrValue(); + if (currentValue != null && !currentValue.trim().isEmpty() && !ret.contains(currentValue.trim())) { + result.add(0, toPossibleValue(currentValue, true)); + } + return result; + } + + private static List dates; + private static List getExampleDates() { + if (dates == null) { + dates = Arrays.asList( + ZonedDateTime.now(), + ZonedDateTime.now().plus(13, ChronoUnit.YEARS).plus(6, ChronoUnit.MONTHS).plus(12, ChronoUnit.HOURS).plus(34, ChronoUnit.MINUTES), + ZonedDateTime.of(1903, 12, 28, 19, 26, 15, 123456789, ZoneId.systemDefault()), + ZonedDateTime.of(1600, 2, 17, 9, 5, 37, 123456789, ZoneId.systemDefault()), + ZonedDateTime.of(-4, 7, 15, 7, 42, 5, 123456789, ZoneId.systemDefault()) + ); + } + return dates; + } + + private PossibleValue toPossibleValue(String value, boolean showError) { + PossibleValue pValue = new PossibleValue(value); + try { + DateTimeFormatter dtf = DateTimeFormatter.ofPattern(value); + StringBuilder sb = new StringBuilder("Examples:
"); //$NON-NLS-1$ + sb.append(getExampleDates().stream().map(item -> " - " + item.format(dtf)) //$NON-NLS-1$ + .collect(Collectors.joining("
"))); //$NON-NLS-1$ + pValue.setAdditionalInformation(sb.toString()); + } catch (Throwable e) { + if (showError) { + String additionalInfo = String.format("Pattern is invalid: %s", e.getMessage()); //$NON-NLS-1$ + pValue.setAdditionalInformation(additionalInfo); + } else { + JSFCorePlugin.log(e.getMessage(), e); + } + } + return pValue; } private String getTypeValue() { @@ -82,5 +129,14 @@ private String getTypeValue() { return ""; //$NON-NLS-1$ } + private String getCurrentAttrValue() { + if (getStructuredDocumentContext() != null){ + IDOMContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE.getDOMContextResolver(getStructuredDocumentContext()); + if (resolver != null){ + return resolver.getNode().getNodeValue(); + } + } + return ""; //$NON-NLS-1$ + } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/DateTimeType.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/DateTimeType.java new file mode 100644 index 000000000..9ecac244b --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/DateTimeType.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2007, 2024 Oracle Corporation., and others + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Oracle - initial API and implementation + * + ********************************************************************************/ +package org.eclipse.jst.jsf.taglibprocessing.attributevalues; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.core.resources.IProject; +import org.eclipse.jst.jsf.core.JSFVersion; +import org.eclipse.jst.jsf.metadataprocessors.AbstractRootTypeDescriptor; +import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues; +import org.eclipse.jst.jsf.metadataprocessors.features.PossibleValue; + +/** + * Meta-data processing type representing a Date, Time and DateTime types. + */ + +public class DateTimeType extends AbstractRootTypeDescriptor implements IPossibleValues { + final private static List OLD_TYPES = Arrays.asList("date", "time", "both"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + final private static List JAVA8_TYPES = Arrays.asList( + "localDate", "localDateTime", "localTime", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "offsetTime", "offsetDateTime", //$NON-NLS-1$ //$NON-NLS-2$ + "zonedDateTime" //$NON-NLS-1$ + ); + + public List getPossibleValues() { + List ret = new ArrayList(); + ret.addAll(OLD_TYPES); + IProject project = this.getProject2(); + if (JSFVersion.guessAtLeast(JSFVersion.V2_3, project)) { + ret.addAll(JAVA8_TYPES); + } + return ret.stream().map(item -> new PossibleValue(item)).toList(); + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/FacesConfigConverterIDFeatures.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/FacesConfigConverterIDFeatures.java index 1d547a6f3..8e0f7b079 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/FacesConfigConverterIDFeatures.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/FacesConfigConverterIDFeatures.java @@ -20,6 +20,7 @@ import java.util.Iterator; import java.util.List; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager; import org.eclipse.jst.jsf.facesconfig.emf.ConverterType; import org.eclipse.jst.jsf.metadataprocessors.features.PossibleValue; @@ -37,6 +38,10 @@ public class FacesConfigConverterIDFeatures extends FacesConfigIdentifierFeature * Faces converter classname */ protected static final String CONVERTER = "javax.faces.convert.Converter"; //$NON-NLS-1$ + /** + * Faces converter classname (Jakarta EE) + */ + protected static final String CONVERTER_JAKARTA = "jakarta.faces.convert.Converter"; //$NON-NLS-1$ /** * Imagename to use when displaying converter */ @@ -54,7 +59,9 @@ protected List getElements(JSFAppConfigManager mgr) { /* (non-Javadoc) * @see org.eclipse.jst.jsf.taglibprocessing.attributevalues.FacesConfigIdentifierFeatures#getReturnType() */ - protected String getReturnType(){ return CONVERTER;} + protected String getReturnType() { + return JSFVersion.guessAtLeast(JSFVersion.V3_0, getProject2()) ? CONVERTER_JAKARTA : CONVERTER; + } /* (non-Javadoc) * @see org.eclipse.jst.jsf.taglibprocessing.attributevalues.FacesConfigIdentifierFeatures#getPossibleValueProposals(java.util.List) diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/FacesConfigValidatorIDFeatures.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/FacesConfigValidatorIDFeatures.java index 32944772b..abd37f381 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/FacesConfigValidatorIDFeatures.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/FacesConfigValidatorIDFeatures.java @@ -20,6 +20,7 @@ import java.util.Iterator; import java.util.List; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager; import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType; import org.eclipse.jst.jsf.metadataprocessors.features.PossibleValue; @@ -37,6 +38,10 @@ public class FacesConfigValidatorIDFeatures extends FacesConfigIdentifierFeature * Faces validator classname */ protected static final String VALIDATOR = "javax.faces.validator.Validator"; //$NON-NLS-1$ + /** + * Faces validator classname (Jakarta EE) + */ + protected static final String VALIDATOR_JAKARTA = "jakarta.faces.validator.Validator"; //$NON-NLS-1$ /** * Imagename to use when displaying validator */ @@ -45,7 +50,9 @@ public class FacesConfigValidatorIDFeatures extends FacesConfigIdentifierFeature /* (non-Javadoc) * @see org.eclipse.jst.jsf.taglibprocessing.attributevalues.FacesConfigIdentifierFeatures#getReturnType() */ - protected String getReturnType(){ return VALIDATOR;} + protected String getReturnType() { + return JSFVersion.guessAtLeast(JSFVersion.V3_0, getProject2()) ? VALIDATOR_JAKARTA : VALIDATOR; + } /* (non-Javadoc) * @see org.eclipse.jst.jsf.taglibprocessing.attributevalues.FacesConfigIdentifierFeatures#getElements(org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager) diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ApplicationValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ApplicationValidationVisitor.java index e2b1fe785..0f8f1a4bb 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ApplicationValidationVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ApplicationValidationVisitor.java @@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.jst.jsf.core.IJSFCoreConstants; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.DefaultLocaleType; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType; @@ -145,7 +146,10 @@ private static class ActionListenerValidationVisitor extends ApplicationClassNam */ public ActionListenerValidationVisitor(final String version) { super(FacesConfigPackage.eINSTANCE.getApplicationType_ActionListener(), - version,"javax.faces.event.ActionListener", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.event.ActionListener" : //$NON-NLS-1$ + "javax.faces.event.ActionListener", true); //$NON-NLS-1$ } } @@ -156,7 +160,10 @@ private static class NavigationHandlerValidationVisitor extends ApplicationClass */ public NavigationHandlerValidationVisitor(final String version) { super(FacesConfigPackage.eINSTANCE.getApplicationType_NavigationHandler(), - version,"javax.faces.application.NavigationHandler", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.application.NavigationHandler" : //$NON-NLS-1$ + "javax.faces.application.NavigationHandler", true); //$NON-NLS-1$ } } @@ -165,7 +172,10 @@ private static class ViewHandlerValidationVisitor extends ApplicationClassNameBa ViewHandlerValidationVisitor(final String version) { super(FacesConfigPackage.eINSTANCE.getApplicationType_ViewHandler(), - version,"javax.faces.application.ViewHandler", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.application.ViewHandler" : //$NON-NLS-1$ + "javax.faces.application.ViewHandler", true); //$NON-NLS-1$ } } @@ -176,7 +186,10 @@ private static class StateManagerValidationVisitior extends ApplicationClassName // must a concrete class with a zero arg constructor: // JSF1.1_3.2.3.2 and JSF1.2_3.2.4.2 super(FacesConfigPackage.eINSTANCE.getApplicationType_StateManager(), - version,"javax.faces.application.StateManager", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.application.StateManager" : //$NON-NLS-1$ + "javax.faces.application.StateManager", true); //$NON-NLS-1$ } } @@ -185,7 +198,10 @@ private static class PropertyResolverValidationVisitor extends ApplicationClassN PropertyResolverValidationVisitor(final String version) { super(FacesConfigPackage.eINSTANCE.getApplicationType_PropertyResolver(), - version,"javax.faces.el.PropertyResolver", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.el.PropertyResolver" : //$NON-NLS-1$ + "javax.faces.el.PropertyResolver", true); //$NON-NLS-1$ } protected void doValidate(EObject object, List messages, IFile file) { @@ -209,7 +225,10 @@ private static class VariableResolverValidationVisitor extends ApplicationClassN VariableResolverValidationVisitor(final String version) { super(FacesConfigPackage.eINSTANCE.getApplicationType_VariableResolver(), - version, "javax.faces.el.VariableResolver", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.el.VariableResolver" : //$NON-NLS-1$ + "javax.faces.el.VariableResolver", true); //$NON-NLS-1$ } protected void doValidate(EObject object, List messages, IFile file) { @@ -235,7 +254,10 @@ private static class ELResolverValidationVisitor extends ApplicationClassNameBas // must be a class and have zero-arg constructor // JSF1.2_5.6.1.4 super(FacesConfigPackage.eINSTANCE.getApplicationType_ELResolver(), - version, "javax.el.ELResolver", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.el.ELResolver" : //$NON-NLS-1$ + "javax.el.ELResolver", true); //$NON-NLS-1$ } protected void doValidate(EObject object, List messages, IFile file) { @@ -316,7 +338,10 @@ private static class ResourceHandlerValidationVisitor extends ApplicationClassNa ResourceHandlerValidationVisitor(final String version) { super(FacesConfigPackage.eINSTANCE.getApplicationType_ResourceHandler(), - version,"javax.faces.application.ResourceHandler", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.application.ResourceHandler" : //$NON-NLS-1$ + "javax.faces.application.ResourceHandler", true); //$NON-NLS-1$ } } @@ -376,7 +401,10 @@ private static class SystemEventListenerValidationVisitor extends ApplicationCla SystemEventListenerValidationVisitor(final String version) { super(FacesConfigPackage.eINSTANCE.getSystemEventListenerType_SystemEventListenerClass(), - version,"javax.faces.event.SystemEventListener", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.event.SystemEventListener" : //$NON-NLS-1$ + "javax.faces.event.SystemEventListener", true); //$NON-NLS-1$ } } @@ -385,7 +413,10 @@ private static class SystemEventListenerClassValidationVisitor extends Applicati SystemEventListenerClassValidationVisitor(final String version) { super(FacesConfigPackage.eINSTANCE.getSystemEventListenerType_SystemEventClass(), - version,"javax.faces.event.SystemEvent", true); //$NON-NLS-1$ + version, + JSFVersion.valueOfString(version).compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.event.SystemEvent" : //$NON-NLS-1$ + "javax.faces.event.SystemEvent", true); //$NON-NLS-1$ } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/BehaviorValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/BehaviorValidationVisitor.java index fcc02b550..fabcb070b 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/BehaviorValidationVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/BehaviorValidationVisitor.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.BehaviorClassType; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; @@ -69,7 +70,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.component.behavior.Behavior"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.component.behavior.Behavior" : //$NON-NLS-1$ + "javax.faces.component.behavior.Behavior"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ClientBehaviorRendererValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ClientBehaviorRendererValidationVisitor.java index e36bf0191..f6d6d7e6c 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ClientBehaviorRendererValidationVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ClientBehaviorRendererValidationVisitor.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.ClientBehaviorRendererClassType; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; @@ -62,7 +63,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.render.ClientBehaviorRenderer"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.render.ClientBehaviorRenderer" : //$NON-NLS-1$ + "javax.faces.render.ClientBehaviorRenderer"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ComponentValidatorVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ComponentValidatorVisitor.java index e263b4ae0..d60b3f7cd 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ComponentValidatorVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ComponentValidatorVisitor.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.ComponentClassType; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; import org.eclipse.jst.jsf.facesconfig.emf.FacetNameType; @@ -68,7 +69,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.component.UIComponent"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.component.UIComponent" : //$NON-NLS-1$ + "javax.faces.component.UIComponent"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java index 36f064c36..02254e171 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.ConverterClassType; import org.eclipse.jst.jsf.facesconfig.emf.ConverterForClassType; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; @@ -66,7 +67,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.convert.Converter"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.convert.Converter" : //$NON-NLS-1$ + "javax.faces.convert.Converter"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/FacesConfigValidator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/FacesConfigValidator.java index 7bbb9d0ee..e40704c5e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/FacesConfigValidator.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/FacesConfigValidator.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; import org.eclipse.jst.jsf.facesconfig.emf.PhaseListenerType; @@ -88,7 +89,9 @@ protected String getFullyQualifiedName(EObject eobj) { } protected String getInstanceOf() { - return "javax.faces.event.PhaseListener"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.event.PhaseListener" : //$NON-NLS-1$ + "javax.faces.event.PhaseListener"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/FactoryValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/FactoryValidationVisitor.java index 3ce544018..a69925546 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/FactoryValidationVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/FactoryValidationVisitor.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.ApplicationFactoryType; import org.eclipse.jst.jsf.facesconfig.emf.ExceptionHandlerFactoryType; import org.eclipse.jst.jsf.facesconfig.emf.ExternalContextFactoryType; @@ -77,7 +78,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.application.ApplicationFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.application.ApplicationFactory" : //$NON-NLS-1$ + "javax.faces.application.ApplicationFactory"; //$NON-NLS-1$ } @Override @@ -106,7 +109,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.context.FacesContextFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.context.FacesContextFactory" : //$NON-NLS-1$ + "javax.faces.context.FacesContextFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { @@ -137,7 +142,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.lifecycle.LifecycleFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.lifecycle.LifecycleFactory" : //$NON-NLS-1$ + "javax.faces.lifecycle.LifecycleFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { @@ -167,7 +174,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.render.RenderKitFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.render.RenderKitFactory" : //$NON-NLS-1$ + "javax.faces.render.RenderKitFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { @@ -195,7 +204,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.context.ExceptionHandlerFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.context.ExceptionHandlerFactory": //$NON-NLS-1$ + "javax.faces.context.ExceptionHandlerFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { @@ -223,7 +234,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.context.ExternalContextFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.context.ExternalContextFactory": //$NON-NLS-1$ + "javax.faces.context.ExternalContextFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { @@ -252,7 +265,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.view.ViewDeclarationLanguageFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.view.ViewDeclarationLanguageFactory" : //$NON-NLS-1$ + "javax.faces.view.ViewDeclarationLanguageFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { @@ -280,7 +295,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.context.PartialViewContextFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.context.PartialViewContextFactory": //$NON-NLS-1$ + "javax.faces.context.PartialViewContextFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { @@ -308,7 +325,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.view.facelets.TagHandlerDelegateFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.view.facelets.TagHandlerDelegateFactory" : //$NON-NLS-1$ + "javax.faces.view.facelets.TagHandlerDelegateFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { @@ -336,7 +355,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.component.visit.VisitContextFactory"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.component.visit.VisitContextFactory" : //$NON-NLS-1$ + "javax.faces.component.visit.VisitContextFactory"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/RenderKitValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/RenderKitValidationVisitor.java index 2b35278c8..a75364fdf 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/RenderKitValidationVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/RenderKitValidationVisitor.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; import org.eclipse.jst.jsf.facesconfig.emf.RenderKitClassType; @@ -66,7 +67,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.render.RenderKit"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.render.RenderKit" : //$NON-NLS-1$ + "javax.faces.render.RenderKit"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/RendererValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/RendererValidationVisitor.java index e196d2f4c..3f55146d9 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/RendererValidationVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/RendererValidationVisitor.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; import org.eclipse.jst.jsf.facesconfig.emf.RendererClassType; @@ -65,7 +66,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.render.Renderer"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.render.Renderer" : //$NON-NLS-1$ + "javax.faces.render.Renderer"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ValidatorTypeValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ValidatorTypeValidationVisitor.java index b608807d3..89c64f139 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ValidatorTypeValidationVisitor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ValidatorTypeValidationVisitor.java @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; import org.eclipse.jst.jsf.facesconfig.emf.ValidatorClassType; @@ -65,7 +66,9 @@ protected String getFullyQualifiedName(EObject eobj) } protected String getInstanceOf() { - return "javax.faces.validator.Validator"; //$NON-NLS-1$ + return getJSFVersion().compareTo(JSFVersion.V3_0) >= 0 ? + "jakarta.faces.validator.Validator" : //$NON-NLS-1$ + "javax.faces.validator.Validator"; //$NON-NLS-1$ } protected EObjectValidationVisitor[] getChildNodeValidators() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ASTSemanticValidator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ASTSemanticValidator.java index b7789a81d..ab668fa51 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ASTSemanticValidator.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ASTSemanticValidator.java @@ -18,6 +18,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.jdt.core.Signature; import org.eclipse.jst.jsf.common.internal.types.BooleanLiteralType; import org.eclipse.jst.jsf.common.internal.types.FloatLiteralType; import org.eclipse.jst.jsf.common.internal.types.IntegerLiteralType; @@ -26,6 +27,8 @@ import org.eclipse.jst.jsf.common.internal.types.NullLiteralType; import org.eclipse.jst.jsf.common.internal.types.SignatureBasedType; import org.eclipse.jst.jsf.common.internal.types.StringLiteralType; +import org.eclipse.jst.jsf.common.internal.types.TypeCoercer; +import org.eclipse.jst.jsf.common.internal.types.TypeTransformer; import org.eclipse.jst.jsf.common.internal.types.ValueType; import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory; import org.eclipse.jst.jsf.context.resolver.structureddocument.IWorkspaceContextResolver; @@ -299,6 +302,19 @@ public Object visit(final ASTUnaryExpression node, final Object data) ((EvaluationTracker)data). setType(unaryOp.performOperation ((ValueType)type)); } + else if (type instanceof MethodType) { + final UnaryOperator unaryOp = UnaryOperator.createUnaryOperator(firstToken, _diagnosticFactory); + final Diagnostic diagnostic = unaryOp.validate((MethodType)type); + + if (diagnostic.getSeverity() != Diagnostic.OK) + { + final int offset = _context.getDocumentPosition() + firstToken.beginColumn - 1; + final int length = node.getLastToken().endColumn - firstToken.beginColumn+1; + _reporter.report(diagnostic, offset, length); + } + +// ((EvaluationTracker)data).setType(unaryOp.performOperation ((MethodType)type)); + } // cannot apply operations to method bindings else { @@ -554,10 +570,14 @@ private ValueType getValueTypeForBinaryOperation(final SignatureBasedType type, } else if (type instanceof MethodType) { - final int offset = _context.getDocumentPosition() + node.getFirstToken().beginColumn - 1; - final int length = node.getLastToken().endColumn - node.getFirstToken().beginColumn+1; - final Diagnostic diagnostic = _diagnosticFactory.create_CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING(); - _reporter.report(diagnostic, offset, length); + boolean canCoerce = TypeCoercer.canCoerceToBoolean( + TypeTransformer.transformBoxPrimitives(Signature.getReturnType(type.getSignature()))); + if (!canCoerce) { + final int offset = _context.getDocumentPosition() + node.getFirstToken().beginColumn - 1; + final int length = node.getLastToken().endColumn - node.getFirstToken().beginColumn+1; + final Diagnostic diagnostic = _diagnosticFactory.create_CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING(); + _reporter.report(diagnostic, offset, length); + } } return null; diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELValidationUtil.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELValidationUtil.java index 52ec2fb7d..7cd9269fb 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELValidationUtil.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELValidationUtil.java @@ -46,7 +46,8 @@ public static boolean isProjectEL22(final IResource resource) { if (javaProject != null) { try { final IType type = javaProject.findType("javax.el.ValueReference"); //$NON-NLS-1$ - isEL22 = (type != null); + final IType typeJakartaEE = javaProject.findType("jakarta.el.ValueReference"); //$NON-NLS-1$ + isEL22 = (type != null || typeJakartaEE != null); } catch (JavaModelException ignored) { //ignore; isEL22 will remain false } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/EmptyUnaryOperator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/EmptyUnaryOperator.java index 47190b749..670f76fd2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/EmptyUnaryOperator.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/EmptyUnaryOperator.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.jdt.core.Signature; import org.eclipse.jst.jsf.common.internal.types.BooleanLiteralType; +import org.eclipse.jst.jsf.common.internal.types.MethodType; import org.eclipse.jst.jsf.common.internal.types.NullLiteralType; import org.eclipse.jst.jsf.common.internal.types.StringLiteralType; import org.eclipse.jst.jsf.common.internal.types.TypeConstants; @@ -121,4 +122,9 @@ public Diagnostic validate(ValueType type) return Diagnostic.OK_INSTANCE; } + + @Override + public Diagnostic validate(MethodType type) { + return _diagnosticFactory.create_CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING(); + } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/MinusUnaryOperator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/MinusUnaryOperator.java index 6aec93a85..4d9614f76 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/MinusUnaryOperator.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/MinusUnaryOperator.java @@ -20,6 +20,7 @@ import org.eclipse.jst.jsf.common.internal.types.IAssignable; import org.eclipse.jst.jsf.common.internal.types.IntegerLiteralType; import org.eclipse.jst.jsf.common.internal.types.LiteralType; +import org.eclipse.jst.jsf.common.internal.types.MethodType; import org.eclipse.jst.jsf.common.internal.types.StringLiteralType; import org.eclipse.jst.jsf.common.internal.types.TypeCoercer; import org.eclipse.jst.jsf.common.internal.types.TypeCoercionException; @@ -214,4 +215,8 @@ else if (type instanceof FloatLiteralType) return null; } + @Override + public Diagnostic validate(MethodType type) { + return _diagnosticFactory.create_CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING(); + } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/NotUnaryOperator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/NotUnaryOperator.java index 186f2f281..c7143b8f9 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/NotUnaryOperator.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/NotUnaryOperator.java @@ -15,8 +15,10 @@ package org.eclipse.jst.jsf.validation.internal.el.operators; import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.jdt.core.Signature; import org.eclipse.jst.jsf.common.internal.types.BooleanLiteralType; import org.eclipse.jst.jsf.common.internal.types.LiteralType; +import org.eclipse.jst.jsf.common.internal.types.MethodType; import org.eclipse.jst.jsf.common.internal.types.TypeCoercer; import org.eclipse.jst.jsf.common.internal.types.TypeCoercionException; import org.eclipse.jst.jsf.common.internal.types.TypeConstants; @@ -104,4 +106,13 @@ public ValueType performOperation(ValueType type) return null; } + @Override + public Diagnostic validate(MethodType type) { + boolean canCoerce = TypeCoercer.canCoerceToBoolean( + TypeTransformer.transformBoxPrimitives(Signature.getReturnType(type.getSignature()))); + if (canCoerce) { + return Diagnostic.OK_INSTANCE; + } + return _diagnosticFactory.create_CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING(); + } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/UnaryOperator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/UnaryOperator.java index 052d3606f..7f8a3474a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/UnaryOperator.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/operators/UnaryOperator.java @@ -15,6 +15,7 @@ package org.eclipse.jst.jsf.validation.internal.el.operators; import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.jst.jsf.common.internal.types.MethodType; import org.eclipse.jst.jsf.common.internal.types.ValueType; import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory; import org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParserConstants; @@ -98,11 +99,17 @@ public static UnaryOperator createUnaryOperator(Token token, DiagnosticFactory d */ public abstract ValueType performOperation(ValueType type); - /** * @param type * @return a Diagnostic interpreting whether it is valid to perform the * operation on this type */ public abstract Diagnostic validate(ValueType type); + + /** + * @param type + * @return a Diagnostic interpreting whether it is valid to perform the + * operation on this type + */ + public abstract Diagnostic validate(MethodType type); } 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 8ba170151..d3025818d 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 @@ -4,6 +4,7 @@ Automatic-Module-Name: org.eclipse.jst.jsf.facelet.core Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.jsf.facelet.core;singleton:=true Bundle-Version: 1.5.0.qualifier +Bundle-ClassPath: . Bundle-Activator: org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin$Implementation Bundle-Localization: plugin Require-Bundle: org.eclipse.core.runtime, @@ -21,22 +22,23 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.jst.jsf.facesconfig;bundle-version="1.0.1", org.eclipse.emf.common;bundle-version="2.4.0", org.eclipse.jst.j2ee;bundle-version="1.1.105", - org.eclipse.emf.ecore;bundle-version="2.4.0", + org.eclipse.emf.ecore;bundle-version="2.4.0";visibility:=reexport, org.eclipse.ui;bundle-version="3.4.0", org.eclipse.emf.edit.ui;bundle-version="2.4.0", org.eclipse.jst.j2ee.web;bundle-version="1.1.200", org.eclipse.wst.validation;bundle-version="1.2.0", org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)", - org.eclipse.emf.ecore.xmi;bundle-version="2.5.0", + org.eclipse.emf.ecore.xmi;bundle-version="2.5.0";visibility:=reexport, org.eclipse.wst.xml.core;bundle-version="1.1.500", org.eclipse.jem.proxy;bundle-version="[2.0.300,3.0.0)", org.eclipse.jdt.core;bundle-version="[3.6.0,4.0.0)", org.eclipse.jst.j2ee.core;bundle-version="[1.2.0,2.0.0)" Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: J2SE-1.5 Export-Package: org.eclipse.jst.jsf.facelet.core.internal;x-internal:=true, org.eclipse.jst.jsf.facelet.core.internal.cm;x-internal:=true, - org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd;x-friends:="org.eclipse.jst.jsf.facelet.tagsupport", + org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd; + x-friends:="org.eclipse.jst.jsf.facelet.tagsupport", org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl;x-internal:=true, org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.provider;x-internal:=true, org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.util;x-internal:=true, @@ -45,10 +47,14 @@ Export-Package: org.eclipse.jst.jsf.facelet.core.internal;x-internal:=true, org.eclipse.jst.jsf.facelet.core.internal.facet;x-internal:=true, org.eclipse.jst.jsf.facelet.core.internal.metadata;x-internal:=true, org.eclipse.jst.jsf.facelet.core.internal.registry;x-internal:=true, - org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;x-friends:="org.eclipse.jst.jsf.facelet.core.tests", - org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib;x-friends:="org.eclipse.jst.jsf.facelet.core.tests", - org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.impl;x-friends:="org.eclipse.jst.jsf.facelet.core.tests", - org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.util;x-friends:="org.eclipse.jst.jsf.facelet.core.tests", + org.eclipse.jst.jsf.facelet.core.internal.registry.taglib; + x-friends:="org.eclipse.jst.jsf.facelet.core.tests", + org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib; + x-friends:="org.eclipse.jst.jsf.facelet.core.tests", + org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.impl; + x-friends:="org.eclipse.jst.jsf.facelet.core.tests", + org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.util; + x-friends:="org.eclipse.jst.jsf.facelet.core.tests", org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0;x-internal:=true, org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.impl;x-internal:=true, org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.util;x-internal:=true, diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/model/facelet-taglib-2_0.genmodel b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/model/facelet-taglib-2_0.genmodel index 26e1951ac..0eacd711e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/model/facelet-taglib-2_0.genmodel +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/model/facelet-taglib-2_0.genmodel @@ -1,16 +1,20 @@ - + facelet-taglib.xsd + + + + + + @@ -22,7 +26,11 @@ - + + + + + @@ -119,6 +127,7 @@ + diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/model/faceletTaglib_2_0.ecore b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/model/faceletTaglib_2_0.ecore index b02a4e240..51cf012e2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/model/faceletTaglib_2_0.ecore +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/model/faceletTaglib_2_0.ecore @@ -684,6 +684,10 @@ + + + + diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/plugin.properties b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/plugin.properties index 362ce07b8..0b8a16732 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/plugin.properties +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/plugin.properties @@ -44,4 +44,4 @@ _UI_AttributeData_description_feature = Description extension-point.name = testProjectTaglibDescriptorFactory -componentCoreQueryFactory-ext-pt = componentCoreQueryFactory \ No newline at end of file +componentCoreQueryFactory-ext-pt = componentCoreQueryFactory diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/plugin.xml b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/plugin.xml index d7aae6819..c30ebd799 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/plugin.xml +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/plugin.xml @@ -82,4 +82,18 @@ + + + + + + + + + diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacet.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacet.java index a66ba5158..f64585217 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacet.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacet.java @@ -42,6 +42,7 @@ public final class FaceletFacet static final String COM_SUN_FACES_CONFIG_CONFIGURE_LISTENER = "com.sun.faces.config.ConfigureListener"; //$NON-NLS-1$ static final String XHTML = ".xhtml"; //$NON-NLS-1$ static final String JAVAX_FACES_DEFAULT_SUFFIX = "javax.faces.DEFAULT_SUFFIX"; //$NON-NLS-1$ + static final String JAKARTA_FACES_DEFAULT_SUFFIX = "jakarta.faces.DEFAULT_SUFFIX"; //$NON-NLS-1$ private FaceletFacet() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletInstallDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletInstallDelegate.java index 25289c1be..af31f698c 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletInstallDelegate.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletInstallDelegate.java @@ -16,6 +16,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.common.util.EList; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager; import org.eclipse.jst.jsf.facelet.core.internal.FaceletCoreTraceOptions; import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType; @@ -207,8 +208,10 @@ protected void maybeChangeDefaultSuffix(final FacetChangeModel model, FaceletCoreTraceOptions .log("FaceletInstallDelegate: Installing DEFAULT_SUFFIX"); //$NON-NLS-1$ } - configurator.addContextParam(FaceletFacet.JAVAX_FACES_DEFAULT_SUFFIX, FaceletFacet.XHTML, - false); + configurator.addContextParam( + JSFVersion.guessAtLeast(JSFVersion.V3_0, configurator.getProject()) ? + FaceletFacet.JAKARTA_FACES_DEFAULT_SUFFIX : FaceletFacet.JAVAX_FACES_DEFAULT_SUFFIX, + FaceletFacet.XHTML, false); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java index 90a750817..836f046aa 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java @@ -18,6 +18,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.common.util.EList; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager; import org.eclipse.jst.jsf.facelet.core.internal.FaceletCoreTraceOptions; import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType; @@ -200,7 +201,8 @@ protected void maybeChangeDefaultSuffix(final FacetChangeModel model, } configurator .removeContextParam( - FaceletFacet.JAVAX_FACES_DEFAULT_SUFFIX, + JSFVersion.guessAtLeast(JSFVersion.V3_0, configurator.getProject()) ? + FaceletFacet.JAKARTA_FACES_DEFAULT_SUFFIX : FaceletFacet.JAVAX_FACES_DEFAULT_SUFFIX, FaceletFacet.XHTML); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/WebappConfiguration.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/WebappConfiguration.java index ebd96ffa2..0439b1f37 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/WebappConfiguration.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/WebappConfiguration.java @@ -53,6 +53,10 @@ public class WebappConfiguration * The param key for Facelet 2.0 libraries declared in web.xml */ public static final String JSF20_FACELET_LIBRARIES_CONTEXT_PARAM_NAME = "javax.faces.FACELETS_LIBRARIES"; //$NON-NLS-1$ + /** + * The param key for Facelet 3.0 libraries declared in web.xml + */ + public static final String JSF30_FACELET_LIBRARIES_CONTEXT_PARAM_NAME = "jakarta.faces.FACELETS_LIBRARIES"; //$NON-NLS-1$ private final IProject _project; /** * Cached instance of ContextParamAdapter. @@ -186,10 +190,9 @@ public static List getConfigFilesFromContextParam( { List paramValues = modelProvider.getWebAppParamValues(); for (final ParamValue paramValue : paramValues){ - if (paramValue.getParamName().equals( - FACELET_10_LIBRARIES_CONTEXT_PARAM_NAME) - || paramValue.getParamName().equals( - JSF20_FACELET_LIBRARIES_CONTEXT_PARAM_NAME)) + if (paramValue.getParamName().equals(FACELET_10_LIBRARIES_CONTEXT_PARAM_NAME) + || paramValue.getParamName().equals(JSF20_FACELET_LIBRARIES_CONTEXT_PARAM_NAME) + || paramValue.getParamName().equals(JSF30_FACELET_LIBRARIES_CONTEXT_PARAM_NAME)) { String filesString = paramValue.getParamValue(); filesList.addAll(parseFilesString(filesString)); diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibFactory.java index 939007568..b8a3459cb 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibFactory.java @@ -31,236 +31,236 @@ public interface FaceletTaglibFactory extends EFactory { /** - * The singleton instance of the factory. - * + * The singleton instance of the factory. + * * - * @generated - */ + * @generated + */ FaceletTaglibFactory eINSTANCE = org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.impl.FaceletTaglibFactoryImpl.init(); /** - * Returns a new object of class 'Description'. - * + * Returns a new object of class 'Description'. + * * - * @return a new object of class 'Description'. - * @generated - */ + * @return a new object of class 'Description'. + * @generated + */ Description createDescription(); /** - * Returns a new object of class 'Display Name'. - * + * Returns a new object of class 'Display Name'. + * * - * @return a new object of class 'Display Name'. - * @generated - */ + * @return a new object of class 'Display Name'. + * @generated + */ DisplayName createDisplayName(); /** - * Returns a new object of class 'Document Root'. - * + * Returns a new object of class 'Document Root'. + * * - * @return a new object of class 'Document Root'. - * @generated - */ + * @return a new object of class 'Document Root'. + * @generated + */ DocumentRoot createDocumentRoot(); /** - * Returns a new object of class 'Canonical Name'. - * + * Returns a new object of class 'Canonical Name'. + * * - * @return a new object of class 'Canonical Name'. - * @generated - */ + * @return a new object of class 'Canonical Name'. + * @generated + */ FaceletTaglibCanonicalName createFaceletTaglibCanonicalName(); /** - * Returns a new object of class 'Extension'. - * + * Returns a new object of class 'Extension'. + * * - * @return a new object of class 'Extension'. - * @generated - */ + * @return a new object of class 'Extension'. + * @generated + */ FaceletTaglibExtension createFaceletTaglibExtension(); /** - * Returns a new object of class 'Function'. - * + * Returns a new object of class 'Function'. + * * - * @return a new object of class 'Function'. - * @generated - */ + * @return a new object of class 'Function'. + * @generated + */ FaceletTaglibFunction createFaceletTaglibFunction(); /** - * Returns a new object of class 'Tag Attribute'. - * + * Returns a new object of class 'Tag Attribute'. + * * - * @return a new object of class 'Tag Attribute'. - * @generated - */ + * @return a new object of class 'Tag Attribute'. + * @generated + */ FaceletTaglibTagAttribute createFaceletTaglibTagAttribute(); /** - * Returns a new object of class 'Tag Behavior Extension'. - * + * Returns a new object of class 'Tag Behavior Extension'. + * * - * @return a new object of class 'Tag Behavior Extension'. - * @generated - */ + * @return a new object of class 'Tag Behavior Extension'. + * @generated + */ FaceletTaglibTagBehaviorExtension createFaceletTaglibTagBehaviorExtension(); /** - * Returns a new object of class 'Tag Behavior'. - * + * Returns a new object of class 'Tag Behavior'. + * * - * @return a new object of class 'Tag Behavior'. - * @generated - */ + * @return a new object of class 'Tag Behavior'. + * @generated + */ FaceletTaglibTagBehavior createFaceletTaglibTagBehavior(); /** - * Returns a new object of class 'Tag Component Extension'. - * + * Returns a new object of class 'Tag Component Extension'. + * * - * @return a new object of class 'Tag Component Extension'. - * @generated - */ + * @return a new object of class 'Tag Component Extension'. + * @generated + */ FaceletTaglibTagComponentExtension createFaceletTaglibTagComponentExtension(); /** - * Returns a new object of class 'Tag Component'. - * + * Returns a new object of class 'Tag Component'. + * * - * @return a new object of class 'Tag Component'. - * @generated - */ + * @return a new object of class 'Tag Component'. + * @generated + */ FaceletTaglibTagComponent createFaceletTaglibTagComponent(); /** - * Returns a new object of class 'Tag Converter Extension'. - * + * Returns a new object of class 'Tag Converter Extension'. + * * - * @return a new object of class 'Tag Converter Extension'. - * @generated - */ + * @return a new object of class 'Tag Converter Extension'. + * @generated + */ FaceletTaglibTagConverterExtension createFaceletTaglibTagConverterExtension(); /** - * Returns a new object of class 'Tag Converter'. - * + * Returns a new object of class 'Tag Converter'. + * * - * @return a new object of class 'Tag Converter'. - * @generated - */ + * @return a new object of class 'Tag Converter'. + * @generated + */ FaceletTaglibTagConverter createFaceletTaglibTagConverter(); /** - * Returns a new object of class 'Tag Extension'. - * + * Returns a new object of class 'Tag Extension'. + * * - * @return a new object of class 'Tag Extension'. - * @generated - */ + * @return a new object of class 'Tag Extension'. + * @generated + */ FaceletTaglibTagExtension createFaceletTaglibTagExtension(); /** - * Returns a new object of class 'Tag'. - * + * Returns a new object of class 'Tag'. + * * - * @return a new object of class 'Tag'. - * @generated - */ + * @return a new object of class 'Tag'. + * @generated + */ FaceletTaglibTag createFaceletTaglibTag(); /** - * Returns a new object of class 'Tag Validator Extension'. - * + * Returns a new object of class 'Tag Validator Extension'. + * * - * @return a new object of class 'Tag Validator Extension'. - * @generated - */ + * @return a new object of class 'Tag Validator Extension'. + * @generated + */ FaceletTaglibTagValidatorExtension createFaceletTaglibTagValidatorExtension(); /** - * Returns a new object of class 'Tag Validator'. - * + * Returns a new object of class 'Tag Validator'. + * * - * @return a new object of class 'Tag Validator'. - * @generated - */ + * @return a new object of class 'Tag Validator'. + * @generated + */ FaceletTaglibTagValidator createFaceletTaglibTagValidator(); /** - * Returns a new object of class 'Facelet Taglib'. - * + * Returns a new object of class 'Facelet Taglib'. + * * - * @return a new object of class 'Facelet Taglib'. - * @generated - */ + * @return a new object of class 'Facelet Taglib'. + * @generated + */ FaceletTaglib createFaceletTaglib(); /** - * Returns a new object of class 'Fully Qualified Class'. - * + * Returns a new object of class 'Fully Qualified Class'. + * * - * @return a new object of class 'Fully Qualified Class'. - * @generated - */ + * @return a new object of class 'Fully Qualified Class'. + * @generated + */ FullyQualifiedClass createFullyQualifiedClass(); /** - * Returns a new object of class 'Generic Boolean'. - * + * Returns a new object of class 'Generic Boolean'. + * * - * @return a new object of class 'Generic Boolean'. - * @generated - */ + * @return a new object of class 'Generic Boolean'. + * @generated + */ GenericBoolean createGenericBoolean(); /** - * Returns a new object of class 'Icon'. - * + * Returns a new object of class 'Icon'. + * * - * @return a new object of class 'Icon'. - * @generated - */ + * @return a new object of class 'Icon'. + * @generated + */ Icon createIcon(); /** - * Returns a new object of class 'Java Identifier'. - * + * Returns a new object of class 'Java Identifier'. + * * - * @return a new object of class 'Java Identifier'. - * @generated - */ + * @return a new object of class 'Java Identifier'. + * @generated + */ JavaIdentifier createJavaIdentifier(); /** - * Returns a new object of class 'Path'. - * + * Returns a new object of class 'Path'. + * * - * @return a new object of class 'Path'. - * @generated - */ + * @return a new object of class 'Path'. + * @generated + */ Path createPath(); /** - * Returns a new object of class 'Identifiable String Value'. - * + * Returns a new object of class 'Identifiable String Value'. + * * - * @return a new object of class 'Identifiable String Value'. - * @generated - */ + * @return a new object of class 'Identifiable String Value'. + * @generated + */ IdentifiableStringValue createIdentifiableStringValue(); /** - * Returns the package supported by this factory. - * + * Returns the package supported by this factory. + * * - * @return the package supported by this factory. - * @generated - */ + * @return the package supported by this factory. + * @generated + */ FaceletTaglibPackage getFaceletTaglibPackage(); } //FaceletTaglibFactory diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibPackage.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibPackage.java index 66ae49ad9..97dd9f691 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibPackage.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibPackage.java @@ -29,7 +29,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2003-2013 Sun Microsystems, Inc. All rights reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the * GNU General Public License Version 2 only ("GPL") or the Common diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibVersion.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibVersion.java index 97ba84ae3..45c82ecbe 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibVersion.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibVersion.java @@ -76,7 +76,34 @@ public enum FaceletTaglibVersion implements Enumerator * @generated * @ordered */ - _23(3, "_23", "2.3"); //$NON-NLS-1$//$NON-NLS-2$ + _23(3, "_23", "2.3"), //$NON-NLS-1$ //$NON-NLS-2$ + /** + * The '30' literal object. + * + * + * @see #_30_VALUE + * @generated + * @ordered + */ + _30(4, "_30", "3.0"), //$NON-NLS-1$ //$NON-NLS-2$ + /** + * The '40' literal object. + * + * + * @see #_40_VALUE + * @generated + * @ordered + */ + _40(5, "_40", "4.0"), //$NON-NLS-1$ //$NON-NLS-2$ + /** + * The '41' literal object. + * + * + * @see #_41_VALUE + * @generated + * @ordered + */ + _41(6, "_41", "4.1"); //$NON-NLS-1$//$NON-NLS-2$ /** * The '20' literal value. @@ -138,6 +165,39 @@ public enum FaceletTaglibVersion implements Enumerator */ public static final int _23_VALUE = 3; + /** + * The '30' literal value. + * + * + * @see #_30 + * @model literal="3.0" + * @generated + * @ordered + */ + public static final int _30_VALUE = 4; + + /** + * The '40' literal value. + * + * + * @see #_40 + * @model literal="4.0" + * @generated + * @ordered + */ + public static final int _40_VALUE = 5; + + /** + * The '41' literal value. + * + * + * @see #_41 + * @model literal="4.1" + * @generated + * @ordered + */ + public static final int _41_VALUE = 6; + /** * An array of all the 'Version' enumerators. * @@ -150,6 +210,9 @@ public enum FaceletTaglibVersion implements Enumerator _21, _22, _23, + _30, + _40, + _41, }; /** @@ -166,6 +229,8 @@ public enum FaceletTaglibVersion implements Enumerator * @param literal * @return the version * + * @param literal the literal. + * @return the matching enumerator or null. * @generated */ public static FaceletTaglibVersion get(String literal) @@ -185,6 +250,8 @@ public static FaceletTaglibVersion get(String literal) * @param name * @return the version * + * @param name the name. + * @return the matching enumerator or null. * @generated */ public static FaceletTaglibVersion getByName(String name) @@ -204,6 +271,8 @@ public static FaceletTaglibVersion getByName(String name) * @param value * @return the version * + * @param value the integer value. + * @return the matching enumerator or null. * @generated */ public static FaceletTaglibVersion get(int value) @@ -213,6 +282,9 @@ public static FaceletTaglibVersion get(int value) case _21_VALUE: return _21; case _22_VALUE: return _22; case _23_VALUE: return _23; + case _30_VALUE: return _30; + case _40_VALUE: return _40; + case _41_VALUE: return _41; } return null; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibFactoryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibFactoryImpl.java index 4943937ba..f599d9f5a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibFactoryImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibFactoryImpl.java @@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; import org.eclipse.emf.ecore.xml.type.XMLTypePackage; +import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.*; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Description; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DisplayName; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot; @@ -64,578 +65,572 @@ public class FaceletTaglibFactoryImpl extends EFactoryImpl implements FaceletTaglibFactory { /** - * Creates the default factory implementation. - * + * Creates the default factory implementation. + * * @return * - * @generated - */ + * @generated + */ public static FaceletTaglibFactory init() { - try - { - FaceletTaglibFactory theFaceletTaglibFactory = (FaceletTaglibFactory)EPackage.Registry.INSTANCE.getEFactory("http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0"); //$NON-NLS-1$ - if (theFaceletTaglibFactory != null) - { - return theFaceletTaglibFactory; - } - } - catch (Exception exception) - { - EcorePlugin.INSTANCE.log(exception); - } - return new FaceletTaglibFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ + try { + FaceletTaglibFactory theFaceletTaglibFactory = (FaceletTaglibFactory)EPackage.Registry.INSTANCE.getEFactory(FaceletTaglibPackage.eNS_URI); + if (theFaceletTaglibFactory != null) { + return theFaceletTaglibFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new FaceletTaglibFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ public FaceletTaglibFactoryImpl() { - super(); - } + super(); + } /** - * + * * - * @generated - */ + * @generated + */ @Override public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) - { - case FaceletTaglibPackage.DESCRIPTION: return createDescription(); - case FaceletTaglibPackage.DISPLAY_NAME: return createDisplayName(); - case FaceletTaglibPackage.DOCUMENT_ROOT: return createDocumentRoot(); - case FaceletTaglibPackage.FACELET_TAGLIB_CANONICAL_NAME: return createFaceletTaglibCanonicalName(); - case FaceletTaglibPackage.FACELET_TAGLIB_EXTENSION: return createFaceletTaglibExtension(); - case FaceletTaglibPackage.FACELET_TAGLIB_FUNCTION: return createFaceletTaglibFunction(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_ATTRIBUTE: return createFaceletTaglibTagAttribute(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_BEHAVIOR_EXTENSION: return createFaceletTaglibTagBehaviorExtension(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_BEHAVIOR: return createFaceletTaglibTagBehavior(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_COMPONENT_EXTENSION: return createFaceletTaglibTagComponentExtension(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_COMPONENT: return createFaceletTaglibTagComponent(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_CONVERTER_EXTENSION: return createFaceletTaglibTagConverterExtension(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_CONVERTER: return createFaceletTaglibTagConverter(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_EXTENSION: return createFaceletTaglibTagExtension(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG: return createFaceletTaglibTag(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_VALIDATOR_EXTENSION: return createFaceletTaglibTagValidatorExtension(); - case FaceletTaglibPackage.FACELET_TAGLIB_TAG_VALIDATOR: return createFaceletTaglibTagValidator(); - case FaceletTaglibPackage.FACELET_TAGLIB: return createFaceletTaglib(); - case FaceletTaglibPackage.FULLY_QUALIFIED_CLASS: return createFullyQualifiedClass(); - case FaceletTaglibPackage.GENERIC_BOOLEAN: return createGenericBoolean(); - case FaceletTaglibPackage.ICON: return createIcon(); - case FaceletTaglibPackage.JAVA_IDENTIFIER: return createJavaIdentifier(); - case FaceletTaglibPackage.PATH: return createPath(); - case FaceletTaglibPackage.IDENTIFIABLE_STRING_VALUE: return createIdentifiableStringValue(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ + switch (eClass.getClassifierID()) { + case FaceletTaglibPackage.DESCRIPTION: return createDescription(); + case FaceletTaglibPackage.DISPLAY_NAME: return createDisplayName(); + case FaceletTaglibPackage.DOCUMENT_ROOT: return createDocumentRoot(); + case FaceletTaglibPackage.FACELET_TAGLIB_CANONICAL_NAME: return createFaceletTaglibCanonicalName(); + case FaceletTaglibPackage.FACELET_TAGLIB_EXTENSION: return createFaceletTaglibExtension(); + case FaceletTaglibPackage.FACELET_TAGLIB_FUNCTION: return createFaceletTaglibFunction(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_ATTRIBUTE: return createFaceletTaglibTagAttribute(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_BEHAVIOR_EXTENSION: return createFaceletTaglibTagBehaviorExtension(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_BEHAVIOR: return createFaceletTaglibTagBehavior(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_COMPONENT_EXTENSION: return createFaceletTaglibTagComponentExtension(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_COMPONENT: return createFaceletTaglibTagComponent(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_CONVERTER_EXTENSION: return createFaceletTaglibTagConverterExtension(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_CONVERTER: return createFaceletTaglibTagConverter(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_EXTENSION: return createFaceletTaglibTagExtension(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG: return createFaceletTaglibTag(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_VALIDATOR_EXTENSION: return createFaceletTaglibTagValidatorExtension(); + case FaceletTaglibPackage.FACELET_TAGLIB_TAG_VALIDATOR: return createFaceletTaglibTagValidator(); + case FaceletTaglibPackage.FACELET_TAGLIB: return createFaceletTaglib(); + case FaceletTaglibPackage.FULLY_QUALIFIED_CLASS: return createFullyQualifiedClass(); + case FaceletTaglibPackage.GENERIC_BOOLEAN: return createGenericBoolean(); + case FaceletTaglibPackage.ICON: return createIcon(); + case FaceletTaglibPackage.JAVA_IDENTIFIER: return createJavaIdentifier(); + case FaceletTaglibPackage.PATH: return createPath(); + case FaceletTaglibPackage.IDENTIFIABLE_STRING_VALUE: return createIdentifiableStringValue(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ @Override public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) - { - case FaceletTaglibPackage.FACELET_TAGLIB_VERSION: - return createFaceletTaglibVersionFromString(eDataType, initialValue); - case FaceletTaglibPackage.GENERIC_BOOLEAN_BASE: - return createGenericBooleanBaseFromString(eDataType, initialValue); - case FaceletTaglibPackage.FACELET_TAGLIB_VERSION_TYPE_OBJECT: - return createFaceletTaglibVersionTypeObjectFromString(eDataType, initialValue); - case FaceletTaglibPackage.FULLY_QUALIFIED_CLASS_BASE: - return createFullyQualifiedClassBaseFromString(eDataType, initialValue); - case FaceletTaglibPackage.JAVA_IDENTIFIER_BASE: - return createJavaIdentifierBaseFromString(eDataType, initialValue); - case FaceletTaglibPackage.PATH_TYPE_BASE: - return createPathTypeBaseFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ + switch (eDataType.getClassifierID()) { + case FaceletTaglibPackage.FACELET_TAGLIB_VERSION: + return createFaceletTaglibVersionFromString(eDataType, initialValue); + case FaceletTaglibPackage.GENERIC_BOOLEAN_BASE: + return createGenericBooleanBaseFromString(eDataType, initialValue); + case FaceletTaglibPackage.FACELET_TAGLIB_VERSION_TYPE_OBJECT: + return createFaceletTaglibVersionTypeObjectFromString(eDataType, initialValue); + case FaceletTaglibPackage.FULLY_QUALIFIED_CLASS_BASE: + return createFullyQualifiedClassBaseFromString(eDataType, initialValue); + case FaceletTaglibPackage.JAVA_IDENTIFIER_BASE: + return createJavaIdentifierBaseFromString(eDataType, initialValue); + case FaceletTaglibPackage.PATH_TYPE_BASE: + return createPathTypeBaseFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ @Override public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) - { - case FaceletTaglibPackage.FACELET_TAGLIB_VERSION: - return convertFaceletTaglibVersionToString(eDataType, instanceValue); - case FaceletTaglibPackage.GENERIC_BOOLEAN_BASE: - return convertGenericBooleanBaseToString(eDataType, instanceValue); - case FaceletTaglibPackage.FACELET_TAGLIB_VERSION_TYPE_OBJECT: - return convertFaceletTaglibVersionTypeObjectToString(eDataType, instanceValue); - case FaceletTaglibPackage.FULLY_QUALIFIED_CLASS_BASE: - return convertFullyQualifiedClassBaseToString(eDataType, instanceValue); - case FaceletTaglibPackage.JAVA_IDENTIFIER_BASE: - return convertJavaIdentifierBaseToString(eDataType, instanceValue); - case FaceletTaglibPackage.PATH_TYPE_BASE: - return convertPathTypeBaseToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * - * - * @generated - */ + switch (eDataType.getClassifierID()) { + case FaceletTaglibPackage.FACELET_TAGLIB_VERSION: + return convertFaceletTaglibVersionToString(eDataType, instanceValue); + case FaceletTaglibPackage.GENERIC_BOOLEAN_BASE: + return convertGenericBooleanBaseToString(eDataType, instanceValue); + case FaceletTaglibPackage.FACELET_TAGLIB_VERSION_TYPE_OBJECT: + return convertFaceletTaglibVersionTypeObjectToString(eDataType, instanceValue); + case FaceletTaglibPackage.FULLY_QUALIFIED_CLASS_BASE: + return convertFullyQualifiedClassBaseToString(eDataType, instanceValue); + case FaceletTaglibPackage.JAVA_IDENTIFIER_BASE: + return convertJavaIdentifierBaseToString(eDataType, instanceValue); + case FaceletTaglibPackage.PATH_TYPE_BASE: + return convertPathTypeBaseToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ public Description createDescription() { - DescriptionImpl description = new DescriptionImpl(); - return description; - } + DescriptionImpl description = new DescriptionImpl(); + return description; + } /** - * + * * - * @generated - */ + * @generated + */ public DisplayName createDisplayName() { - DisplayNameImpl displayName = new DisplayNameImpl(); - return displayName; - } + DisplayNameImpl displayName = new DisplayNameImpl(); + return displayName; + } /** - * + * * - * @generated - */ + * @generated + */ public DocumentRoot createDocumentRoot() { - DocumentRootImpl documentRoot = new DocumentRootImpl(); - return documentRoot; - } + DocumentRootImpl documentRoot = new DocumentRootImpl(); + return documentRoot; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibCanonicalName createFaceletTaglibCanonicalName() { - FaceletTaglibCanonicalNameImpl faceletTaglibCanonicalName = new FaceletTaglibCanonicalNameImpl(); - return faceletTaglibCanonicalName; - } + FaceletTaglibCanonicalNameImpl faceletTaglibCanonicalName = new FaceletTaglibCanonicalNameImpl(); + return faceletTaglibCanonicalName; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibExtension createFaceletTaglibExtension() { - FaceletTaglibExtensionImpl faceletTaglibExtension = new FaceletTaglibExtensionImpl(); - return faceletTaglibExtension; - } + FaceletTaglibExtensionImpl faceletTaglibExtension = new FaceletTaglibExtensionImpl(); + return faceletTaglibExtension; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibFunction createFaceletTaglibFunction() { - FaceletTaglibFunctionImpl faceletTaglibFunction = new FaceletTaglibFunctionImpl(); - return faceletTaglibFunction; - } + FaceletTaglibFunctionImpl faceletTaglibFunction = new FaceletTaglibFunctionImpl(); + return faceletTaglibFunction; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagAttribute createFaceletTaglibTagAttribute() { - FaceletTaglibTagAttributeImpl faceletTaglibTagAttribute = new FaceletTaglibTagAttributeImpl(); - return faceletTaglibTagAttribute; - } + FaceletTaglibTagAttributeImpl faceletTaglibTagAttribute = new FaceletTaglibTagAttributeImpl(); + return faceletTaglibTagAttribute; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagBehaviorExtension createFaceletTaglibTagBehaviorExtension() { - FaceletTaglibTagBehaviorExtensionImpl faceletTaglibTagBehaviorExtension = new FaceletTaglibTagBehaviorExtensionImpl(); - return faceletTaglibTagBehaviorExtension; - } + FaceletTaglibTagBehaviorExtensionImpl faceletTaglibTagBehaviorExtension = new FaceletTaglibTagBehaviorExtensionImpl(); + return faceletTaglibTagBehaviorExtension; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagBehavior createFaceletTaglibTagBehavior() { - FaceletTaglibTagBehaviorImpl faceletTaglibTagBehavior = new FaceletTaglibTagBehaviorImpl(); - return faceletTaglibTagBehavior; - } + FaceletTaglibTagBehaviorImpl faceletTaglibTagBehavior = new FaceletTaglibTagBehaviorImpl(); + return faceletTaglibTagBehavior; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagComponentExtension createFaceletTaglibTagComponentExtension() { - FaceletTaglibTagComponentExtensionImpl faceletTaglibTagComponentExtension = new FaceletTaglibTagComponentExtensionImpl(); - return faceletTaglibTagComponentExtension; - } + FaceletTaglibTagComponentExtensionImpl faceletTaglibTagComponentExtension = new FaceletTaglibTagComponentExtensionImpl(); + return faceletTaglibTagComponentExtension; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagComponent createFaceletTaglibTagComponent() { - FaceletTaglibTagComponentImpl faceletTaglibTagComponent = new FaceletTaglibTagComponentImpl(); - return faceletTaglibTagComponent; - } + FaceletTaglibTagComponentImpl faceletTaglibTagComponent = new FaceletTaglibTagComponentImpl(); + return faceletTaglibTagComponent; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagConverterExtension createFaceletTaglibTagConverterExtension() { - FaceletTaglibTagConverterExtensionImpl faceletTaglibTagConverterExtension = new FaceletTaglibTagConverterExtensionImpl(); - return faceletTaglibTagConverterExtension; - } + FaceletTaglibTagConverterExtensionImpl faceletTaglibTagConverterExtension = new FaceletTaglibTagConverterExtensionImpl(); + return faceletTaglibTagConverterExtension; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagConverter createFaceletTaglibTagConverter() { - FaceletTaglibTagConverterImpl faceletTaglibTagConverter = new FaceletTaglibTagConverterImpl(); - return faceletTaglibTagConverter; - } + FaceletTaglibTagConverterImpl faceletTaglibTagConverter = new FaceletTaglibTagConverterImpl(); + return faceletTaglibTagConverter; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagExtension createFaceletTaglibTagExtension() { - FaceletTaglibTagExtensionImpl faceletTaglibTagExtension = new FaceletTaglibTagExtensionImpl(); - return faceletTaglibTagExtension; - } + FaceletTaglibTagExtensionImpl faceletTaglibTagExtension = new FaceletTaglibTagExtensionImpl(); + return faceletTaglibTagExtension; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTag createFaceletTaglibTag() { - FaceletTaglibTagImpl faceletTaglibTag = new FaceletTaglibTagImpl(); - return faceletTaglibTag; - } + FaceletTaglibTagImpl faceletTaglibTag = new FaceletTaglibTagImpl(); + return faceletTaglibTag; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagValidatorExtension createFaceletTaglibTagValidatorExtension() { - FaceletTaglibTagValidatorExtensionImpl faceletTaglibTagValidatorExtension = new FaceletTaglibTagValidatorExtensionImpl(); - return faceletTaglibTagValidatorExtension; - } + FaceletTaglibTagValidatorExtensionImpl faceletTaglibTagValidatorExtension = new FaceletTaglibTagValidatorExtensionImpl(); + return faceletTaglibTagValidatorExtension; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibTagValidator createFaceletTaglibTagValidator() { - FaceletTaglibTagValidatorImpl faceletTaglibTagValidator = new FaceletTaglibTagValidatorImpl(); - return faceletTaglibTagValidator; - } + FaceletTaglibTagValidatorImpl faceletTaglibTagValidator = new FaceletTaglibTagValidatorImpl(); + return faceletTaglibTagValidator; + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglib createFaceletTaglib() { - FaceletTaglibImpl faceletTaglib = new FaceletTaglibImpl(); - return faceletTaglib; - } + FaceletTaglibImpl faceletTaglib = new FaceletTaglibImpl(); + return faceletTaglib; + } /** - * + * * - * @generated - */ + * @generated + */ public FullyQualifiedClass createFullyQualifiedClass() { - FullyQualifiedClassImpl fullyQualifiedClass = new FullyQualifiedClassImpl(); - return fullyQualifiedClass; - } + FullyQualifiedClassImpl fullyQualifiedClass = new FullyQualifiedClassImpl(); + return fullyQualifiedClass; + } /** - * + * * - * @generated - */ + * @generated + */ public GenericBoolean createGenericBoolean() { - GenericBooleanImpl genericBoolean = new GenericBooleanImpl(); - return genericBoolean; - } + GenericBooleanImpl genericBoolean = new GenericBooleanImpl(); + return genericBoolean; + } /** - * + * * - * @generated - */ + * @generated + */ public Icon createIcon() { - IconImpl icon = new IconImpl(); - return icon; - } + IconImpl icon = new IconImpl(); + return icon; + } /** - * + * * - * @generated - */ + * @generated + */ public JavaIdentifier createJavaIdentifier() { - JavaIdentifierImpl javaIdentifier = new JavaIdentifierImpl(); - return javaIdentifier; - } + JavaIdentifierImpl javaIdentifier = new JavaIdentifierImpl(); + return javaIdentifier; + } /** - * + * * - * @generated - */ + * @generated + */ public Path createPath() { - PathImpl path = new PathImpl(); - return path; - } + PathImpl path = new PathImpl(); + return path; + } /** - * + * * - * @generated - */ + * @generated + */ public IdentifiableStringValue createIdentifiableStringValue() { - IdentifiableStringValueImpl identifiableStringValue = new IdentifiableStringValueImpl(); - return identifiableStringValue; - } + IdentifiableStringValueImpl identifiableStringValue = new IdentifiableStringValueImpl(); + return identifiableStringValue; + } /** - * + * * @param eDataType * @param initialValue * @return the version * - * @generated - */ + * @generated + */ public FaceletTaglibVersion createFaceletTaglibVersionFromString(EDataType eDataType, String initialValue) { - FaceletTaglibVersion result = FaceletTaglibVersion.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - return result; - } + FaceletTaglibVersion result = FaceletTaglibVersion.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + return result; + } /** - * + * * @param eDataType * @param instanceValue * @return * - * @generated - */ + * @generated + */ public String convertFaceletTaglibVersionToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } + return instanceValue == null ? null : instanceValue.toString(); + } /** - * + * * @param eDataType * @param initialValue * @return * - * @generated - */ + * @generated + */ public GenericBooleanBase createGenericBooleanBaseFromString(EDataType eDataType, String initialValue) { - GenericBooleanBase result = GenericBooleanBase.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - return result; - } + GenericBooleanBase result = GenericBooleanBase.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + return result; + } /** - * + * * @param eDataType * @param instanceValue * @return * - * @generated - */ + * @generated + */ public String convertGenericBooleanBaseToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } + return instanceValue == null ? null : instanceValue.toString(); + } /** - * + * * @param eDataType * @param initialValue * @return * - * @generated - */ + * @generated + */ public FaceletTaglibVersion createFaceletTaglibVersionTypeObjectFromString(EDataType eDataType, String initialValue) { - return createFaceletTaglibVersionFromString(FaceletTaglibPackage.Literals.FACELET_TAGLIB_VERSION, initialValue); - } + return createFaceletTaglibVersionFromString(FaceletTaglibPackage.Literals.FACELET_TAGLIB_VERSION, initialValue); + } /** - * + * * @param eDataType * @param instanceValue * @return * - * @generated - */ + * @generated + */ public String convertFaceletTaglibVersionTypeObjectToString(EDataType eDataType, Object instanceValue) { - return convertFaceletTaglibVersionToString(FaceletTaglibPackage.Literals.FACELET_TAGLIB_VERSION, instanceValue); - } + return convertFaceletTaglibVersionToString(FaceletTaglibPackage.Literals.FACELET_TAGLIB_VERSION, instanceValue); + } /** - * + * * @param eDataType * @param initialValue * @return * - * @generated - */ + * @generated + */ public String createFullyQualifiedClassBaseFromString(EDataType eDataType, String initialValue) { - return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.TOKEN, initialValue); - } + return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.TOKEN, initialValue); + } /** - * + * * @param eDataType * @param instanceValue * @return * - * @generated - */ + * @generated + */ public String convertFullyQualifiedClassBaseToString(EDataType eDataType, Object instanceValue) { - return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.TOKEN, instanceValue); - } + return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.TOKEN, instanceValue); + } /** - * + * * @param eDataType * @param initialValue * @return * - * @generated - */ + * @generated + */ public String createJavaIdentifierBaseFromString(EDataType eDataType, String initialValue) { - return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.TOKEN, initialValue); - } + return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.TOKEN, initialValue); + } /** - * + * * @param eDataType * @param instanceValue * @return * - * @generated - */ + * @generated + */ public String convertJavaIdentifierBaseToString(EDataType eDataType, Object instanceValue) { - return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.TOKEN, instanceValue); - } + return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.TOKEN, instanceValue); + } /** - * + * * @param eDataType * @param initialValue * @return * - * @generated - */ + * @generated + */ public String createPathTypeBaseFromString(EDataType eDataType, String initialValue) { - return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.TOKEN, initialValue); - } + return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.TOKEN, initialValue); + } /** - * + * * @param eDataType * @param instanceValue * @return * - * @generated - */ + * @generated + */ public String convertPathTypeBaseToString(EDataType eDataType, Object instanceValue) { - return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.TOKEN, instanceValue); - } + return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.TOKEN, instanceValue); + } /** - * + * * - * @generated - */ + * @generated + */ public FaceletTaglibPackage getFaceletTaglibPackage() { - return (FaceletTaglibPackage)getEPackage(); - } + return (FaceletTaglibPackage)getEPackage(); + } /** - * + * * @return * - * @deprecated - * @generated - */ + * @deprecated + * @generated + */ @Deprecated public static FaceletTaglibPackage getPackage() { - return FaceletTaglibPackage.eINSTANCE; - } + return FaceletTaglibPackage.eINSTANCE; + } } //FaceletTaglibFactoryImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibPackageImpl.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibPackageImpl.java index 2876f6e30..4340d8ef0 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibPackageImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibPackageImpl.java @@ -321,7 +321,7 @@ private FaceletTaglibPackageImpl() /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * + * *

This method is used to initialize {@link FaceletTaglibPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * @@ -337,7 +337,8 @@ public static FaceletTaglibPackage init() if (isInited) return (FaceletTaglibPackage)EPackage.Registry.INSTANCE.getEPackage(FaceletTaglibPackage.eNS_URI); // Obtain or create and register package - FaceletTaglibPackageImpl theFaceletTaglibPackage = (FaceletTaglibPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FaceletTaglibPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FaceletTaglibPackageImpl()); + Object registeredFaceletTaglibPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + FaceletTaglibPackageImpl theFaceletTaglibPackage = registeredFaceletTaglibPackage instanceof FaceletTaglibPackageImpl ? (FaceletTaglibPackageImpl)registeredFaceletTaglibPackage : new FaceletTaglibPackageImpl(); isInited = true; @@ -352,7 +353,7 @@ public static FaceletTaglibPackage init() // Register package validator EValidator.Registry.INSTANCE.put - (theFaceletTaglibPackage, + (theFaceletTaglibPackage, new EValidator.Descriptor() { public EValidator getEValidator() { return FaceletTaglibValidator.INSTANCE; @@ -362,7 +363,6 @@ public EValidator getEValidator() { // Mark meta-data to indicate it can't be changed theFaceletTaglibPackage.freeze(); - // Update the registry and return the package EPackage.Registry.INSTANCE.put(FaceletTaglibPackage.eNS_URI, theFaceletTaglibPackage); return theFaceletTaglibPackage; @@ -1831,6 +1831,10 @@ public void initializePackageContents() addEEnumLiteral(faceletTaglibVersionEEnum, FaceletTaglibVersion._20); addEEnumLiteral(faceletTaglibVersionEEnum, FaceletTaglibVersion._21); addEEnumLiteral(faceletTaglibVersionEEnum, FaceletTaglibVersion._22); + addEEnumLiteral(faceletTaglibVersionEEnum, FaceletTaglibVersion._23); + addEEnumLiteral(faceletTaglibVersionEEnum, FaceletTaglibVersion._30); + addEEnumLiteral(faceletTaglibVersionEEnum, FaceletTaglibVersion._40); + addEEnumLiteral(faceletTaglibVersionEEnum, FaceletTaglibVersion._41); initEEnum(genericBooleanBaseEEnum, GenericBooleanBase.class, "GenericBooleanBase"); //$NON-NLS-1$ addEEnumLiteral(genericBooleanBaseEEnum, GenericBooleanBase.TRUE); @@ -1860,780 +1864,780 @@ public void initializePackageContents() */ protected void createExtendedMetaDataAnnotations() { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ + String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ addAnnotation - (descriptionEClass, - source, + (descriptionEClass, + source, new String[] { - "name", "descriptionType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "descriptionType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getDescription_Any(), - source, + (getDescription_Any(), + source, new String[] { - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ - "processing", "lax" //$NON-NLS-1$//$NON-NLS-2$ - }); + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ + "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getDescription_Id(), - source, + (getDescription_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getDescription_Lang(), - source, + (getDescription_Lang(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "lang", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "http://www.w3.org/XML/1998/namespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "lang", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "http://www.w3.org/XML/1998/namespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (displayNameEClass, - source, + (displayNameEClass, + source, new String[] { - "name", "display-nameType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "display-nameType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (documentRootEClass, - source, + (documentRootEClass, + source, new String[] { - "name", "", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "mixed" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "mixed" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getDocumentRoot_Mixed(), - source, + (getDocumentRoot_Mixed(), + source, new String[] { - "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ - "name", ":mixed" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ + "name", ":mixed" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getDocumentRoot_XMLNSPrefixMap(), - source, + (getDocumentRoot_XMLNSPrefixMap(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "xmlns:prefix" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "xmlns:prefix" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getDocumentRoot_XSISchemaLocation(), - source, + (getDocumentRoot_XSISchemaLocation(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "xsi:schemaLocation" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "xsi:schemaLocation" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getDocumentRoot_FaceletTaglib(), - source, + (getDocumentRoot_FaceletTaglib(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "facelet-taglib", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "facelet-taglib", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibCanonicalNameEClass, - source, + (faceletTaglibCanonicalNameEClass, + source, new String[] { - "name", "facelet-taglib-canonical-nameType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-canonical-nameType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibCanonicalName_Value(), - source, + (getFaceletTaglibCanonicalName_Value(), + source, new String[] { - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibCanonicalName_Id(), - source, + (getFaceletTaglibCanonicalName_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibExtensionEClass, - source, + (faceletTaglibExtensionEClass, + source, new String[] { - "name", "facelet-taglib-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibExtension_Any(), - source, + (getFaceletTaglibExtension_Any(), + source, new String[] { - "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ - "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ + "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibExtension_Id(), - source, + (getFaceletTaglibExtension_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibFunctionEClass, - source, + (faceletTaglibFunctionEClass, + source, new String[] { - "name", "facelet-taglib-functionType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-functionType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibFunction_FunctionName(), - source, + (getFaceletTaglibFunction_FunctionName(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "function-name", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "function-name", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibFunction_FunctionClass(), - source, + (getFaceletTaglibFunction_FunctionClass(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "function-class", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "function-class", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibFunction_FunctionSignature(), - source, + (getFaceletTaglibFunction_FunctionSignature(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "function-signature", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "function-signature", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagAttributeEClass, - source, + (faceletTaglibTagAttributeEClass, + source, new String[] { - "name", "facelet-taglib-tag-attributeType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-attributeType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagAttribute_NameElement(), - source, + (getFaceletTaglibTagAttribute_NameElement(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "name", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "name", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagAttribute_RequiredElement(), - source, + (getFaceletTaglibTagAttribute_RequiredElement(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "required", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "required", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagAttribute_TypeElement(), - source, + (getFaceletTaglibTagAttribute_TypeElement(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "type", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "type", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagAttribute_MethodSignatureElement(), - source, + (getFaceletTaglibTagAttribute_MethodSignatureElement(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "method-signature", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "method-signature", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagAttribute_Id(), - source, + (getFaceletTaglibTagAttribute_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagBehaviorExtensionEClass, - source, + (faceletTaglibTagBehaviorExtensionEClass, + source, new String[] { - "name", "facelet-taglib-tag-behavior-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-behavior-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagBehaviorExtension_Any(), - source, + (getFaceletTaglibTagBehaviorExtension_Any(), + source, new String[] { - "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ - "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ + "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagBehaviorExtension_Id(), - source, + (getFaceletTaglibTagBehaviorExtension_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagBehaviorEClass, - source, + (faceletTaglibTagBehaviorEClass, + source, new String[] { - "name", "facelet-taglib-tag-behaviorType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-behaviorType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagBehavior_BehaviorId(), - source, + (getFaceletTaglibTagBehavior_BehaviorId(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "behavior-id", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "behavior-id", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagBehavior_HandlerClass(), - source, + (getFaceletTaglibTagBehavior_HandlerClass(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagBehavior_BehaviorExtension(), - source, + (getFaceletTaglibTagBehavior_BehaviorExtension(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "behavior-extension", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "behavior-extension", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagComponentExtensionEClass, - source, + (faceletTaglibTagComponentExtensionEClass, + source, new String[] { - "name", "facelet-taglib-tag-component-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-component-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagComponentExtension_Any(), - source, + (getFaceletTaglibTagComponentExtension_Any(), + source, new String[] { - "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ - "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ + "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagComponentExtension_Id(), - source, + (getFaceletTaglibTagComponentExtension_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagComponentEClass, - source, + (faceletTaglibTagComponentEClass, + source, new String[] { - "name", "facelet-taglib-tag-componentType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-componentType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagComponent_ComponentType(), - source, + (getFaceletTaglibTagComponent_ComponentType(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "component-type", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "component-type", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagComponent_RendererType(), - source, + (getFaceletTaglibTagComponent_RendererType(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "renderer-type", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "renderer-type", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagComponent_HandlerClass(), - source, + (getFaceletTaglibTagComponent_HandlerClass(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagComponent_ComponentExtension(), - source, + (getFaceletTaglibTagComponent_ComponentExtension(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "component-extension", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "component-extension", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagConverterExtensionEClass, - source, + (faceletTaglibTagConverterExtensionEClass, + source, new String[] { - "name", "facelet-taglib-tag-converter-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-converter-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagConverterExtension_Any(), - source, + (getFaceletTaglibTagConverterExtension_Any(), + source, new String[] { - "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ - "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ + "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagConverterExtension_Id(), - source, + (getFaceletTaglibTagConverterExtension_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagConverterEClass, - source, + (faceletTaglibTagConverterEClass, + source, new String[] { - "name", "facelet-taglib-tag-converterType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-converterType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagConverter_ConverterId(), - source, + (getFaceletTaglibTagConverter_ConverterId(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "converter-id", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "converter-id", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagConverter_HandlerClass(), - source, + (getFaceletTaglibTagConverter_HandlerClass(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagConverter_ConverterExtension(), - source, + (getFaceletTaglibTagConverter_ConverterExtension(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "converter-extension", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "converter-extension", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagExtensionEClass, - source, + (faceletTaglibTagExtensionEClass, + source, new String[] { - "name", "facelet-taglib-tag-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagExtension_Any(), - source, + (getFaceletTaglibTagExtension_Any(), + source, new String[] { - "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ - "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ + "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagExtension_Id(), - source, + (getFaceletTaglibTagExtension_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagEClass, - source, + (faceletTaglibTagEClass, + source, new String[] { - "name", "facelet-taglib-tagType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tagType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_TagNameElement(), - source, + (getFaceletTaglibTag_TagNameElement(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "tag-name", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "tag-name", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_HandlerClassElement(), - source, + (getFaceletTaglibTag_HandlerClassElement(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_Behavior(), - source, + (getFaceletTaglibTag_Behavior(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "behavior", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "behavior", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_Component(), - source, + (getFaceletTaglibTag_Component(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "component", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "component", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_Converter(), - source, + (getFaceletTaglibTag_Converter(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "converter", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "converter", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_Validator(), - source, + (getFaceletTaglibTag_Validator(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "validator", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "validator", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_Source(), - source, + (getFaceletTaglibTag_Source(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "source", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "source", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_Attribute(), - source, + (getFaceletTaglibTag_Attribute(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTag_TagExtension(), - source, + (getFaceletTaglibTag_TagExtension(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "tag-extension", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "tag-extension", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagValidatorExtensionEClass, - source, + (faceletTaglibTagValidatorExtensionEClass, + source, new String[] { - "name", "facelet-taglib-tag-validator-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-validator-extensionType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagValidatorExtension_Any(), - source, + (getFaceletTaglibTagValidatorExtension_Any(), + source, new String[] { - "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ - "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "elementWildcard", //$NON-NLS-1$ //$NON-NLS-2$ + "wildcards", "##any", //$NON-NLS-1$ //$NON-NLS-2$ + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "processing", "lax" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagValidatorExtension_Id(), - source, + (getFaceletTaglibTagValidatorExtension_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibTagValidatorEClass, - source, + (faceletTaglibTagValidatorEClass, + source, new String[] { - "name", "facelet-taglib-tag-validatorType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + "name", "facelet-taglib-tag-validatorType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ }); addAnnotation - (faceletTaglibTagValidatorEClass, - 1, + (faceletTaglibTagValidatorEClass, + new boolean[] { true }, "http:///org/eclipse/emf/ecore/util/ExtendedMetaData", //$NON-NLS-1$ new String[] { - "name", "facelet-taglib-tag-validatorType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-tag-validatorType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagValidator_ValidatorId(), - source, + (getFaceletTaglibTagValidator_ValidatorId(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "validator-id", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "validator-id", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagValidator_HandlerClass(), - source, + (getFaceletTaglibTagValidator_HandlerClass(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "handler-class", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglibTagValidator_ValidatorExtension(), - source, + (getFaceletTaglibTagValidator_ValidatorExtension(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "validator-extension", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "validator-extension", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibEClass, - source, + (faceletTaglibEClass, + source, new String[] { - "name", "facelet-taglibType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglibType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_LibraryClass(), - source, + (getFaceletTaglib_LibraryClass(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "library-class", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "library-class", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_Namespace(), - source, + (getFaceletTaglib_Namespace(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "namespace", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "namespace", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_CompositeLibraryName(), - source, + (getFaceletTaglib_CompositeLibraryName(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "composite-library-name", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "composite-library-name", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_Group(), - source, + (getFaceletTaglib_Group(), + source, new String[] { - "kind", "group", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "group:6" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "group", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "group:6" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_Tag(), - source, + (getFaceletTaglib_Tag(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "tag", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace", //$NON-NLS-1$ //$NON-NLS-2$ - "group", "#group:6" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "tag", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace", //$NON-NLS-1$ //$NON-NLS-2$ + "group", "#group:6" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_Function(), - source, + (getFaceletTaglib_Function(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "function", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace", //$NON-NLS-1$ //$NON-NLS-2$ - "group", "#group:6" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "function", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace", //$NON-NLS-1$ //$NON-NLS-2$ + "group", "#group:6" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_TaglibExtension(), - source, + (getFaceletTaglib_TaglibExtension(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "taglib-extension", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "taglib-extension", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_Id(), - source, + (getFaceletTaglib_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_Version(), - source, + (getFaceletTaglib_Version(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "version" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "version" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getFaceletTaglib_ShortName(), - source, + (getFaceletTaglib_ShortName(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "short-name", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "short-name", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibVersionEEnum, - source, + (faceletTaglibVersionEEnum, + source, new String[] { - "name", "facelet-taglib-versionType" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-versionType" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (faceletTaglibVersionTypeObjectEDataType, - source, + (faceletTaglibVersionTypeObjectEDataType, + source, new String[] { - "name", "facelet-taglib-versionType:Object", //$NON-NLS-1$ //$NON-NLS-2$ - "baseType", "facelet-taglib-versionType" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "facelet-taglib-versionType:Object", //$NON-NLS-1$ //$NON-NLS-2$ + "baseType", "facelet-taglib-versionType" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (fullyQualifiedClassEClass, - source, + (fullyQualifiedClassEClass, + source, new String[] { - "name", "fully-qualified-classType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "fully-qualified-classType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (fullyQualifiedClassBaseEDataType, - source, + (fullyQualifiedClassBaseEDataType, + source, new String[] { - "name", "fully-qualified-classType_._base", //$NON-NLS-1$ //$NON-NLS-2$ - "baseType", "http://www.eclipse.org/emf/2003/XMLType#token" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "fully-qualified-classType_._base", //$NON-NLS-1$ //$NON-NLS-2$ + "baseType", "http://www.eclipse.org/emf/2003/XMLType#token" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (genericBooleanEClass, - source, + (genericBooleanEClass, + source, new String[] { - "name", "generic-booleanType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "generic-booleanType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (genericBooleanBaseEEnum, - source, + (genericBooleanBaseEEnum, + source, new String[] { - "name", "generic-booleanType_._base" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "generic-booleanType_._base" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (iconEClass, - source, + (iconEClass, + source, new String[] { - "name", "iconType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "iconType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "elementOnly" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getIcon_SmallIcon(), - source, + (getIcon_SmallIcon(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "small-icon", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "small-icon", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getIcon_LargeIcon(), - source, + (getIcon_LargeIcon(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "large-icon", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "large-icon", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getIcon_Id(), - source, + (getIcon_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getIcon_Lang(), - source, + (getIcon_Lang(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "lang", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "http://www.w3.org/XML/1998/namespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "lang", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "http://www.w3.org/XML/1998/namespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (javaIdentifierEClass, - source, + (javaIdentifierEClass, + source, new String[] { - "name", "java-identifierType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "java-identifierType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (javaIdentifierBaseEDataType, - source, + (javaIdentifierBaseEDataType, + source, new String[] { - "name", "java-identifierType_._base", //$NON-NLS-1$ //$NON-NLS-2$ - "baseType", "http://www.eclipse.org/emf/2003/XMLType#token", //$NON-NLS-1$ //$NON-NLS-2$ - "pattern", "($|_|\\p{L})(\\p{L}|\\p{Nd}|_|$)*" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "java-identifierType_._base", //$NON-NLS-1$ //$NON-NLS-2$ + "baseType", "http://www.eclipse.org/emf/2003/XMLType#token", //$NON-NLS-1$ //$NON-NLS-2$ + "pattern", "($|_|\\p{L})(\\p{L}|\\p{Nd}|_|$)*" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (pathEClass, - source, + (pathEClass, + source, new String[] { - "name", "pathType", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "pathType", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (pathTypeBaseEDataType, - source, + (pathTypeBaseEDataType, + source, new String[] { - "name", "pathType_._base", //$NON-NLS-1$ //$NON-NLS-2$ - "baseType", "http://www.eclipse.org/emf/2003/XMLType#token" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "pathType_._base", //$NON-NLS-1$ //$NON-NLS-2$ + "baseType", "http://www.eclipse.org/emf/2003/XMLType#token" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (identifiableStringValueEClass, - source, + (identifiableStringValueEClass, + source, new String[] { - "name", "string", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", "string", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getIdentifiableStringValue_Value(), - source, + (getIdentifiableStringValue_Value(), + source, new String[] { - "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ - "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "name", ":0", //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "simple" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getIdentifiableStringValue_Id(), - source, + (getIdentifiableStringValue_Id(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "id" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getIdentifiableLangStringValue_Lang(), - source, + (getIdentifiableLangStringValue_Lang(), + source, new String[] { - "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "lang", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "http://www.w3.org/XML/1998/namespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "attribute", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "lang", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "http://www.w3.org/XML/1998/namespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getUserVisibleTaglibObject_Description(), - source, + (getUserVisibleTaglibObject_Description(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "description", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "description", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getUserVisibleTaglibObject_DisplayName(), - source, + (getUserVisibleTaglibObject_DisplayName(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "display-name", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ - }); + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "display-name", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + }); addAnnotation - (getUserVisibleTaglibObject_Icon(), - source, + (getUserVisibleTaglibObject_Icon(), + source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "icon", //$NON-NLS-1$ //$NON-NLS-2$ - "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ + "name", "icon", //$NON-NLS-1$ //$NON-NLS-2$ + "namespace", "##targetNamespace" //$NON-NLS-1$ //$NON-NLS-2$ }); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibAdapterFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibAdapterFactory.java index 355f74da5..b9b81eeb6 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibAdapterFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibAdapterFactory.java @@ -22,6 +22,7 @@ import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.*; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Description; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DisplayName; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot; @@ -61,611 +62,580 @@ public class FaceletTaglibAdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * + * The cached model package. + * * - * @generated - */ + * @generated + */ protected static FaceletTaglibPackage modelPackage; /** - * Creates an instance of the adapter factory. - * + * Creates an instance of the adapter factory. + * * - * @generated - */ + * @generated + */ public FaceletTaglibAdapterFactory() { - if (modelPackage == null) - { - modelPackage = FaceletTaglibPackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = FaceletTaglibPackage.eINSTANCE; + } + } /** - * Returns whether this factory is applicable for the type of the object. - * + * Returns whether this factory is applicable for the type of the object. + * * This implementation returns true if the object is either the model's package or is an instance object of the model. * - * @return whether this factory is applicable for the type of the object. - * @generated - */ + * @return whether this factory is applicable for the type of the object. + * @generated + */ @Override public boolean isFactoryForType(Object object) { - if (object == modelPackage) - { - return true; - } - if (object instanceof EObject) - { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the createXXX methods. - * - * - * @generated - */ + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ protected FaceletTaglibSwitch modelSwitch = - new FaceletTaglibSwitch() - { - @Override - public Adapter caseDescription(Description object) - { - return createDescriptionAdapter(); - } - @Override - public Adapter caseDisplayName(DisplayName object) - { - return createDisplayNameAdapter(); - } - @Override - public Adapter caseDocumentRoot(DocumentRoot object) - { - return createDocumentRootAdapter(); - } - @Override - public Adapter caseFaceletTaglibCanonicalName(FaceletTaglibCanonicalName object) - { - return createFaceletTaglibCanonicalNameAdapter(); - } - @Override - public Adapter caseFaceletTaglibExtension(FaceletTaglibExtension object) - { - return createFaceletTaglibExtensionAdapter(); - } - @Override - public Adapter caseFaceletTaglibFunction(FaceletTaglibFunction object) - { - return createFaceletTaglibFunctionAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagAttribute(FaceletTaglibTagAttribute object) - { - return createFaceletTaglibTagAttributeAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagBehaviorExtension(FaceletTaglibTagBehaviorExtension object) - { - return createFaceletTaglibTagBehaviorExtensionAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagBehavior(FaceletTaglibTagBehavior object) - { - return createFaceletTaglibTagBehaviorAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagComponentExtension(FaceletTaglibTagComponentExtension object) - { - return createFaceletTaglibTagComponentExtensionAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagComponent(FaceletTaglibTagComponent object) - { - return createFaceletTaglibTagComponentAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagConverterExtension(FaceletTaglibTagConverterExtension object) - { - return createFaceletTaglibTagConverterExtensionAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagConverter(FaceletTaglibTagConverter object) - { - return createFaceletTaglibTagConverterAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagExtension(FaceletTaglibTagExtension object) - { - return createFaceletTaglibTagExtensionAdapter(); - } - @Override - public Adapter caseFaceletTaglibTag(FaceletTaglibTag object) - { - return createFaceletTaglibTagAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagValidatorExtension(FaceletTaglibTagValidatorExtension object) - { - return createFaceletTaglibTagValidatorExtensionAdapter(); - } - @Override - public Adapter caseFaceletTaglibTagValidator(FaceletTaglibTagValidator object) - { - return createFaceletTaglibTagValidatorAdapter(); - } - @Override - public Adapter caseFaceletTaglib(FaceletTaglib object) - { - return createFaceletTaglibAdapter(); - } - @Override - public Adapter caseFullyQualifiedClass(FullyQualifiedClass object) - { - return createFullyQualifiedClassAdapter(); - } - @Override - public Adapter caseGenericBoolean(GenericBoolean object) - { - return createGenericBooleanAdapter(); - } - @Override - public Adapter caseIcon(Icon object) - { - return createIconAdapter(); - } - @Override - public Adapter caseJavaIdentifier(JavaIdentifier object) - { - return createJavaIdentifierAdapter(); - } - @Override - public Adapter casePath(Path object) - { - return createPathAdapter(); - } - @Override - public Adapter caseIdentifiableStringValue(IdentifiableStringValue object) - { - return createIdentifiableStringValueAdapter(); - } - @Override - public Adapter caseIdentifiableLangStringValue(IdentifiableLangStringValue object) - { - return createIdentifiableLangStringValueAdapter(); - } - @Override - public Adapter caseUserVisibleTaglibObject(UserVisibleTaglibObject object) - { - return createUserVisibleTaglibObjectAdapter(); - } - @Override - public Adapter defaultCase(EObject object) - { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ + new FaceletTaglibSwitch() { + @Override + public Adapter caseDescription(Description object) { + return createDescriptionAdapter(); + } + @Override + public Adapter caseDisplayName(DisplayName object) { + return createDisplayNameAdapter(); + } + @Override + public Adapter caseDocumentRoot(DocumentRoot object) { + return createDocumentRootAdapter(); + } + @Override + public Adapter caseFaceletTaglibCanonicalName(FaceletTaglibCanonicalName object) { + return createFaceletTaglibCanonicalNameAdapter(); + } + @Override + public Adapter caseFaceletTaglibExtension(FaceletTaglibExtension object) { + return createFaceletTaglibExtensionAdapter(); + } + @Override + public Adapter caseFaceletTaglibFunction(FaceletTaglibFunction object) { + return createFaceletTaglibFunctionAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagAttribute(FaceletTaglibTagAttribute object) { + return createFaceletTaglibTagAttributeAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagBehaviorExtension(FaceletTaglibTagBehaviorExtension object) { + return createFaceletTaglibTagBehaviorExtensionAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagBehavior(FaceletTaglibTagBehavior object) { + return createFaceletTaglibTagBehaviorAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagComponentExtension(FaceletTaglibTagComponentExtension object) { + return createFaceletTaglibTagComponentExtensionAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagComponent(FaceletTaglibTagComponent object) { + return createFaceletTaglibTagComponentAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagConverterExtension(FaceletTaglibTagConverterExtension object) { + return createFaceletTaglibTagConverterExtensionAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagConverter(FaceletTaglibTagConverter object) { + return createFaceletTaglibTagConverterAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagExtension(FaceletTaglibTagExtension object) { + return createFaceletTaglibTagExtensionAdapter(); + } + @Override + public Adapter caseFaceletTaglibTag(FaceletTaglibTag object) { + return createFaceletTaglibTagAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagValidatorExtension(FaceletTaglibTagValidatorExtension object) { + return createFaceletTaglibTagValidatorExtensionAdapter(); + } + @Override + public Adapter caseFaceletTaglibTagValidator(FaceletTaglibTagValidator object) { + return createFaceletTaglibTagValidatorAdapter(); + } + @Override + public Adapter caseFaceletTaglib(FaceletTaglib object) { + return createFaceletTaglibAdapter(); + } + @Override + public Adapter caseFullyQualifiedClass(FullyQualifiedClass object) { + return createFullyQualifiedClassAdapter(); + } + @Override + public Adapter caseGenericBoolean(GenericBoolean object) { + return createGenericBooleanAdapter(); + } + @Override + public Adapter caseIcon(Icon object) { + return createIconAdapter(); + } + @Override + public Adapter caseJavaIdentifier(JavaIdentifier object) { + return createJavaIdentifierAdapter(); + } + @Override + public Adapter casePath(Path object) { + return createPathAdapter(); + } + @Override + public Adapter caseIdentifiableStringValue(IdentifiableStringValue object) { + return createIdentifiableStringValueAdapter(); + } + @Override + public Adapter caseIdentifiableLangStringValue(IdentifiableLangStringValue object) { + return createIdentifiableLangStringValueAdapter(); + } + @Override + public Adapter caseUserVisibleTaglibObject(UserVisibleTaglibObject object) { + return createUserVisibleTaglibObjectAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ @Override public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject)target); - } + return modelSwitch.doSwitch((EObject)target); + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Description Description}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Description Description}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Description - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Description + * @generated + */ public Adapter createDescriptionAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DisplayName Display Name}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DisplayName Display Name}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DisplayName - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DisplayName + * @generated + */ public Adapter createDisplayNameAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot Document Root}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot Document Root}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot + * @generated + */ public Adapter createDocumentRootAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibCanonicalName Canonical Name}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibCanonicalName Canonical Name}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibCanonicalName - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibCanonicalName + * @generated + */ public Adapter createFaceletTaglibCanonicalNameAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibExtension Extension}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibExtension Extension}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibExtension - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibExtension + * @generated + */ public Adapter createFaceletTaglibExtensionAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibFunction Function}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibFunction Function}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibFunction - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibFunction + * @generated + */ public Adapter createFaceletTaglibFunctionAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagAttribute Tag Attribute}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagAttribute Tag Attribute}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagAttribute - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagAttribute + * @generated + */ public Adapter createFaceletTaglibTagAttributeAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagBehaviorExtension Tag Behavior Extension}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagBehaviorExtension Tag Behavior Extension}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagBehaviorExtension - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagBehaviorExtension + * @generated + */ public Adapter createFaceletTaglibTagBehaviorExtensionAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagBehavior Tag Behavior}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagBehavior Tag Behavior}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagBehavior - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagBehavior + * @generated + */ public Adapter createFaceletTaglibTagBehaviorAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagComponentExtension Tag Component Extension}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagComponentExtension Tag Component Extension}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagComponentExtension - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagComponentExtension + * @generated + */ public Adapter createFaceletTaglibTagComponentExtensionAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagComponent Tag Component}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagComponent Tag Component}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagComponent - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagComponent + * @generated + */ public Adapter createFaceletTaglibTagComponentAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagConverterExtension Tag Converter Extension}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagConverterExtension Tag Converter Extension}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagConverterExtension - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagConverterExtension + * @generated + */ public Adapter createFaceletTaglibTagConverterExtensionAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagConverter Tag Converter}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagConverter Tag Converter}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagConverter - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagConverter + * @generated + */ public Adapter createFaceletTaglibTagConverterAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagExtension Tag Extension}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagExtension Tag Extension}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagExtension - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagExtension + * @generated + */ public Adapter createFaceletTaglibTagExtensionAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag Tag}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag Tag}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag + * @generated + */ public Adapter createFaceletTaglibTagAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagValidatorExtension Tag Validator Extension}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagValidatorExtension Tag Validator Extension}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagValidatorExtension - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagValidatorExtension + * @generated + */ public Adapter createFaceletTaglibTagValidatorExtensionAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagValidator Tag Validator}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagValidator Tag Validator}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagValidator - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagValidator + * @generated + */ public Adapter createFaceletTaglibTagValidatorAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib Facelet Taglib}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib Facelet Taglib}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib + * @generated + */ public Adapter createFaceletTaglibAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FullyQualifiedClass Fully Qualified Class}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FullyQualifiedClass Fully Qualified Class}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FullyQualifiedClass - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FullyQualifiedClass + * @generated + */ public Adapter createFullyQualifiedClassAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.GenericBoolean Generic Boolean}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.GenericBoolean Generic Boolean}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.GenericBoolean - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.GenericBoolean + * @generated + */ public Adapter createGenericBooleanAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Icon Icon}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Icon Icon}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Icon - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Icon + * @generated + */ public Adapter createIconAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.JavaIdentifier Java Identifier}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.JavaIdentifier Java Identifier}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.JavaIdentifier - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.JavaIdentifier + * @generated + */ public Adapter createJavaIdentifierAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Path Path}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Path Path}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Path - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Path + * @generated + */ public Adapter createPathAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.IdentifiableStringValue Identifiable String Value}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.IdentifiableStringValue Identifiable String Value}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.IdentifiableStringValue - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.IdentifiableStringValue + * @generated + */ public Adapter createIdentifiableStringValueAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.IdentifiableLangStringValue Identifiable Lang String Value}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.IdentifiableLangStringValue Identifiable Lang String Value}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.IdentifiableLangStringValue - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.IdentifiableLangStringValue + * @generated + */ public Adapter createIdentifiableLangStringValueAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.UserVisibleTaglibObject User Visible Taglib Object}'. - * + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.UserVisibleTaglibObject User Visible Taglib Object}'. + * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * - * @return the new adapter. - * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.UserVisibleTaglibObject - * @generated - */ + * @return the new adapter. + * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.UserVisibleTaglibObject + * @generated + */ public Adapter createUserVisibleTaglibObjectAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for the default case. - * + * Creates a new adapter for the default case. + * * This default implementation returns null. * - * @return the new adapter. - * @generated - */ + * @return the new adapter. + * @generated + */ public Adapter createEObjectAdapter() { - return null; - } + return null; + } } //FaceletTaglibAdapterFactory diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceFactoryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceFactoryImpl.java index 71cfd827f..892fcfb08 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceFactoryImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceFactoryImpl.java @@ -33,36 +33,36 @@ public class FaceletTaglibResourceFactoryImpl extends ResourceFactoryImpl { /** - * Creates an instance of the resource factory. - * + * Creates an instance of the resource factory. + * * - * @generated - */ + * @generated + */ public FaceletTaglibResourceFactoryImpl() { - super(); - } + super(); + } /** - * Creates an instance of the resource. - * + * Creates an instance of the resource. + * * - * @generated - */ + * @generated + */ @Override public Resource createResource(URI uri) { - XMLResource result = new FaceletTaglibResourceImpl(uri); - result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + XMLResource result = new FaceletTaglibResourceImpl(uri); + result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); + result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); - return result; - } + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); + return result; + } } //FaceletTaglibResourceFactoryImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceImpl.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceImpl.java index e502176cb..71103901d 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceImpl.java @@ -36,16 +36,16 @@ public class FaceletTaglibResourceImpl extends XMLResourceImpl { /** - * Creates an instance of the resource. - * + * Creates an instance of the resource. + * * - * @param uri the URI of the new resource. - * @generated - */ + * @param uri the URI of the new resource. + * @generated + */ public FaceletTaglibResourceImpl(URI uri) { - super(uri); - } + super(uri); + } @Override protected XMLLoad createXMLLoad() diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibSwitch.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibSwitch.java index b327b67ba..2ca537fc5 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibSwitch.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibSwitch.java @@ -21,6 +21,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.*; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Description; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DisplayName; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot; @@ -90,7 +91,7 @@ public FaceletTaglibSwitch() * Checks whether this is a switch for the given package. * * - * @parameter ePackage the package in question. + * @param ePackage the package in question. * @return whether this is a switch for the given package. * @generated */ diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibValidator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibValidator.java index 44a5300f3..2ecec8e6e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibValidator.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibValidator.java @@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.util.EObjectValidator; import org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil; import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator; +import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.*; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.Description; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DisplayName; import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot; diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibXMLProcessor.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibXMLProcessor.java index 959f51378..6b22703cf 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibXMLProcessor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibXMLProcessor.java @@ -35,33 +35,32 @@ public class FaceletTaglibXMLProcessor extends XMLProcessor { /** - * Public constructor to instantiate the helper. - * + * Public constructor to instantiate the helper. + * * - * @generated - */ + * @generated + */ public FaceletTaglibXMLProcessor() { - super((EPackage.Registry.INSTANCE)); - FaceletTaglibPackage.eINSTANCE.eClass(); - } + super((EPackage.Registry.INSTANCE)); + FaceletTaglibPackage.eINSTANCE.eClass(); + } /** - * Register for "*" and "xml" file extensions the FaceletTaglibResourceFactoryImpl factory. - * + * Register for "*" and "xml" file extensions the FaceletTaglibResourceFactoryImpl factory. + * * - * @generated - */ + * @generated + */ @Override protected Map getRegistrations() { - if (registrations == null) - { - super.getRegistrations(); - registrations.put(XML_EXTENSION, new FaceletTaglibResourceFactoryImpl()); - registrations.put(STAR_EXTENSION, new FaceletTaglibResourceFactoryImpl()); - } - return registrations; - } + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new FaceletTaglibResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new FaceletTaglibResourceFactoryImpl()); + } + return registrations; + } } //FaceletTaglibXMLProcessor diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/view/DTFaceletViewHandler.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/view/DTFaceletViewHandler.java index d7386a8ab..a5f1951fe 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/view/DTFaceletViewHandler.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/view/DTFaceletViewHandler.java @@ -44,6 +44,7 @@ public class DTFaceletViewHandler extends DefaultDTViewHandler private static final String ORG_ECLIPSE_WST_HTML_CORE_HTMLSOURCE = "org.eclipse.wst.html.core.htmlsource"; //$NON-NLS-1$ private static final String JAVAX_FACES_VIEW_ROOT = "javax.faces.ViewRoot"; //$NON-NLS-1$ + private static final String JAKARTA_FACES_VIEW_ROOT = "jakarta.faces.ViewRoot"; //$NON-NLS-1$ @Override public String calculateLocale(DTFacesContext context) @@ -115,8 +116,9 @@ protected void populateViewRoot(DTUIViewRoot viewRoot, List children) { final ComponentInfo child = (ComponentInfo) it.next(); - if (child instanceof DTUIViewRoot || - JAVAX_FACES_VIEW_ROOT.equals(child.getComponentTypeInfo().getComponentType())) + if (child instanceof DTUIViewRoot + || JAVAX_FACES_VIEW_ROOT.equals(child.getComponentTypeInfo().getComponentType()) + || JAKARTA_FACES_VIEW_ROOT.equals(child.getComponentTypeInfo().getComponentType())) { // add recursively populateViewRoot(viewRoot, child.getChildren()); diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/IFacesConfigConstants.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/IFacesConfigConstants.java index 86b2ddc47..8a3686a49 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/IFacesConfigConstants.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/IFacesConfigConstants.java @@ -64,81 +64,160 @@ public interface IFacesConfigConstants { */ public static final String COMPONENT_SUPER_CLASS = "javax.faces.component.UIComponent"; //$NON-NLS-1$ + /** + * + */ + public static final String COMPONENT_SUPER_CLASS_JAKARTA = "jakarta.faces.component.UIComponent"; //$NON-NLS-1$ + /** * */ public static final String RENDER_KIT_SUPER_CLASS = "javax.faces.render.RenderKit"; //$NON-NLS-1$ + /** + * + */ + public static final String RENDER_KIT_SUPER_CLASS_JAKARTA = "jakarta.faces.render.RenderKit"; //$NON-NLS-1$ + /** * */ public static final String CONVERTER_INTERFACE = "javax.faces.convert.Converter"; //$NON-NLS-1$ + /** + * + */ + public static final String CONVERTER_INTERFACE_JAKARTA = "jakarta.faces.convert.Converter"; //$NON-NLS-1$ + /** * */ public static final String VALIDATOR_INTERFACE = "javax.faces.validator.Validator"; //$NON-NLS-1$ + /** + * + */ + public static final String VALIDATOR_INTERFACE_JAKARTA = "jakarta.faces.validator.Validator"; //$NON-NLS-1$ + /** * */ public static final String RENDERER_SUPER_CLASS = "javax.faces.render.Renderer"; //$NON-NLS-1$ + /** + * + */ + public static final String RENDERER_SUPER_CLASS_JAKARTA = "jakarta.faces.render.Renderer"; //$NON-NLS-1$ + /** * */ public static final String ACTION_LISTENER_INTERFACE = "javax.faces.event.ActionListener"; //$NON-NLS-1$ + /** + * + */ + public static final String ACTION_LISTENER_INTERFACE_JAKARTA = "jakarta.faces.event.ActionListener"; //$NON-NLS-1$ + /** * */ public static final String NAVIGATION_HANDLE_SUPER_CLASS = "javax.faces.application.NavigationHandler"; //$NON-NLS-1$ + /** + * + */ + public static final String NAVIGATION_HANDLE_SUPER_CLASS_JAKARTA = "jakarta.faces.application.NavigationHandler"; //$NON-NLS-1$ + /** * */ public static final String PROPERTY_RESOLVER_SUPER_CLASS = "javax.faces.el.PropertyResolver"; //$NON-NLS-1$ + /** + * + */ + public static final String PROPERTY_RESOLVER_SUPER_CLASS_JAKARTA = "jakarta.faces.el.PropertyResolver"; //$NON-NLS-1$ + /** * */ public static final String STATE_MANAGER_SUPER_CLASS = "javax.faces.application.StateManager"; //$NON-NLS-1$ + /** + * + */ + public static final String STATE_MANAGER_SUPER_CLASS_JAKARTA = "jakarta.faces.application.StateManager"; //$NON-NLS-1$ + /** * */ public static final String VARIABLE_RESOLVER_SUPER_CLASS = "javax.faces.el.VariableResolver"; //$NON-NLS-1$ + /** + * + */ + public static final String VARIABLE_RESOLVER_SUPER_CLASS_JAKARTA = "jakarta.faces.el.VariableResolver"; //$NON-NLS-1$ + /** * */ public static final String VIEW_HANDLER_SUPER_CLASS = "javax.faces.application.ViewHandler"; //$NON-NLS-1$ + /** + * + */ + public static final String VIEW_HANDLER_SUPER_CLASS_JAKARTA = "jakarta.faces.application.ViewHandler"; //$NON-NLS-1$ /** * */ public static final String APPLICATION_FACTORY_SUPER_CLASS = "javax.faces.application.ApplicationFactory"; //$NON-NLS-1$ + /** + * + */ + public static final String APPLICATION_FACTORY_SUPER_CLASS_JAKARTA = "jakarta.faces.application.ApplicationFactory"; //$NON-NLS-1$ + /** * */ public static final String FACES_CONTEXT_FACTORY_SUPER_CLASS = "javax.faces.context.FacesContextFactory"; //$NON-NLS-1$ + /** + * + */ + public static final String FACES_CONTEXT_FACTORY_SUPER_CLASS_JAKARTA = "jakarta.faces.context.FacesContextFactory"; //$NON-NLS-1$ + /** * */ public static final String LIFECYCLE_FACTORY_SUPER_CLASS = "javax.faces.lifecycle.LifecycleFactory"; //$NON-NLS-1$ + /** + * + */ + public static final String LIFECYCLE_FACTORY_SUPER_CLASS_JAKARTA = "jakarta.faces.lifecycle.LifecycleFactory"; //$NON-NLS-1$ + /** * */ public static final String RENDER_KIT_FACTORY_SUPER_CLASS = "javax.faces.render.RenderKitFactory"; //$NON-NLS-1$ + /** + * + */ + public static final String RENDER_KIT_FACTORY_SUPER_CLASS_JAKARTA = "jakarta.faces.render.RenderKitFactory"; //$NON-NLS-1$ + /** * */ public static final String PHASE_LISTENER_INTERFACE = "javax.faces.event.PhaseListener"; //$NON-NLS-1$ + /** + * + */ + public static final String PHASE_LISTENER_INTERFACE_JAKARTA = "jakarta.faces.event.PhaseListener"; //$NON-NLS-1$ + /** * */ diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/dialog/AddEditRendererDialog.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/dialog/AddEditRendererDialog.java index b1b10aee8..90a6f50e5 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/dialog/AddEditRendererDialog.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/dialog/AddEditRendererDialog.java @@ -21,6 +21,7 @@ import org.eclipse.jst.jsf.common.ui.internal.dialogfield.LayoutUtil; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.StringButtonDialogField; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.StringDialogField; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.ui.EditorMessages; import org.eclipse.jst.jsf.facesconfig.ui.EditorPlugin; import org.eclipse.jst.jsf.facesconfig.ui.IFacesConfigConstants; @@ -150,7 +151,10 @@ private Control createGeneralTabControl(Composite parent) { rendererClassField .setLabelText(EditorMessages.RendererSection_Dialog_RendererClass); rendererClassField.setProject(getProject()); - rendererClassField.setSuperClassName(IFacesConfigConstants.RENDERER_SUPER_CLASS); + rendererClassField.setSuperClassName( + JSFVersion.guessAtLeast(JSFVersion.V3_0, getProject()) ? + IFacesConfigConstants.RENDERER_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.RENDERER_SUPER_CLASS); rendererClassField.setAutoOpenResource(false); componentFamilyField = new StringButtonDialogField( diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ApplicationSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ApplicationSection.java index 44fd454bb..749244c50 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ApplicationSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ApplicationSection.java @@ -27,6 +27,7 @@ import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; @@ -125,7 +126,7 @@ public EObject createApplicationChildObject() { * For other types children, open a ClassDialog to select a class in * current project. */ - String superType = ModelUtil.getSuperType(applicationChildClass); + String superType = ModelUtil.getSuperType(applicationChildClass, JSFVersion.valueOfProject(project)); textValue = DialogUtil.openClassDialog(getSection().getShell(), project, superType, IJavaElementSearchConstants.CONSIDER_ALL_TYPES); diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentGeneralSection.java index b964f29b0..4c395ca96 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentGeneralSection.java @@ -27,6 +27,7 @@ import org.eclipse.jst.jsf.common.ui.internal.dialogfield.IDialogFieldApplyListener; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.LayoutUtil; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.StringDialogField; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.ComponentClassType; import org.eclipse.jst.jsf.facesconfig.emf.ComponentType; import org.eclipse.jst.jsf.facesconfig.emf.ComponentTypeType; @@ -207,8 +208,8 @@ public void dialogFieldApplied(DialogField field) { componentClassField.doFillIntoGrid(toolkit, container, numberOfColumns); LayoutUtil.setHorizontalGrabbing(componentClassField.getTextControl( toolkit, container)); - componentClassField.setProject((IProject) getPage().getEditor() - .getAdapter(IProject.class)); + IProject project = (IProject) getPage().getEditor().getAdapter(IProject.class); + componentClassField.setProject(project); componentClassField .setDialogFieldApplyListener(new IDialogFieldApplyListener() { public void dialogFieldApplied(DialogField field) { @@ -233,7 +234,9 @@ public void dialogFieldApplied(DialogField field) { } }); componentClassField - .setSuperClassName(IFacesConfigConstants.COMPONENT_SUPER_CLASS); + .setSuperClassName(JSFVersion.guessAtLeast(JSFVersion.V3_0, project) ? + IFacesConfigConstants.COMPONENT_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.COMPONENT_SUPER_CLASS); } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ConverterGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ConverterGeneralSection.java index 5bb0cf55b..19541b98d 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ConverterGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ConverterGeneralSection.java @@ -31,6 +31,7 @@ import org.eclipse.jst.jsf.common.ui.internal.dialogfield.IDialogFieldApplyListener; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.LayoutUtil; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.StringDialogField; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.ConverterClassType; import org.eclipse.jst.jsf.facesconfig.emf.ConverterForClassType; import org.eclipse.jst.jsf.facesconfig.emf.ConverterIdType; @@ -262,8 +263,8 @@ public void dialogFieldApplied(DialogField field) { // converterClassField.setRequired(true); converterClassField .setLabelText(EditorMessages.ConverterGeneralSection_Label_ConverterClass); - converterClassField.setProject((IProject) getPage().getEditor() - .getAdapter(IProject.class)); + IProject project = getPage().getEditor().getAdapter(IProject.class); + converterClassField.setProject(project); converterClassField.doFillIntoGrid(toolkit, container, numberOfColumns); LayoutUtil.setHorizontalGrabbing(converterClassField.getTextControl( toolkit, container)); @@ -292,7 +293,10 @@ public void dialogFieldApplied(DialogField field) { } }); converterClassField - .setInterface(IFacesConfigConstants.CONVERTER_INTERFACE); + .setInterface( + JSFVersion.guessAtLeast(JSFVersion.V3_0, project) ? + IFacesConfigConstants.CONVERTER_INTERFACE_JAKARTA : + IFacesConfigConstants.CONVERTER_INTERFACE); } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/FactorySection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/FactorySection.java index 3066bb022..c59db0409 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/FactorySection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/FactorySection.java @@ -27,6 +27,7 @@ import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory; import org.eclipse.jst.jsf.facesconfig.emf.FactoryType; import org.eclipse.jst.jsf.facesconfig.ui.dialog.DialogUtil; @@ -80,9 +81,8 @@ public FactorySection(EClass factoryChildClass, Composite parent, * @return an new object which is instance of factoryChildClass. */ public EObject createFactoryChildObject() { - String superType = ModelUtil.getSuperType(factoryChildClass); - IProject project = (IProject) this.getPage().getEditor().getAdapter( - IProject.class); + IProject project = (IProject) this.getPage().getEditor().getAdapter(IProject.class); + String superType = ModelUtil.getSuperType(factoryChildClass, JSFVersion.valueOfProject(project)); String result = DialogUtil.openClassDialog(getSection().getShell(), project, superType, IJavaElementSearchConstants.CONSIDER_ALL_TYPES); diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/LifecycleSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/LifecycleSection.java index fb0ed4f50..833c2f61a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/LifecycleSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/LifecycleSection.java @@ -23,6 +23,7 @@ import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory; import org.eclipse.jst.jsf.facesconfig.emf.LifecycleType; import org.eclipse.jst.jsf.facesconfig.ui.dialog.DialogUtil; @@ -83,9 +84,8 @@ public LifecycleSection(EClass lifecycleChildClass, Composite parent, * @return the lifecycle child */ public EObject createLifecycleChildObject() { - String superType = ModelUtil.getSuperType(lifecycleChildClass); - IProject project = (IProject) this.getPage().getEditor().getAdapter( - IProject.class); + IProject project = (IProject) this.getPage().getEditor().getAdapter(IProject.class); + String superType = ModelUtil.getSuperType(lifecycleChildClass, JSFVersion.valueOfProject(project)); String result = DialogUtil.openClassDialog(getSection().getShell(), project, superType, IJavaElementSearchConstants.CONSIDER_ALL_TYPES); diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/RenderkitGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/RenderkitGeneralSection.java index a9bc756d9..4d073449e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/RenderkitGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/RenderkitGeneralSection.java @@ -27,6 +27,7 @@ import org.eclipse.jst.jsf.common.ui.internal.dialogfield.IDialogFieldApplyListener; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.LayoutUtil; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.StringDialogField; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType; import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory; @@ -200,8 +201,8 @@ public void dialogFieldApplied(DialogField field) { renderkitClassField .setLabelText(EditorMessages.RenderKitGeneralSection_Label_RenderKitClass); renderkitClassField.doFillIntoGrid(toolkit, container, numberOfColumns); - renderkitClassField.setProject((IProject) getPage().getEditor() - .getAdapter(IProject.class)); + IProject project = getPage().getEditor().getAdapter(IProject.class); + renderkitClassField.setProject(project); LayoutUtil.setHorizontalGrabbing(renderkitClassField.getTextControl( toolkit, container)); @@ -229,7 +230,10 @@ public void dialogFieldApplied(DialogField field) { } }); renderkitClassField - .setSuperClassName(IFacesConfigConstants.RENDER_KIT_SUPER_CLASS); + .setSuperClassName( + JSFVersion.guessAtLeast(JSFVersion.V3_0, project) ? + IFacesConfigConstants.RENDER_KIT_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.RENDER_KIT_SUPER_CLASS); } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ValidatorGeneralSection.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ValidatorGeneralSection.java index 209661203..bcf79b457 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ValidatorGeneralSection.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ValidatorGeneralSection.java @@ -27,6 +27,7 @@ import org.eclipse.jst.jsf.common.ui.internal.dialogfield.IDialogFieldApplyListener; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.LayoutUtil; import org.eclipse.jst.jsf.common.ui.internal.dialogfield.StringDialogField; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType; import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory; @@ -200,8 +201,8 @@ public void dialogFieldApplied(DialogField field) { // validatorClassField.setRequired(true); validatorClassField .setLabelText(EditorMessages.ValidatorGeneralSection_Label_ValidatorClass); - validatorClassField.setProject((IProject) getPage().getEditor() - .getAdapter(IProject.class)); + IProject project = getPage().getEditor().getAdapter(IProject.class); + validatorClassField.setProject(project); validatorClassField.doFillIntoGrid(toolkit, container, numberOfColumns); LayoutUtil.setHorizontalGrabbing(validatorClassField.getTextControl( toolkit, container)); @@ -230,7 +231,9 @@ public void dialogFieldApplied(DialogField field) { } }); validatorClassField - .setInterface(IFacesConfigConstants.VALIDATOR_INTERFACE); + .setInterface(JSFVersion.guessAtLeast(JSFVersion.V3_0, project) ? + IFacesConfigConstants.VALIDATOR_INTERFACE_JAKARTA : + IFacesConfigConstants.VALIDATOR_INTERFACE); } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/util/ModelUtil.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/util/ModelUtil.java index 1a8cd858d..03ab78427 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/util/ModelUtil.java +++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/util/ModelUtil.java @@ -13,6 +13,7 @@ *******************************************************************************/ package org.eclipse.jst.jsf.facesconfig.ui.util; +import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; import org.eclipse.jst.jsf.facesconfig.ui.IFacesConfigConstants; @@ -42,42 +43,57 @@ public class ModelUtil { * the EClass object of the application child. * @return the expected super type for a particular element * TODO: could make common with the faces-config validator + * @deprecated use getSuperType(Object, JSFVersion) instead of this */ public static String getSuperType(Object key) { + return getSuperType(key, JSFVersion.V2_3); + } + + public static String getSuperType(Object key, JSFVersion jsfVersion) { + boolean isJakartaEE = jsfVersion != null && jsfVersion.compareTo(JSFVersion.V3_0) >= 0; if (key == FacesConfigPackage.eINSTANCE.getActionListenerType()) { - return IFacesConfigConstants.ACTION_LISTENER_INTERFACE; + return isJakartaEE ? IFacesConfigConstants.ACTION_LISTENER_INTERFACE_JAKARTA : + IFacesConfigConstants.ACTION_LISTENER_INTERFACE; } if (key == FacesConfigPackage.eINSTANCE.getNavigationHandlerType()) { - return IFacesConfigConstants.NAVIGATION_HANDLE_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.NAVIGATION_HANDLE_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.NAVIGATION_HANDLE_SUPER_CLASS; } if (key == FacesConfigPackage.eINSTANCE.getPropertyResolverType()) { - return IFacesConfigConstants.PROPERTY_RESOLVER_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.PROPERTY_RESOLVER_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.PROPERTY_RESOLVER_SUPER_CLASS; } if (key == FacesConfigPackage.eINSTANCE.getStateManagerType()) { - return IFacesConfigConstants.STATE_MANAGER_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.STATE_MANAGER_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.STATE_MANAGER_SUPER_CLASS; } if (key == FacesConfigPackage.eINSTANCE.getVariableResolverType()) { - return IFacesConfigConstants.VARIABLE_RESOLVER_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.VARIABLE_RESOLVER_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.VARIABLE_RESOLVER_SUPER_CLASS; } if (key == FacesConfigPackage.eINSTANCE.getViewHandlerType()) { - return IFacesConfigConstants.VIEW_HANDLER_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.VIEW_HANDLER_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.VIEW_HANDLER_SUPER_CLASS; } - if (key == FacesConfigPackage.eINSTANCE.getApplicationFactoryType()) { - return IFacesConfigConstants.APPLICATION_FACTORY_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.APPLICATION_FACTORY_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.APPLICATION_FACTORY_SUPER_CLASS; } if (key == FacesConfigPackage.eINSTANCE.getFacesContextFactoryType()) { - return IFacesConfigConstants.FACES_CONTEXT_FACTORY_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.FACES_CONTEXT_FACTORY_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.FACES_CONTEXT_FACTORY_SUPER_CLASS; } if (key == FacesConfigPackage.eINSTANCE.getLifecycleFactoryType()) { - return IFacesConfigConstants.LIFECYCLE_FACTORY_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.LIFECYCLE_FACTORY_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.LIFECYCLE_FACTORY_SUPER_CLASS; } if (key == FacesConfigPackage.eINSTANCE.getRenderKitFactoryType()) { - return IFacesConfigConstants.RENDER_KIT_FACTORY_SUPER_CLASS; + return isJakartaEE ? IFacesConfigConstants.RENDER_KIT_FACTORY_SUPER_CLASS_JAKARTA : + IFacesConfigConstants.RENDER_KIT_FACTORY_SUPER_CLASS; } - if (key == FacesConfigPackage.eINSTANCE.getPhaseListenerType()) { - return IFacesConfigConstants.PHASE_LISTENER_INTERFACE; + return isJakartaEE ? IFacesConfigConstants.PHASE_LISTENER_INTERFACE_JAKARTA : + IFacesConfigConstants.PHASE_LISTENER_INTERFACE; } return null; diff --git a/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/jsf_core.xml b/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/jsf_core.xml index 4a55d3b6c..34b4128ba 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/jsf_core.xml +++ b/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/jsf_core.xml @@ -149,17 +149,10 @@ default - + - org.eclipse.jst.jsf.core.attributevalues.StringType - - - - - date - time - both + org.eclipse.jst.jsf.core.attributevalues.DateTimeType diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/META-INF/MANIFEST.MF b/jsf/plugins/org.eclipse.jst.jsf.ui/META-INF/MANIFEST.MF index 3a57c2585..0259f2a3b 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.ui/META-INF/MANIFEST.MF +++ b/jsf/plugins/org.eclipse.jst.jsf.ui/META-INF/MANIFEST.MF @@ -20,17 +20,20 @@ Require-Bundle: org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)", org.eclipse.wst.xml.ui;bundle-version="[1.0.100,2.0.0)", org.eclipse.wst.sse.ui;bundle-version="[1.0.101,2.0.0)", org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)", - org.eclipse.jst.jsp.ui;bundle-version="[1.3.0,2.0.0)", + org.eclipse.jst.jsf.ui;bundle-version="[1.3.0,2.0.0)", org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)", org.eclipse.wst.sse.core;bundle-version="[1.0.101,2.0.0)", org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)", org.eclipse.jst.jsf.common.runtime;bundle-version="[1.0.0,2.0.0)", + org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)", org.eclipse.jst.jsp.core;bundle-version="[1.1.0,2.0.0)", + org.eclipse.jst.jsp.ui;bundle-version="[1.1.0,2.0.0)", org.eclipse.wst.validation;bundle-version="[1.1.0,2.0.0)", org.eclipse.jst.jsf.common.ui;bundle-version="[1.0.1,2.0.0)", org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)", org.eclipse.jst.common.project.facet.ui;bundle-version="[1.3.1,2.0.0)", - org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.100,2.0.0)" + org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.100,2.0.0)", + org.eclipse.wst.html.core Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.jst.jsf.ui.internal;x-friends:="org.eclipse.jst.jsf.ui.tests", org.eclipse.jst.jsf.ui.internal.classpath;x-friends:="org.eclipse.jst.jsf.ui.tests", @@ -45,3 +48,8 @@ Export-Package: org.eclipse.jst.jsf.ui.internal;x-friends:="org.eclipse.jst.jsf. org.eclipse.jst.jsf.ui.internal.tagregistry;x-internal:=true, org.eclipse.jst.jsf.ui.internal.validation;x-internal:=true Bundle-RequiredExecutionEnvironment: JavaSE-17 +Import-Package: org.eclipse.ui.texteditor.templates, + org.eclipse.wst.css.core.text, + org.eclipse.wst.css.ui, + org.eclipse.wst.html.core.text, + org.eclipse.wst.html.ui diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/icons/full/etool16/newjsf_wiz.gif b/jsf/plugins/org.eclipse.jst.jsf.ui/icons/full/etool16/newjsf_wiz.gif new file mode 100644 index 000000000..48109ffd0 Binary files /dev/null and b/jsf/plugins/org.eclipse.jst.jsf.ui/icons/full/etool16/newjsf_wiz.gif differ diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/icons/full/wizban/newjsffile_wiz.png b/jsf/plugins/org.eclipse.jst.jsf.ui/icons/full/wizban/newjsffile_wiz.png new file mode 100644 index 000000000..07de2fcb1 Binary files /dev/null and b/jsf/plugins/org.eclipse.jst.jsf.ui/icons/full/wizban/newjsffile_wiz.png differ diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/plugin.properties b/jsf/plugins/org.eclipse.jst.jsf.ui/plugin.properties index bb8393c5f..dbc967c83 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.ui/plugin.properties +++ b/jsf/plugins/org.eclipse.jst.jsf.ui/plugin.properties @@ -10,38 +10,43 @@ # Contributors: # Gerry Kessler - initial API and implementation ############################################################################### + +#org.eclipse.ui.newWizards extension point +_UI_WIZARD_NAME = JSF File +_UI_WIZARD_CREATE_NEW_FILE = Create a new JSF file + +JSF_New_context_type_Extension_Element.name=New JSF + plugin.name=JSF Tools - UI plugin.provider=Eclipse Web Tools Platform -EL_Hyperlinkdetector_name=JSP EL Hyperlink Detector +EL_Hyperlinkdetector_name=JSF EL Hyperlink Detector jsf.library.reference=JSF Library References jsf.library.wizard.name=JSF Library preferencepage.jsfvalidation.name=Validation -preferencepage.jsf.name=JavaServer Faces Tools +preferencepage.jsf.name=JSF Files -jsf.ui.views.category.name=JavaServer Faces +jsf.ui.views.category.name=Jakarta Faces jsf.ui.views.componentview.name=JSF Component Tree jsf.ui.views.jsftagregistry.name=Tag Registry JSFNonELAttributeValueValidator=JSF View Validator JSFAppConfigValidator=JSF Application Configuration Validator -JSPSemanticsValidatorMarker=JSF Problem +JSFSemanticsValidatorMarker=JSF Problem -View_Preference_Root=Views -JSP_Tag_Registry_Preferences=JSP Tag Registry +JSF_Tag_Registry_Preferences=JSF Tag Registry +JSF_Templates.name=Templates -NewJSFPage_html=New JavaServer Faces (JSF) Page (html) -NewJSFPage_xhtml=New JavaServer Faces (JSF) Page (xhtml) -NewJSFPage_xhtml_xmlsyntax=New JavaServer Faces (JSF) Page (xhtml, xml syntax) +NewJSF40Page=New JSF 4.0 Page +NewJSF40Page_description=Jakarta Faces Page with JSF 4.0 markup -NewJSFPage_html_description=JSP with html markup and default view setup -NewJSFPage_xhtml_description=JSP with xhtml markup and default view setup -NewJSFPage_xhtml_xmlsyntax_description=JSP with xhtml markup, xml style syntax and default view setup +NewJSF30Page=New JSF 3.0 Page +NewJSF30Page_description=Jakarta Faces Page with JSF 3.0 markup NewELExpression=New JSF EL Expression NewELExpression_description=Create a new attribute value with #{} -jsf.library.property.page = Java Server Faces +jsf.library.property.page = Jakarta Faces diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/plugin.xml b/jsf/plugins/org.eclipse.jst.jsf.ui/plugin.xml index 6048e44c0..f2b6e4071 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.ui/plugin.xml +++ b/jsf/plugins/org.eclipse.jst.jsf.ui/plugin.xml @@ -1,6 +1,37 @@ + + + + %_UI_WIZARD_CREATE_NEW_FILE + + + + + + + + + + + + + + + @@ -11,21 +42,22 @@ name="%preferencepage.jsfvalidation.name"/> + id="org.eclipse.jst.jsf.ui.jsfTagRegistry" + name="%JSF_Tag_Registry_Preferences"> + class="org.eclipse.jst.jsf.ui.internal.preferences.ui.JSFTemplatePreferencePage" + id="org.eclipse.wst.sse.ui.preferences.jsf.templates"> + @@ -53,39 +85,15 @@ - + - - - - - - - - - - - - - - - - + target="org.eclipse.jst.jsf.core.jsfsource"/> + id="org.eclipse.jst.jsf.core.jsfsource"> @@ -121,7 +129,7 @@ class="org.eclipse.jst.jsf.ui.internal.jspeditor.JSPELHyperlinkDetector" id="org.eclipse.jst.jsf.ui.elhyperlinkdetector" name="%EL_Hyperlinkdetector_name" - targetId="org.eclipse.jst.jsp.core.jspsource"> + targetId="org.eclipse.jst.jsf.core.jsfsource"> @@ -205,11 +213,11 @@ + id="org.eclipse.jst.jsf.core.jsfsource"> + id="org.eclipse.jst.jsf.core.jsffragmentsource"> @@ -246,92 +254,55 @@ + - -