diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view')
47 files changed, 784 insertions, 1070 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/AbstractDTViewHandler.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/AbstractDTViewHandler.java index ba605b879..e40b3c403 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/AbstractDTViewHandler.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/AbstractDTViewHandler.java @@ -39,7 +39,7 @@ public abstract class AbstractDTViewHandler implements IDTViewHandler /** * the path separator */ - public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$ + public static final String PATH_SEPARATOR = "/"; public abstract String calculateLocale(DTFacesContext context) throws ViewHandlerException; @@ -49,14 +49,14 @@ public abstract class AbstractDTViewHandler implements IDTViewHandler { if (_isDisposed.get()) { - throw new IllegalStateException("View handler is disposed"); //$NON-NLS-1$ + throw new IllegalStateException("View handler is disposed"); } final DTUIViewRoot viewRoot = internalCreateView(facesContext, viewId); if (viewRoot == null) { - throw new ViewHandlerException("Problem in createView", Cause.UNABLE_TO_CREATE_VIEW); //$NON-NLS-1$ + throw new ViewHandlerException("Problem in createView", Cause.UNABLE_TO_CREATE_VIEW); } viewRoot.setViewId(viewId); final VersionStamp versionStamp = createVersionStamp(facesContext, @@ -64,7 +64,7 @@ public abstract class AbstractDTViewHandler implements IDTViewHandler if (versionStamp == null) { throw new ViewHandlerException(new Throwable( - "Bad version stamp detected"), Cause.BAD_VERSION_STAMP); //$NON-NLS-1$ + "Bad version stamp detected"), Cause.BAD_VERSION_STAMP); } viewRoot.setVersionStamp(versionStamp); @@ -74,7 +74,7 @@ public abstract class AbstractDTViewHandler implements IDTViewHandler if (advisor == null) { throw new ViewHandlerException(new Throwable( - "Bad staleness advisor"), Cause.BAD_STALENESS_ADVISOR); //$NON-NLS-1$ + "Bad staleness advisor"), Cause.BAD_STALENESS_ADVISOR); } viewRoot.setStalenessAdvisor(advisor); @@ -171,7 +171,7 @@ public abstract class AbstractDTViewHandler implements IDTViewHandler public String getViewId(final DTFacesContext context, final IResource res) { // TODO: sync with WebrootUtil? - String strWebrootPath = ""; //$NON-NLS-1$ + String strWebrootPath = ""; final IProject project = res.getProject(); final IPath path = res.getFullPath(); final IPath webContentPath = getWebContentPath(project); @@ -213,7 +213,7 @@ public abstract class AbstractDTViewHandler implements IDTViewHandler */ protected NullViewRoot() { - super(null, null, new ComponentTypeInfo("", "", "","")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + super(null, null, new ComponentTypeInfo("", "", "","")); } @Override diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java index 2e1a87bab..589e05f71 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java @@ -86,81 +86,70 @@ public final class DTComponentIntrospector final String className, final IProject project, final IConfigurationContributor[] contributors) { - ProxyFactoryRegistry registry = null; - try + final ProxyFactoryRegistry registry = getProxyFactoryRegistry(project, + contributors); + + if (registry != null) { - registry = getProxyFactoryRegistry(project, - contributors); - - if (registry != null) + final IStandardBeanTypeProxyFactory factory = registry + .getBeanTypeProxyFactory(); + final IBeanTypeProxy classTypeProxy = factory + .getBeanTypeProxy(className); + final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper( + classTypeProxy); + + String family = null; + String renderer = null; + try { - final IStandardBeanTypeProxyFactory factory = registry - .getBeanTypeProxyFactory(); - final IBeanTypeProxy classTypeProxy = factory - .getBeanTypeProxy(className); - final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper(project, - classTypeProxy); - - String family = null; - String renderer = null; - try - { - classTypeWrapper.init(); - family = classTypeWrapper.callStringMethod("getFamily"); //$NON-NLS-1$ - renderer = classTypeWrapper.callStringMethod("getRendererType"); //$NON-NLS-1$ - } - catch (ProxyException e1) - { - // fall through - if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR) - { - JSFCoreTraceOptions.log("DTComponentIntrospector.getComponent:", e1); //$NON-NLS-1$ - } - } - - IType type = null; - - try + classTypeWrapper.init(); + family = classTypeWrapper.callStringMethod("getFamily"); + renderer = classTypeWrapper.callStringMethod("getRendererType"); + } + catch (ProxyException e1) + { + // fall through + if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR) { - type = JavaCore.create(project).findType(className); + JSFCoreTraceOptions.log("DTComponentIntrospector.getComponent:", e1); } - catch (JavaModelException e) + } + + IType type = null; + + try + { + type = JavaCore.create(project).findType(className); + } + catch (JavaModelException e) + { + // fall through; + } + + List<String> interfaces = new ArrayList<String>(); + List<String> superClasses = new ArrayList<String>(); + + if (type != null) + { + TypeInfoCache typeCache = getSharedTypeCache(); + + IType[] interfaceTypes = typeCache.cacheInterfaceTypesFor(type); + for (IType interfaze : interfaceTypes) { - // fall through; + interfaces.add(interfaze.getFullyQualifiedName()); } - - List<String> interfaces = new ArrayList<String>(); - List<String> superClasses = new ArrayList<String>(); - - if (type != null) + + IType[] superClassTypes = typeCache.cacheSupertypesFor(type); + + for (IType superClass : superClassTypes) { - TypeInfoCache typeCache = getSharedTypeCache(); - - IType[] interfaceTypes = typeCache.cacheInterfaceTypesFor(type); - for (IType interfaze : interfaceTypes) - { - interfaces.add(interfaze.getFullyQualifiedName()); - } - - IType[] superClassTypes = typeCache.cacheSupertypesFor(type); - - for (IType superClass : superClassTypes) - { - superClasses.add(superClass.getFullyQualifiedName()); - } + superClasses.add(superClass.getFullyQualifiedName()); } - - return new ComponentTypeInfo(classType, className, superClasses - .toArray(new String[0]), interfaces.toArray(new String[0]), - family, renderer); - } - } - finally - { - if (registry != null) - { - registry.terminateRegistry(true); } + + return new ComponentTypeInfo(classType, className, superClasses + .toArray(new String[0]), interfaces.toArray(new String[0]), + family, renderer); } return null; } @@ -364,7 +353,7 @@ public final class DTComponentIntrospector } catch (JavaModelException e) { - JSFCorePlugin.log("Error finding component type", e); //$NON-NLS-1$ + JSFCorePlugin.log("Error finding component type", e); } return properties; @@ -387,7 +376,7 @@ public final class DTComponentIntrospector } catch (final CoreException e) { - JSFCorePlugin.log("Error starting vm for project: " //$NON-NLS-1$ + JSFCorePlugin.log("Error starting vm for project: " + project.getName(), e); } 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 02ba0eb38..29a4219cf 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 @@ -34,8 +34,8 @@ public class DefaultDTUIViewRoot extends DTUIViewRoot public DefaultDTUIViewRoot() { // 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("javax.faces.ViewRoot", + "javax.faces.component.UIViewRoot", "javax.faces.ViewRoot", null)); _defaultServices = new DefaultServices(); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DefaultDTViewHandler.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DefaultDTViewHandler.java index d081f91f0..537355ad5 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DefaultDTViewHandler.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DefaultDTViewHandler.java @@ -140,7 +140,7 @@ public class DefaultDTViewHandler extends AbstractDTViewHandler } catch (final ViewHandlerException vhe) { - JSFCorePlugin.log(vhe, "While acquiring view adapter"); //$NON-NLS-1$ + JSFCorePlugin.log(vhe, "While acquiring view adapter"); } // not found or failed @@ -176,7 +176,7 @@ public class DefaultDTViewHandler extends AbstractDTViewHandler IStatus.WARNING, String .format( - "Could not get view adapter to construct design time view root for %s", //$NON-NLS-1$ + "Could not get view adapter to construct design time view root for %s", viewId)); } else @@ -186,13 +186,13 @@ public class DefaultDTViewHandler extends AbstractDTViewHandler IStatus.WARNING, String .format( - "Could not get view adapter factory toconstruct design time view root for %s", //$NON-NLS-1$ + "Could not get view adapter factory toconstruct design time view root for %s", viewId)); } } catch (final ViewHandlerException e) { - JSFCorePlugin.log(e, "While acquiring view defn adapter factory"); //$NON-NLS-1$ + JSFCorePlugin.log(e, "While acquiring view defn adapter factory"); // fall-through } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/JSPViewDefnAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/JSPViewDefnAdapter.java index da8825cf2..13d9e2911 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/JSPViewDefnAdapter.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/JSPViewDefnAdapter.java @@ -79,11 +79,11 @@ public class JSPViewDefnAdapter extends TaglibBasedViewDefnAdapter } catch (final IOException e) { - JSFCorePlugin.log(e, "Acquiring model for view root"); //$NON-NLS-1$ + JSFCorePlugin.log(e, "Acquiring model for view root"); } catch (final CoreException e) { - JSFCorePlugin.log(e, "Acquiring model for view root"); //$NON-NLS-1$ + JSFCorePlugin.log(e, "Acquiring model for view root"); } finally { @@ -201,7 +201,7 @@ public class JSPViewDefnAdapter extends TaglibBasedViewDefnAdapter @Override public String getGeneratedIdPrefix() { - return "_idJsp"; //$NON-NLS-1$ + return "_idJsp"; } @Override 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 49737f55f..9139646ef 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 @@ -132,7 +132,7 @@ public class XMLComponentTreeConstructionStrategy extends { final ComponentInfo topLevelChild = (ComponentInfo) it.next(); - if ("javax.faces.ViewRoot".equals(topLevelChild //$NON-NLS-1$ + if ("javax.faces.ViewRoot".equals(topLevelChild .getComponentTypeInfo().getComponentType())) { foundRoot = topLevelChild; diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewDefnAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewDefnAdapter.java index 6e2176bd9..842f92ccb 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewDefnAdapter.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewDefnAdapter.java @@ -47,7 +47,7 @@ import org.w3c.dom.Node; public abstract class XMLViewDefnAdapter extends AbstractViewDefnAdapter<Node, IDocument> { - private static final String GENERATED_ID = "_generatedId"; //$NON-NLS-1$ + private static final String GENERATED_ID = "_generatedId"; @Override public abstract IDocument getContainer(DTFacesContext context, String viewId); @@ -58,10 +58,10 @@ public abstract class XMLViewDefnAdapter extends { if (viewDefnObject instanceof Element) { - return ((Element) viewDefnObject).getAttribute("id"); //$NON-NLS-1$ + return ((Element) viewDefnObject).getAttribute("id"); } throw new IllegalArgumentException( - "Only Elements can define view object ids"); //$NON-NLS-1$ + "Only Elements can define view object ids"); } @Override 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 1336157a7..163cae9a5 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 @@ -58,7 +58,7 @@ import org.w3c.dom.NamedNodeMap; public class XMLViewObjectConstructionStrategy extends ViewObjectConstructionStrategy<Element> { - private static final String GENERATED_ID = "_generatedId"; //$NON-NLS-1$ + private static final String GENERATED_ID = "_generatedId"; private final ComponentConstructionData _constructionData; private final XMLViewDefnAdapter _adapter; private final XMLViewObjectMappingService _mappingService; @@ -79,7 +79,7 @@ public class XMLViewObjectConstructionStrategy extends if (adapter == null || constructionData == null) { throw new IllegalArgumentException( - "adapter and constructionData must not be null"); //$NON-NLS-1$ + "adapter and constructionData must not be null"); } _constructionData = constructionData; _adapter = adapter; @@ -103,7 +103,7 @@ public class XMLViewObjectConstructionStrategy extends final ComponentTypeInfo typeInfo = ((IComponentTagElement) tagElement) .getComponent(); - if (!"javax.faces.ViewRoot".equals(typeInfo.getComponentType())) //$NON-NLS-1$ + if (!"javax.faces.ViewRoot".equals(typeInfo.getComponentType())) { id = calculateId(element, _constructionData); } @@ -145,7 +145,7 @@ public class XMLViewObjectConstructionStrategy extends catch (final Exception e) { // log and ignore if an individual construction fails - JSFCorePlugin.log(e, "Error constructing view object"); //$NON-NLS-1$ + JSFCorePlugin.log(e, "Error constructing view object"); } return null; } @@ -176,10 +176,10 @@ public class XMLViewObjectConstructionStrategy extends populateInitMap(uri, initMap, srcElement, tagElement, attributeToPropertyMap); - if (initMap.get("id") == null) //$NON-NLS-1$ + if (initMap.get("id") == null) { // id must be set - initMap.put("id", id); //$NON-NLS-1$ + initMap.put("id", id); } final ComponentTypeInfo typeInfo = tagElement.getComponent(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectMappingService.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectMappingService.java index 855aad4ca..362fc56b3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectMappingService.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectMappingService.java @@ -67,11 +67,11 @@ public final class XMLViewObjectMappingService implements Serializable { if (elementData == null) { - throw new IllegalArgumentException("elementData cannot be null"); //$NON-NLS-1$ + throw new IllegalArgumentException("elementData cannot be null"); } else if (viewObject == null) { - throw new IllegalArgumentException("viewObject cannot be null"); //$NON-NLS-1$ + throw new IllegalArgumentException("viewObject cannot be null"); } synchronized(this) @@ -101,7 +101,7 @@ public final class XMLViewObjectMappingService implements Serializable { if (elementData == null) { - throw new IllegalArgumentException("elementData mustn't be null"); //$NON-NLS-1$ + throw new IllegalArgumentException("elementData mustn't be null"); } ViewObject viewObject = null; @@ -124,7 +124,7 @@ public final class XMLViewObjectMappingService implements Serializable { if (viewObject == null) { - throw new IllegalArgumentException("elementData mustn't be null"); //$NON-NLS-1$ + throw new IllegalArgumentException("elementData mustn't be null"); } ElementData elementData = null; @@ -184,22 +184,22 @@ public final class XMLViewObjectMappingService implements Serializable catch (CoreException ce) { JSFCorePlugin.log(ce, - "While finding element for viewObject: " //$NON-NLS-1$ - + viewObject.toString() + " in " //$NON-NLS-1$ + "While finding element for viewObject: " + + viewObject.toString() + " in " + file.getFullPath()); } catch (IOException e) { JSFCorePlugin.log(e, - "While finding element for viewObject: " //$NON-NLS-1$ - + viewObject.toString() + " in " //$NON-NLS-1$ + "While finding element for viewObject: " + + viewObject.toString() + " in " + file.getFullPath()); } catch (NoElementException e) { JSFCorePlugin.log(e, - "While finding element for viewObject: " //$NON-NLS-1$ - + viewObject.toString() + " in " //$NON-NLS-1$ + "While finding element for viewObject: " + + viewObject.toString() + " in " + file.getFullPath()); } finally diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataGenerator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataGenerator.java index 975775f50..919d54f28 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataGenerator.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataGenerator.java @@ -50,7 +50,7 @@ public class ViewMetadataGenerator { _root = MetadataFactory.eINSTANCE.createModel(); _root.setId(uri); - _root.setType("tagFile"); //$NON-NLS-1$ + _root.setType("tagFile"); _resourceSet = new ResourceSetImpl(); _mapper = new ViewMetadataMapper(); _extendedMetadata = new BasicExtendedMetaData(_resourceSet @@ -102,7 +102,7 @@ public class ViewMetadataGenerator final Entity entity = MetadataFactory.eINSTANCE.createEntity(); entity.setId(tagName); - entity.setType("tag"); //$NON-NLS-1$ + entity.setType("tag"); entity.getTraits().add(trait); _root.getChildEntities().add(entity); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataLoader.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataLoader.java index d892bddc6..b422bb87c 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataLoader.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataLoader.java @@ -81,7 +81,7 @@ public class ViewMetadataLoader final ITaglibDomainMetaDataModelContext modelContext = createMetadataContext(tagId .getUri()); final Entity entity = TaglibDomainMetaDataQueryHelper.getEntity( - modelContext, tagId.getTagName()+"/"+name); //$NON-NLS-1$ + modelContext, tagId.getTagName()+"/"+name); if (entity != null) { final Trait trait = TaglibDomainMetaDataQueryHelper.getTrait( diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/mappers/ValueHolderAttributeMapper.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/mappers/ValueHolderAttributeMapper.java index 016b82107..7a2753665 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/mappers/ValueHolderAttributeMapper.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/mappers/ValueHolderAttributeMapper.java @@ -32,7 +32,7 @@ public class ValueHolderAttributeMapper extends CustomViewMappingAdapter { final String name = attr.getNodeName(); - if ("converter".equals(name) //$NON-NLS-1$ + if ("converter".equals(name) && bestComponent.getComponentTypeInfo().isInstanceOf( ComponentFactory.INTERFACE_VALUEHOLDER)) { @@ -42,7 +42,7 @@ public class ValueHolderAttributeMapper extends CustomViewMappingAdapter { ConverterTypeInfo typeInfo = null; - if (!value.startsWith("#{")) //$NON-NLS-1$ + if (!value.startsWith("#{")) { typeInfo = new ConverterTypeInfo(null, value); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingPackage.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingPackage.java index 886250790..e340b4f30 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingPackage.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingPackage.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: ComponentMappingPackage.java,v 1.2 2008/11/18 22:24:15 gkessler Exp $ + * $Id: ComponentMappingPackage.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; @@ -34,7 +34,7 @@ public interface ComponentMappingPackage extends EPackage * <!-- end-user-doc --> * @generated */ - String eNAME = "viewmapping"; //$NON-NLS-1$ + String eNAME = "viewmapping"; /** * The package namespace URI. @@ -42,7 +42,7 @@ public interface ComponentMappingPackage extends EPackage * <!-- end-user-doc --> * @generated */ - String eNS_URI = "http://org.eclipse.jst.jsf.core/componentMapping.ecore"; //$NON-NLS-1$ + String eNS_URI = "http://org.eclipse.jst.jsf.core/componentMapping.ecore"; /** * The package namespace name. @@ -50,7 +50,7 @@ public interface ComponentMappingPackage extends EPackage * <!-- end-user-doc --> * @generated */ - String eNS_PREFIX = "viewMap"; //$NON-NLS-1$ + String eNS_PREFIX = "viewMap"; /** * The singleton instance of the package. diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/CustomViewMapperExtensionLoader.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/CustomViewMapperExtensionLoader.java index 5e9de9062..540a76158 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/CustomViewMapperExtensionLoader.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/CustomViewMapperExtensionLoader.java @@ -27,8 +27,8 @@ import org.eclipse.jst.jsf.designtime.internal.view.mapping.ICustomViewMapper; */ public class CustomViewMapperExtensionLoader { - private final static String EXTENSION_ID = "customViewMapper"; //$NON-NLS-1$ - private final static String ELEMENT_NAME = "customViewMapper"; //$NON-NLS-1$ + private final static String EXTENSION_ID = "customViewMapper"; + private final static String ELEMENT_NAME = "customViewMapper"; private static Map<String, ICustomViewMapper> _extensions; @@ -67,30 +67,30 @@ public class CustomViewMapperExtensionLoader { final String pluginId = element.getContributor() .getName(); - final String name = element.getAttribute("id"); //$NON-NLS-1$ + final String name = element.getAttribute("id"); final Object customHandler = element - .createExecutableExtension("class"); //$NON-NLS-1$ + .createExecutableExtension("class"); if (customHandler instanceof ICustomViewMapper && name != null) { - handlers.put(pluginId + "." + name, //$NON-NLS-1$ + handlers.put(pluginId + "." + name, (ICustomViewMapper) customHandler); } else { JSFCorePlugin.log( - "Error loading tag registry extension: " //$NON-NLS-1$ + "Error loading tag registry extension: " + element.getContributor().getName() - + "." + element.getAttribute("id") //$NON-NLS-1$ //$NON-NLS-2$ - , new Throwable("No exception: stack trace only")); //$NON-NLS-1$ + + "." + element.getAttribute("id") + , new Throwable("No exception: stack trace only")); } } catch (final CoreException e) { JSFCorePlugin.log(e, - "Error loading tag registry extension: " //$NON-NLS-1$ + "Error loading tag registry extension: " + element.getContributor().getName() - + "." + element.getAttribute("id")); //$NON-NLS-1$ //$NON-NLS-2$ + + "." + element.getAttribute("id")); } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/AttributeToPropertyMappingImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/AttributeToPropertyMappingImpl.java index 953109921..b39915897 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/AttributeToPropertyMappingImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/AttributeToPropertyMappingImpl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: AttributeToPropertyMappingImpl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: AttributeToPropertyMappingImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -280,11 +280,11 @@ public class AttributeToPropertyMappingImpl extends EObjectImpl implements Attri if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (propertyName: "); //$NON-NLS-1$ + result.append(" (propertyName: "); result.append(propertyName); - result.append(", elAllowed: "); //$NON-NLS-1$ + result.append(", elAllowed: "); result.append(elAllowed); - result.append(", customConversionFactoryId: "); //$NON-NLS-1$ + result.append(", customConversionFactoryId: "); result.append(customConversionFactoryId); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ClassTypeInfo_Impl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ClassTypeInfo_Impl.java index c81344b9e..b5607fb19 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ClassTypeInfo_Impl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ClassTypeInfo_Impl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: ClassTypeInfo_Impl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: ClassTypeInfo_Impl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -251,11 +251,11 @@ public class ClassTypeInfo_Impl extends EObjectImpl implements ClassTypeInfo_ if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (className: "); //$NON-NLS-1$ + result.append(" (className: "); result.append(className); - result.append(", superClasses: "); //$NON-NLS-1$ + result.append(", superClasses: "); result.append(superClasses); - result.append(", interfaces: "); //$NON-NLS-1$ + result.append(", interfaces: "); result.append(interfaces); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingFactoryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingFactoryImpl.java index 82bce6e36..5cb08177b 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingFactoryImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingFactoryImpl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: ComponentMappingFactoryImpl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: ComponentMappingFactoryImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -35,7 +35,7 @@ public class ComponentMappingFactoryImpl extends EFactoryImpl implements Compone { try { - ComponentMappingFactory theComponentMappingFactory = (ComponentMappingFactory)EPackage.Registry.INSTANCE.getEFactory("http://org.eclipse.jst.jsf.core/componentMapping.ecore"); //$NON-NLS-1$ + ComponentMappingFactory theComponentMappingFactory = (ComponentMappingFactory)EPackage.Registry.INSTANCE.getEFactory("http://org.eclipse.jst.jsf.core/componentMapping.ecore"); if (theComponentMappingFactory != null) { return theComponentMappingFactory; @@ -77,7 +77,7 @@ public class ComponentMappingFactoryImpl extends EFactoryImpl implements Compone case ComponentMappingPackage.VALIDATOR_TYPE_INFO_: return createValidatorTypeInfo_(); case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING: return createAttributeToPropertyMapping(); default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingPackageImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingPackageImpl.java index 3debd70fc..5d73875f9 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingPackageImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingPackageImpl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: ComponentMappingPackageImpl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: ComponentMappingPackageImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -497,41 +497,41 @@ public class ComponentMappingPackageImpl extends EPackageImpl implements Compone validatorTypeInfo_EClass.getESuperTypes().add(this.getClassTypeInfo_()); // Initialize classes and features; add operations and parameters - initEClass(tagMappingEClass, TagMapping.class, "TagMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEReference(getTagMapping_VersionedTagToViewMappings(), this.getTagToViewObjectMapping(), null, "versionedTagToViewMappings", null, 0, -1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getTagMapping_CustomConversionFactoryId(), ecorePackage.getEString(), "customConversionFactoryId", null, 0, 1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getTagMapping_BeanMappedProperties(), ecorePackage.getEString(), "beanMappedProperties", "", 0, -1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - - EOperation op = addEOperation(tagMappingEClass, null, "findBestMapping", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "jsfVersion", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "libVersion", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ - - initEClass(tagToViewObjectMappingEClass, TagToViewObjectMapping.class, "TagToViewObjectMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEReference(getTagToViewObjectMapping_TypeInfo(), this.getClassTypeInfo_(), null, "typeInfo", null, 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getTagToViewObjectMapping_MinJSFVersion(), ecorePackage.getEString(), "minJSFVersion", "1.1", 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - initEAttribute(getTagToViewObjectMapping_MinLibraryVersion(), ecorePackage.getEString(), "minLibraryVersion", "", 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - - initEClass(classTypeInfo_EClass, ClassTypeInfo_.class, "ClassTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getClassTypeInfo__ClassName(), ecorePackage.getEString(), "className", null, 0, 1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getClassTypeInfo__SuperClasses(), ecorePackage.getEString(), "superClasses", null, 0, -1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getClassTypeInfo__Interfaces(), ecorePackage.getEString(), "interfaces", null, 0, -1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(componentTypeInfo_EClass, ComponentTypeInfo_.class, "ComponentTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getComponentTypeInfo__ComponentType(), ecorePackage.getEString(), "componentType", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getComponentTypeInfo__ComponentFamily(), ecorePackage.getEString(), "componentFamily", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getComponentTypeInfo__RenderType(), ecorePackage.getEString(), "renderType", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(converterTypeInfo_EClass, ConverterTypeInfo_.class, "ConverterTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getConverterTypeInfo__ConverterId(), ecorePackage.getEString(), "converterId", null, 0, 1, ConverterTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getConverterTypeInfo__ForClasses(), ecorePackage.getEString(), "forClasses", null, 0, -1, ConverterTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(validatorTypeInfo_EClass, ValidatorTypeInfo_.class, "ValidatorTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getValidatorTypeInfo__ValidatorId(), ecorePackage.getEString(), "validatorId", null, 0, 1, ValidatorTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(attributeToPropertyMappingEClass, AttributeToPropertyMapping.class, "AttributeToPropertyMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getAttributeToPropertyMapping_PropertyName(), ecorePackage.getEString(), "propertyName", null, 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getAttributeToPropertyMapping_ElAllowed(), ecorePackage.getEBoolean(), "elAllowed", "true", 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - initEAttribute(getAttributeToPropertyMapping_CustomConversionFactoryId(), ecorePackage.getEString(), "customConversionFactoryId", null, 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEClass(tagMappingEClass, TagMapping.class, "TagMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTagMapping_VersionedTagToViewMappings(), this.getTagToViewObjectMapping(), null, "versionedTagToViewMappings", null, 0, -1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTagMapping_CustomConversionFactoryId(), ecorePackage.getEString(), "customConversionFactoryId", null, 0, 1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTagMapping_BeanMappedProperties(), ecorePackage.getEString(), "beanMappedProperties", "", 0, -1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + EOperation op = addEOperation(tagMappingEClass, null, "findBestMapping", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "jsfVersion", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "libVersion", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(tagToViewObjectMappingEClass, TagToViewObjectMapping.class, "TagToViewObjectMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTagToViewObjectMapping_TypeInfo(), this.getClassTypeInfo_(), null, "typeInfo", null, 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTagToViewObjectMapping_MinJSFVersion(), ecorePackage.getEString(), "minJSFVersion", "1.1", 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTagToViewObjectMapping_MinLibraryVersion(), ecorePackage.getEString(), "minLibraryVersion", "", 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(classTypeInfo_EClass, ClassTypeInfo_.class, "ClassTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getClassTypeInfo__ClassName(), ecorePackage.getEString(), "className", null, 0, 1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getClassTypeInfo__SuperClasses(), ecorePackage.getEString(), "superClasses", null, 0, -1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getClassTypeInfo__Interfaces(), ecorePackage.getEString(), "interfaces", null, 0, -1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(componentTypeInfo_EClass, ComponentTypeInfo_.class, "ComponentTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getComponentTypeInfo__ComponentType(), ecorePackage.getEString(), "componentType", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponentTypeInfo__ComponentFamily(), ecorePackage.getEString(), "componentFamily", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponentTypeInfo__RenderType(), ecorePackage.getEString(), "renderType", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(converterTypeInfo_EClass, ConverterTypeInfo_.class, "ConverterTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getConverterTypeInfo__ConverterId(), ecorePackage.getEString(), "converterId", null, 0, 1, ConverterTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getConverterTypeInfo__ForClasses(), ecorePackage.getEString(), "forClasses", null, 0, -1, ConverterTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(validatorTypeInfo_EClass, ValidatorTypeInfo_.class, "ValidatorTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getValidatorTypeInfo__ValidatorId(), ecorePackage.getEString(), "validatorId", null, 0, 1, ValidatorTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeToPropertyMappingEClass, AttributeToPropertyMapping.class, "AttributeToPropertyMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAttributeToPropertyMapping_PropertyName(), ecorePackage.getEString(), "propertyName", null, 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAttributeToPropertyMapping_ElAllowed(), ecorePackage.getEBoolean(), "elAllowed", "true", 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAttributeToPropertyMapping_CustomConversionFactoryId(), ecorePackage.getEString(), "customConversionFactoryId", null, 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Create resource createResource(eNS_URI); @@ -549,150 +549,150 @@ public class ComponentMappingPackageImpl extends EPackageImpl implements Compone */ protected void createExtendedMetaDataAnnotations() { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$ + String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; addAnnotation (getTagMapping_VersionedTagToViewMappings(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "versionedTagToViewMappings" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "versionedTagToViewMappings" }); addAnnotation (getTagMapping_CustomConversionFactoryId(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "customConversionFactoryId" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "customConversionFactoryId" }); addAnnotation (getTagMapping_BeanMappedProperties(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "beanMappedProperties" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "beanMappedProperties" }); addAnnotation (getTagToViewObjectMapping_TypeInfo(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "typeInfo" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "typeInfo" }); addAnnotation (getTagToViewObjectMapping_MinJSFVersion(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "minVersion" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "minVersion" }); addAnnotation (getTagToViewObjectMapping_MinLibraryVersion(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "minLibraryVersion" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "minLibraryVersion" }); addAnnotation (getClassTypeInfo__ClassName(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "className" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "className" }); addAnnotation (getClassTypeInfo__SuperClasses(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "superClasses" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "superClasses" }); addAnnotation (getClassTypeInfo__Interfaces(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "interfaces" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "interfaces" }); addAnnotation (getComponentTypeInfo__ComponentType(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "componentType" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "componentType" }); addAnnotation (getComponentTypeInfo__ComponentFamily(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "componentFamily" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "componentFamily" }); addAnnotation (getComponentTypeInfo__RenderType(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "renderType" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "renderType" }); addAnnotation (getConverterTypeInfo__ConverterId(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "converterId" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "converterId" }); addAnnotation (getConverterTypeInfo__ForClasses(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "forClass" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "forClass" }); addAnnotation (getValidatorTypeInfo__ValidatorId(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "validatorId" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "validatorId" }); addAnnotation (getAttributeToPropertyMapping_PropertyName(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "propertyName" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "propertyName" }); addAnnotation (getAttributeToPropertyMapping_ElAllowed(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "elAllowed" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "elAllowed" }); addAnnotation (getAttributeToPropertyMapping_CustomConversionFactoryId(), source, new String[] { - "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$ - "name", "customConversionFactoryId" //$NON-NLS-1$ //$NON-NLS-2$ + "kind", "element", + "name", "customConversionFactoryId" }); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentTypeInfo_Impl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentTypeInfo_Impl.java index ac318c8dd..ceae1a899 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentTypeInfo_Impl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentTypeInfo_Impl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: ComponentTypeInfo_Impl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: ComponentTypeInfo_Impl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -279,11 +279,11 @@ public class ComponentTypeInfo_Impl extends ClassTypeInfo_Impl implements Compon if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (componentType: "); //$NON-NLS-1$ + result.append(" (componentType: "); result.append(componentType); - result.append(", componentFamily: "); //$NON-NLS-1$ + result.append(", componentFamily: "); result.append(componentFamily); - result.append(", renderType: "); //$NON-NLS-1$ + result.append(", renderType: "); result.append(renderType); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ConverterTypeInfo_Impl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ConverterTypeInfo_Impl.java index 53387ea0d..988532025 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ConverterTypeInfo_Impl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ConverterTypeInfo_Impl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: ConverterTypeInfo_Impl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: ConverterTypeInfo_Impl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -211,9 +211,9 @@ public class ConverterTypeInfo_Impl extends ClassTypeInfo_Impl implements Conver if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (converterId: "); //$NON-NLS-1$ + result.append(" (converterId: "); result.append(converterId); - result.append(", forClasses: "); //$NON-NLS-1$ + result.append(", forClasses: "); result.append(forClasses); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagMappingImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagMappingImpl.java index 44f32b5ce..fedaf6726 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagMappingImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagMappingImpl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: TagMappingImpl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: TagMappingImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -283,9 +283,9 @@ public class TagMappingImpl extends EObjectImpl implements TagMapping if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (customConversionFactoryId: "); //$NON-NLS-1$ + result.append(" (customConversionFactoryId: "); result.append(customConversionFactoryId); - result.append(", beanMappedProperties: "); //$NON-NLS-1$ + result.append(", beanMappedProperties: "); result.append(beanMappedProperties); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagToViewObjectMappingImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagToViewObjectMappingImpl.java index de7b3321e..dbaaa73c2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagToViewObjectMappingImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagToViewObjectMappingImpl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: TagToViewObjectMappingImpl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: TagToViewObjectMappingImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -54,7 +54,7 @@ public class TagToViewObjectMappingImpl extends EObjectImpl implements TagToView * @generated * @ordered */ - protected static final String MIN_JSF_VERSION_EDEFAULT = "1.1"; //$NON-NLS-1$ + protected static final String MIN_JSF_VERSION_EDEFAULT = "1.1"; /** * The cached value of the '{@link #getMinJSFVersion() <em>Min JSF Version</em>}' attribute. @@ -74,7 +74,7 @@ public class TagToViewObjectMappingImpl extends EObjectImpl implements TagToView * @generated * @ordered */ - protected static final String MIN_LIBRARY_VERSION_EDEFAULT = ""; //$NON-NLS-1$ + protected static final String MIN_LIBRARY_VERSION_EDEFAULT = ""; /** * The cached value of the '{@link #getMinLibraryVersion() <em>Min Library Version</em>}' attribute. @@ -309,6 +309,6 @@ public class TagToViewObjectMappingImpl extends EObjectImpl implements TagToView @Override public String toString() { - return "TagToViewObjectMapping: typeInfo="+getTypeInfo(); //$NON-NLS-1$ + return "TagToViewObjectMapping: typeInfo="+getTypeInfo(); } } //TagToViewObjectMappingImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ValidatorTypeInfo_Impl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ValidatorTypeInfo_Impl.java index 2aca75466..bcfcfdbf2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ValidatorTypeInfo_Impl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ValidatorTypeInfo_Impl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: ValidatorTypeInfo_Impl.java,v 1.2 2008/11/18 22:23:57 gkessler Exp $ + * $Id: ValidatorTypeInfo_Impl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ */ package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; @@ -171,7 +171,7 @@ public class ValidatorTypeInfo_Impl extends ClassTypeInfo_Impl implements Valida if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (validatorId: "); //$NON-NLS-1$ + result.append(" (validatorId: "); result.append(validatorId); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/AbstractTagRegistry.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/AbstractTagRegistry.java index 50d932830..edc4118ec 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/AbstractTagRegistry.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/AbstractTagRegistry.java @@ -69,7 +69,7 @@ public abstract class AbstractTagRegistry implements ITagRegistry catch (final Exception e) { JSFCorePlugin.log(new Exception(e), - "During change event notification"); //$NON-NLS-1$ + "During change event notification"); } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/TagRegistryFactory.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/TagRegistryFactory.java index d0c5ecb59..a994a56fd 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/TagRegistryFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/TagRegistryFactory.java @@ -25,7 +25,8 @@ public abstract class TagRegistryFactory implements IIdentifiableStrategy<IProje { private static final ITagRegistry NO_RESULT = null; - private static final String ID = "org.eclipse.jst.jsf.designtime.view.model.TagRegistryFactory"; //$NON-NLS-1$ + private static final String ID = "org.eclipse.jst.jsf.designtime.view.model.TagRegistryFactory"; + /** * @param project @@ -38,14 +39,8 @@ public abstract class TagRegistryFactory implements IIdentifiableStrategy<IProje */ public abstract ITagRegistry createTagRegistry(final IProject project) throws TagRegistryFactoryException; - /** - * Allow - * - * @param project - * @return true if an instance of ITagRegistry already exists for project - */ - public abstract boolean isInstance(final IProject project); - + + public final ITagRegistry getNoResult() { return NO_RESULT; @@ -56,11 +51,14 @@ public abstract class TagRegistryFactory implements IIdentifiableStrategy<IProje return createTagRegistry(project); } + + public String getId() { return ID; } + /** * Wraps exceptions generated by trying to create a tag registry */ @@ -76,7 +74,7 @@ public abstract class TagRegistryFactory implements IIdentifiableStrategy<IProje */ public TagRegistryFactoryException(Throwable cause) { - super("Problem during tag registry construction", cause); //$NON-NLS-1$ + super("Problem during tag registry construction", cause); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CMNodeNamedMapAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CMNodeNamedMapAdapter.java index 0f9542b6f..4a2ab0fe2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CMNodeNamedMapAdapter.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CMNodeNamedMapAdapter.java @@ -126,7 +126,7 @@ public class CMNodeNamedMapAdapter implements } catch (UnknownAttributeException e) { - JSFCorePlugin.log(e, "Trying to get attribute for "+name); //$NON-NLS-1$ + JSFCorePlugin.log(e, "Trying to get attribute for "+name); } } @@ -147,22 +147,22 @@ public class CMNodeNamedMapAdapter implements public void clear() { - throw new UnsupportedOperationException("Cannot modify map"); //$NON-NLS-1$ + throw new UnsupportedOperationException("Cannot modify map"); } public ITagAttributeHandler put(String key, ITagAttributeHandler value) { - throw new UnsupportedOperationException("Cannot modify map"); //$NON-NLS-1$ + throw new UnsupportedOperationException("Cannot modify map"); } public void putAll(Map<? extends String, ? extends ITagAttributeHandler> t) { - throw new UnsupportedOperationException("Cannot modify map"); //$NON-NLS-1$ + throw new UnsupportedOperationException("Cannot modify map"); } public ITagAttributeHandler remove(Object key) { - throw new UnsupportedOperationException("Cannot modify map"); //$NON-NLS-1$ + throw new UnsupportedOperationException("Cannot modify map"); } private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CompositeTagResolvingStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CompositeTagResolvingStrategy.java index 75e029d3b..bfcf32def 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CompositeTagResolvingStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CompositeTagResolvingStrategy.java @@ -14,7 +14,6 @@ import org.eclipse.jst.jsf.common.internal.policy.IIdentifiable; import org.eclipse.jst.jsf.common.internal.policy.IIteratorPolicy; import org.eclipse.jst.jsf.common.internal.strategy.IteratorPolicyBasedStrategyComposite; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement; -import org.eclipse.jst.jsf.designtime.internal.Messages; /** * @author cbateman @@ -27,7 +26,7 @@ public class CompositeTagResolvingStrategy<TLDELEMENT> implements IIdentifiable<String>, ITagResolvingStrategy<TLDELEMENT, String> { - private static final String ID = "org.eclipse.jst.jsf.designtime.CompositeTagResolvingStrategy"; //$NON-NLS-1$ + private static final String ID = "org.eclipse.jst.jsf.designtime.CompositeTagResolvingStrategy"; /** * @param policy @@ -45,7 +44,7 @@ public class CompositeTagResolvingStrategy<TLDELEMENT> public final String getDisplayName() { - return Messages.CompositeTagResolvingStrategy_DisplayName; + return "Composite Tag Resolving Strategies"; } @Override diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultJSPTagResolver.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultJSPTagResolver.java index b0226e3e5..a1dfc1687 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultJSPTagResolver.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultJSPTagResolver.java @@ -52,14 +52,6 @@ public class DefaultJSPTagResolver extends JSPTagResolvingStrategy private final ViewMetadataMapper _mapper; /** - * @return the descriptor for this resolver strategy - */ - public static StrategyDescriptor createDescriptor() - { - return new StrategyDescriptor(ID, DISPLAY_NAME); - } - - /** * @param project */ public DefaultJSPTagResolver(final IProject project) diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultTagTypeInfo.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultTagTypeInfo.java index 6853c82a9..989e03b35 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultTagTypeInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultTagTypeInfo.java @@ -77,459 +77,459 @@ public final class DefaultTagTypeInfo } private static final ComponentTypeInfo COMPINFO_PARAM = new ComponentTypeInfo( - "javax.faces.Parameter", //$NON-NLS-1$ - "javax.faces.component.UIParameter", //$NON-NLS-1$ + "javax.faces.Parameter", + "javax.faces.component.UIParameter", new String[] { - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Parameter", //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.Parameter", null); private static final ComponentTypeInfo COMPINFO_SELECTITEM = new ComponentTypeInfo( - "javax.faces.SelectItem", //$NON-NLS-1$ - "javax.faces.component.UISelectItem", //$NON-NLS-1$ + "javax.faces.SelectItem", + "javax.faces.component.UISelectItem", new String[] { - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectItem", //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.SelectItem", null); private static final ComponentTypeInfo COMPINFO_SELECTITEMS = new ComponentTypeInfo( - "javax.faces.SelectItems", //$NON-NLS-1$ - "javax.faces.component.UISelectItems", //$NON-NLS-1$ + "javax.faces.SelectItems", + "javax.faces.component.UISelectItems", new String[] { - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectItems", //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.SelectItems", null); private static final ComponentTypeInfo COMPINFO_SUBVIEW = new ComponentTypeInfo( - "javax.faces.NamingContainer", //$NON-NLS-1$ - "javax.faces.component.UINamingContainer", //$NON-NLS-1$ + "javax.faces.NamingContainer", + "javax.faces.component.UINamingContainer", new String[] { - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.NamingContainer", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.NamingContainer", //$NON-NLS-1$ + "javax.faces.component.NamingContainer", + "javax.faces.component.StateHolder", }, + "javax.faces.NamingContainer", null); private static final ComponentTypeInfo COMPINFO_VERBATIM = new ComponentTypeInfo( - "javax.faces.Output", //$NON-NLS-1$ - "javax.faces.component.UIOutput", //$NON-NLS-1$ + "javax.faces.Output", + "javax.faces.component.UIOutput", new String[] { - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Output", //$NON-NLS-1$ - "javax.faces.Text"); //$NON-NLS-1$ + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.Output", + "javax.faces.Text"); private static final ComponentTypeInfo COMPINFO_VIEW = new ComponentTypeInfo( - "javax.faces.ViewRoot", //$NON-NLS-1$ - "javax.faces.component.UIViewRoot", //$NON-NLS-1$ + "javax.faces.ViewRoot", + "javax.faces.component.UIViewRoot", new String[] { - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.ViewRoot", //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.ViewRoot", null); // expected type info for jsf/html components private static final ComponentTypeInfo COMPINFO_COLUMN = new ComponentTypeInfo( - "javax.faces.Column", //$NON-NLS-1$ - "javax.faces.component.UIColumn", //$NON-NLS-1$ + "javax.faces.Column", + "javax.faces.component.UIColumn", new String[] { - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object" }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object" }, new String[] - { "javax.faces.component.StateHolder" }, //$NON-NLS-1$ - "javax.faces.Column", //$NON-NLS-1$ + { "javax.faces.component.StateHolder" }, + "javax.faces.Column", null); private static final ComponentTypeInfo COMPINFO_COMMAND = new ComponentTypeInfo( - "javax.faces.HtmlCommandButton", //$NON-NLS-1$ - "javax.faces.component.html.HtmlCommandButton", //$NON-NLS-1$ + "javax.faces.HtmlCommandButton", + "javax.faces.component.html.HtmlCommandButton", new String[] { - "javax.faces.component.UICommand", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object" }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UICommand", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object" }, new String[] { - "javax.faces.component.ActionSource", //$NON-NLS-1$ - "javax.faces.component.StateHolder" }, //$NON-NLS-1$ - "javax.faces.Command", //$NON-NLS-1$ - "javax.faces.Button"); //$NON-NLS-1$ + "javax.faces.component.ActionSource", + "javax.faces.component.StateHolder" }, + "javax.faces.Command", + "javax.faces.Button"); private static final ComponentTypeInfo COMPINFO_COMMANDLINK = new ComponentTypeInfo( - "javax.faces.HtmlCommandLink", //$NON-NLS-1$ - "javax.faces.component.html.HtmlCommandLink", //$NON-NLS-1$ + "javax.faces.HtmlCommandLink", + "javax.faces.component.html.HtmlCommandLink", new String[] { - "javax.faces.component.UICommand", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object" }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UICommand", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object" }, new String[] { - "javax.faces.component.ActionSource", //$NON-NLS-1$ - "javax.faces.component.StateHolder" }, //$NON-NLS-1$ - "javax.faces.Command", //$NON-NLS-1$ - "javax.faces.Link"); //$NON-NLS-1$ + "javax.faces.component.ActionSource", + "javax.faces.component.StateHolder" }, + "javax.faces.Command", + "javax.faces.Link"); private static final ComponentTypeInfo COMPINFO_DATATABLE = new ComponentTypeInfo( - "javax.faces.HtmlDataTable", //$NON-NLS-1$ - "javax.faces.component.html.HtmlDataTable", //$NON-NLS-1$ + "javax.faces.HtmlDataTable", + "javax.faces.component.html.HtmlDataTable", new String[] { - "javax.faces.component.UIData", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object" }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIData", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object" }, new String[] { - "javax.faces.component.NamingContainer", //$NON-NLS-1$ - "javax.faces.component.StateHolder" }, //$NON-NLS-1$ - "javax.faces.Data", //$NON-NLS-1$ - "javax.faces.Table"); //$NON-NLS-1$ + "javax.faces.component.NamingContainer", + "javax.faces.component.StateHolder" }, + "javax.faces.Data", + "javax.faces.Table"); private static final ComponentTypeInfo COMPINFO_FORM = new ComponentTypeInfo( - "javax.faces.HtmlForm", //$NON-NLS-1$ - "javax.faces.component.html.HtmlForm", //$NON-NLS-1$ + "javax.faces.HtmlForm", + "javax.faces.component.html.HtmlForm", new String[] { - "javax.faces.component.UIForm", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object" }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIForm", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object" }, new String[] { - "javax.faces.component.NamingContainer", //$NON-NLS-1$ - "javax.faces.component.StateHolder" }, //$NON-NLS-1$ - "javax.faces.Form", //$NON-NLS-1$ - "javax.faces.Form"); //$NON-NLS-1$ + "javax.faces.component.NamingContainer", + "javax.faces.component.StateHolder" }, + "javax.faces.Form", + "javax.faces.Form"); private static final ComponentTypeInfo COMPINFO_GRAPHIC = new ComponentTypeInfo( - "javax.faces.HtmlGraphicImage", //$NON-NLS-1$ - "javax.faces.component.html.HtmlGraphicImage", //$NON-NLS-1$ + "javax.faces.HtmlGraphicImage", + "javax.faces.component.html.HtmlGraphicImage", new String[] { - "javax.faces.component.UIGraphic", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIGraphic", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Graphic", //$NON-NLS-1$ - "javax.faces.Image"); //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.Graphic", + "javax.faces.Image"); private static final ComponentTypeInfo COMPINFO_HIDDEN = new ComponentTypeInfo( - "javax.faces.HtmlInputHidden", //$NON-NLS-1$ - "javax.faces.component.html.HtmlInputHidden", //$NON-NLS-1$ + "javax.faces.HtmlInputHidden", + "javax.faces.component.html.HtmlInputHidden", new String[] { - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Input", //$NON-NLS-1$ - "javax.faces.Hidden"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.Input", + "javax.faces.Hidden"); private static final ComponentTypeInfo COMPINFO_SECRET = new ComponentTypeInfo( - "javax.faces.HtmlInputSecret", //$NON-NLS-1$ - "javax.faces.component.html.HtmlInputSecret", //$NON-NLS-1$ + "javax.faces.HtmlInputSecret", + "javax.faces.component.html.HtmlInputSecret", new String[] { - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder" }, //$NON-NLS-1$ - "javax.faces.Input", //$NON-NLS-1$ - "javax.faces.Secret"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder" }, + "javax.faces.Input", + "javax.faces.Secret"); private static final ComponentTypeInfo COMPINFO_INPUTTEXT = new ComponentTypeInfo( - "javax.faces.HtmlInputText", //$NON-NLS-1$ - "javax.faces.component.html.HtmlInputText", //$NON-NLS-1$ + "javax.faces.HtmlInputText", + "javax.faces.component.html.HtmlInputText", new String[] { - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object" }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object" }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder" }, //$NON-NLS-1$ - "javax.faces.Input", //$NON-NLS-1$ - "javax.faces.Text"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder" }, + "javax.faces.Input", + "javax.faces.Text"); private static final ComponentTypeInfo COMPINFO_INPUTTEXTAREA = new ComponentTypeInfo( - "javax.faces.HtmlInputTextarea", //$NON-NLS-1$ - "javax.faces.component.html.HtmlInputTextarea", //$NON-NLS-1$ + "javax.faces.HtmlInputTextarea", + "javax.faces.component.html.HtmlInputTextarea", new String[] { - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Input", //$NON-NLS-1$ - "javax.faces.Textarea"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.Input", + "javax.faces.Textarea"); private static final ComponentTypeInfo COMPINFO_MESSAGE = new ComponentTypeInfo( - "javax.faces.HtmlMessage", //$NON-NLS-1$ - "javax.faces.component.html.HtmlMessage", //$NON-NLS-1$ + "javax.faces.HtmlMessage", + "javax.faces.component.html.HtmlMessage", new String[] { - "javax.faces.component.UIMessage", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIMessage", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Message", //$NON-NLS-1$ - "javax.faces.Message"); //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.Message", + "javax.faces.Message"); private static final ComponentTypeInfo COMPINFO_MESSAGES = new ComponentTypeInfo( - "javax.faces.HtmlMessages", //$NON-NLS-1$ - "javax.faces.component.html.HtmlMessages", //$NON-NLS-1$ + "javax.faces.HtmlMessages", + "javax.faces.component.html.HtmlMessages", new String[] { - "javax.faces.component.UIMessages", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIMessages", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Messages", //$NON-NLS-1$ - "javax.faces.Messages"); //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.Messages", + "javax.faces.Messages"); private static final ComponentTypeInfo COMPINFO_OUTPUTFORMAT = new ComponentTypeInfo( - "javax.faces.HtmlOutputFormat", //$NON-NLS-1$ - "javax.faces.component.html.HtmlOutputFormat", //$NON-NLS-1$ + "javax.faces.HtmlOutputFormat", + "javax.faces.component.html.HtmlOutputFormat", new String[] { - "javax.faces.component.UIOutput", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Output", //$NON-NLS-1$ - "javax.faces.Format"); //$NON-NLS-1$ + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.Output", + "javax.faces.Format"); private static final ComponentTypeInfo COMPINFO_OUTPUTLABEL = new ComponentTypeInfo( - "javax.faces.HtmlOutputLabel", //$NON-NLS-1$ - "javax.faces.component.html.HtmlOutputLabel", //$NON-NLS-1$ + "javax.faces.HtmlOutputLabel", + "javax.faces.component.html.HtmlOutputLabel", new String[] { - "javax.faces.component.UIOutput", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Output", //$NON-NLS-1$ - "javax.faces.Label"); //$NON-NLS-1$ + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.Output", + "javax.faces.Label"); private static final ComponentTypeInfo COMPINFO_OUTPUTLINK = new ComponentTypeInfo( - "javax.faces.HtmlOutputLink", //$NON-NLS-1$ - "javax.faces.component.html.HtmlOutputLink", //$NON-NLS-1$ + "javax.faces.HtmlOutputLink", + "javax.faces.component.html.HtmlOutputLink", new String[] { - "javax.faces.component.UIOutput", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Output", //$NON-NLS-1$ - "javax.faces.Link"); //$NON-NLS-1$ + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.Output", + "javax.faces.Link"); private static final ComponentTypeInfo COMPINFO_OUTPUTTEXT = new ComponentTypeInfo( - "javax.faces.HtmlOutputText", //$NON-NLS-1$ - "javax.faces.component.html.HtmlOutputText", //$NON-NLS-1$ + "javax.faces.HtmlOutputText", + "javax.faces.component.html.HtmlOutputText", new String[] { - "javax.faces.component.UIOutput", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Output", //$NON-NLS-1$ - "javax.faces.Text"); //$NON-NLS-1$ + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.Output", + "javax.faces.Text"); private static final ComponentTypeInfo COMPINFO_PANELGRID = new ComponentTypeInfo( - "javax.faces.HtmlPanelGrid", //$NON-NLS-1$ - "javax.faces.component.html.HtmlPanelGrid", //$NON-NLS-1$ + "javax.faces.HtmlPanelGrid", + "javax.faces.component.html.HtmlPanelGrid", new String[] { - "javax.faces.component.UIPanel", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIPanel", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Panel", //$NON-NLS-1$ - "javax.faces.Grid"); //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.Panel", + "javax.faces.Grid"); private static final ComponentTypeInfo COMPINFO_PANELGROUP = new ComponentTypeInfo( - "javax.faces.HtmlPanelGroup", //$NON-NLS-1$ - "javax.faces.component.html.HtmlPanelGroup", //$NON-NLS-1$ + "javax.faces.HtmlPanelGroup", + "javax.faces.component.html.HtmlPanelGroup", new String[] { - "javax.faces.component.UIPanel", //$NON-NLS-1$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UIPanel", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] - { "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.Panel", //$NON-NLS-1$ - "javax.faces.Group"); //$NON-NLS-1$ + { "javax.faces.component.StateHolder", }, + "javax.faces.Panel", + "javax.faces.Group"); private static final ComponentTypeInfo COMPINFO_SELECTBOOLEANCHECKBOX = new ComponentTypeInfo( - "javax.faces.HtmlSelectBooleanCheckbox", //$NON-NLS-1$ - "javax.faces.component.html.HtmlSelectBooleanCheckbox", //$NON-NLS-1$ + "javax.faces.HtmlSelectBooleanCheckbox", + "javax.faces.component.html.HtmlSelectBooleanCheckbox", new String[] { - "javax.faces.component.UISelectBoolean", //$NON-NLS-1$ - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UISelectBoolean", + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectBoolean", //$NON-NLS-1$ - "javax.faces.Checkbox"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.SelectBoolean", + "javax.faces.Checkbox"); private static final ComponentTypeInfo COMPINFO_SELECTMANYCHECKBOX = new ComponentTypeInfo( - "javax.faces.HtmlSelectManyCheckbox", //$NON-NLS-1$ - "javax.faces.component.html.HtmlSelectManyCheckbox", //$NON-NLS-1$ + "javax.faces.HtmlSelectManyCheckbox", + "javax.faces.component.html.HtmlSelectManyCheckbox", new String[] { - "javax.faces.component.UISelectMany", //$NON-NLS-1$ - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UISelectMany", + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectMany", //$NON-NLS-1$ - "javax.faces.Checkbox"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.SelectMany", + "javax.faces.Checkbox"); private static final ComponentTypeInfo COMPINFO_SELECTMANYLISTBOX = new ComponentTypeInfo( - "javax.faces.HtmlSelectManyListbox", //$NON-NLS-1$ - "javax.faces.component.html.HtmlSelectManyListbox", //$NON-NLS-1$ + "javax.faces.HtmlSelectManyListbox", + "javax.faces.component.html.HtmlSelectManyListbox", new String[] { - "javax.faces.component.UISelectMany", //$NON-NLS-1$ - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UISelectMany", + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectMany", //$NON-NLS-1$ - "javax.faces.Listbox"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.SelectMany", + "javax.faces.Listbox"); private static final ComponentTypeInfo COMPINFO_SELECTMANYMENU = new ComponentTypeInfo( - "javax.faces.HtmlSelectManyMenu", //$NON-NLS-1$ - "javax.faces.component.html.HtmlSelectManyMenu", //$NON-NLS-1$ + "javax.faces.HtmlSelectManyMenu", + "javax.faces.component.html.HtmlSelectManyMenu", new String[] { - "javax.faces.component.UISelectMany", //$NON-NLS-1$ - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UISelectMany", + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectMany", //$NON-NLS-1$ - "javax.faces.Menu"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.SelectMany", + "javax.faces.Menu"); private static final ComponentTypeInfo COMPINFO_SELECTONELISTBOX = new ComponentTypeInfo( - "javax.faces.HtmlSelectOneListbox", //$NON-NLS-1$ - "javax.faces.component.html.HtmlSelectOneListbox", //$NON-NLS-1$ + "javax.faces.HtmlSelectOneListbox", + "javax.faces.component.html.HtmlSelectOneListbox", new String[] { - "javax.faces.component.UISelectOne", //$NON-NLS-1$ - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UISelectOne", + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectOne", //$NON-NLS-1$ - "javax.faces.Listbox"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.SelectOne", + "javax.faces.Listbox"); private static final ComponentTypeInfo COMPINFO_SELECTONEMENU = new ComponentTypeInfo( - "javax.faces.HtmlSelectOneMenu", //$NON-NLS-1$ - "javax.faces.component.html.HtmlSelectOneMenu", //$NON-NLS-1$ + "javax.faces.HtmlSelectOneMenu", + "javax.faces.component.html.HtmlSelectOneMenu", new String[] { - "javax.faces.component.UISelectOne", //$NON-NLS-1$ - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UISelectOne", + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectOne", //$NON-NLS-1$ - "javax.faces.Menu"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.SelectOne", + "javax.faces.Menu"); private static final ComponentTypeInfo COMPINFO_SELECTONERADIO = new ComponentTypeInfo( - "javax.faces.HtmlSelectOneRadio", //$NON-NLS-1$ - "javax.faces.component.html.HtmlSelectOneRadio", //$NON-NLS-1$ + "javax.faces.HtmlSelectOneRadio", + "javax.faces.component.html.HtmlSelectOneRadio", new String[] { - "javax.faces.component.UISelectOne", //$NON-NLS-1$ - "javax.faces.component.UIInput", "javax.faces.component.UIOutput", //$NON-NLS-1$ //$NON-NLS-2$ - "javax.faces.component.UIComponentBase", //$NON-NLS-1$ - "javax.faces.component.UIComponent", "java.lang.Object", }, //$NON-NLS-1$ //$NON-NLS-2$ + "javax.faces.component.UISelectOne", + "javax.faces.component.UIInput", "javax.faces.component.UIOutput", + "javax.faces.component.UIComponentBase", + "javax.faces.component.UIComponent", "java.lang.Object", }, new String[] { - "javax.faces.component.EditableValueHolder", //$NON-NLS-1$ - "javax.faces.component.ValueHolder", //$NON-NLS-1$ - "javax.faces.component.StateHolder", }, //$NON-NLS-1$ - "javax.faces.SelectOne", //$NON-NLS-1$ - "javax.faces.Radio"); //$NON-NLS-1$ + "javax.faces.component.EditableValueHolder", + "javax.faces.component.ValueHolder", + "javax.faces.component.StateHolder", }, + "javax.faces.SelectOne", + "javax.faces.Radio"); // default converters private static final ConverterTypeInfo CONVERTERINFO_DATETIME = new ConverterTypeInfo( - "javax.faces.convert.DateTimeConverter", //$NON-NLS-1$ - "javax.faces.DateTime"); //$NON-NLS-1$ + "javax.faces.convert.DateTimeConverter", + "javax.faces.DateTime"); private static final ConverterTypeInfo CONVERTERINFO_NUMBER = new ConverterTypeInfo( - "javax.faces.convert.NumberConverter", //$NON-NLS-1$ - "javax.faces.Number"); //$NON-NLS-1$ + "javax.faces.convert.NumberConverter", + "javax.faces.Number"); // default validators private static final ValidatorTypeInfo VALIDATORINFO_DOUBLERANGE = new ValidatorTypeInfo( - "javax.faces.validator.DoubleRangeValidator", //$NON-NLS-1$ - "javax.faces.DoubleRange"); //$NON-NLS-1$ + "javax.faces.validator.DoubleRangeValidator", + "javax.faces.DoubleRange"); private static final ValidatorTypeInfo VALIDATORINFO_LENGTH = new ValidatorTypeInfo( - "javax.faces.validator.LengthValidator", //$NON-NLS-1$ - "javax.faces.Length"); //$NON-NLS-1$ + "javax.faces.validator.LengthValidator", + "javax.faces.Length"); private static final ValidatorTypeInfo VALIDATORINFO_LONGRANGE = new ValidatorTypeInfo( - "javax.faces.validator.LongRangeValidator", //$NON-NLS-1$ - "javax.faces.LongRange"); //$NON-NLS-1$ + "javax.faces.validator.LongRangeValidator", + "javax.faces.LongRange"); private static Map<TagIdentifier, TypeInfo> JSF11_ELEMENTS; private static Map<TagIdentifier, TypeInfo> JSF12_ELEMENTS; diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/JSPTagResolvingStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/JSPTagResolvingStrategy.java index 8f2235db6..ad7a0f9e2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/JSPTagResolvingStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/JSPTagResolvingStrategy.java @@ -26,43 +26,4 @@ public abstract class JSPTagResolvingStrategy extends public abstract ITagElement resolve(TLDElementDeclaration element); public abstract String getId(); - - public abstract String getDisplayName(); - - /** - * A descriptor for JSP tag resolving strategies - * - * @author cbateman - * - */ - public final static class StrategyDescriptor - { - private final String _id; - private final String _displayName; - - /** - * @param id - * @param displayName - */ - public StrategyDescriptor(final String id, final String displayName) - { - _id = id; - _displayName = displayName; - } - - /** - * @return the id of the strategy - */ - public String getId() - { - return _id; - } - /** - * @return the human-readable displayable name of the strategy - */ - public String getDisplayName() - { - return _displayName; - } - } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/Messages.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/Messages.java deleted file mode 100644 index 9d3dcee38..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/Messages.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.eclipse.jst.jsf.designtime.internal.view.model.jsp; - -import org.eclipse.osgi.util.NLS; - -/** - * NLS message getter. - * - * @author cbateman - * - */ -public class Messages extends NLS -{ - private static final String BUNDLE_NAME = "org.eclipse.jst.jsf.designtime.internal.view.model.jsp.messages"; //$NON-NLS-1$ - /** - * see messages.properties - */ - public static String UnresolvedJSPTagResolvingStrategy_1; - static - { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages() - { - // no external instantiation - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDComponentTagElement.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDComponentTagElement.java index 416bc1638..4e081bd36 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDComponentTagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDComponentTagElement.java @@ -58,6 +58,6 @@ IComponentTagElement { final String attributes = constructAttributesString(); return _componentTypeInfo.toString() + - (!"".equals(attributes) ? "\n" + attributes : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + (!"".equals(attributes) ? "\n" + attributes : ""); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDNamespace.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDNamespace.java index 043ffe7d5..b2721dbe9 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDNamespace.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDNamespace.java @@ -133,7 +133,7 @@ public class TLDNamespace extends Namespace public String getDisplayName() { String displayName = _tldDoc.getDisplayName(); - if (displayName == null || "".equals(displayName.trim())) //$NON-NLS-1$ + if (displayName == null || "".equals(displayName.trim())) { displayName = getUri(); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagElement.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagElement.java index 6924dbf1b..f7ad76617 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagElement.java @@ -66,7 +66,7 @@ public class TLDTagElement extends TagElement @Override public String toString() { - return String.format("Tag: Tag Handler: name=%s, uri=%s, tagHandlerClassName=%s\n" //$NON-NLS-1$ + return String.format("Tag: Tag Handler: name=%s, uri=%s, tagHandlerClassName=%s\n" , getName(), getUri(), getTagHandlerClassName()) + constructAttributesString(); } @@ -76,7 +76,7 @@ public class TLDTagElement extends TagElement */ protected String constructAttributesString() { - String attributes = ""; //$NON-NLS-1$ + String attributes = ""; for (final Iterator it = getAttributeHandlers().entrySet().iterator(); it.hasNext();) { @@ -84,7 +84,7 @@ public class TLDTagElement extends TagElement final String name = (String) entry.getKey(); final ITagAttributeHandler handler = (ITagAttributeHandler) entry.getValue(); - attributes += String.format("\t\t\tAttribute: name=%s, customHandler=%s, propertyName=%s, isELAllowed=%b\n", //$NON-NLS-1$ + attributes += String.format("\t\t\tAttribute: name=%s, customHandler=%s, propertyName=%s, isELAllowed=%b\n", name, handler.getCustomHandler(), handler.getName(), Boolean.valueOf(handler.isELAllowed())); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TagIntrospectingStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TagIntrospectingStrategy.java index 6a5d97d35..6608cf650 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TagIntrospectingStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TagIntrospectingStrategy.java @@ -36,14 +36,6 @@ public final class TagIntrospectingStrategy extends JSPTagResolvingStrategy private final IProject _project; /** - * @return the descriptor for this resolver strategy - */ - public static StrategyDescriptor createDescriptor() - { - return new StrategyDescriptor(ID, DISPLAY_NAME); - } - - /** * @param project */ public TagIntrospectingStrategy(final IProject project) diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/UnresolvedJSPTagResolvingStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/UnresolvedJSPTagResolvingStrategy.java index 0a94f66b5..29accf1c7 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/UnresolvedJSPTagResolvingStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/UnresolvedJSPTagResolvingStrategy.java @@ -27,19 +27,11 @@ public class UnresolvedJSPTagResolvingStrategy extends JSPTagResolvingStrategy /** * the identifier of this strategy */ - public final static String ID = "org.eclipse.jst.jsf.designtime.UnresolvedJSPTagResolvingStrategy"; //$NON-NLS-1$ + public final static String ID = "org.eclipse.jst.jsf.designtime.UnresolvedJSPTagResolvingStrategy"; /** * the displayable name */ - public final static String DISPLAY_NAME = Messages.UnresolvedJSPTagResolvingStrategy_1; - - /** - * @return the descriptor for this resolver strategy - */ - public static StrategyDescriptor createDescriptor() - { - return new StrategyDescriptor(ID, DISPLAY_NAME); - } + public final static String DISPLAY_NAME = "Unresolved Tag Resolver"; @Override public String getId() diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/ServletBeanProxyContributor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/ServletBeanProxyContributor.java index 19951a9a8..7baa4a0fd 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/ServletBeanProxyContributor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/ServletBeanProxyContributor.java @@ -39,7 +39,7 @@ class ServletBeanProxyContributor extends ConfigurationContributorAdapter _jsfVersion = getProjectVersion(project); if (_jsfVersion == null) { - throw new IllegalArgumentException("jsfVersion must not be null"); //$NON-NLS-1$ + throw new IllegalArgumentException("jsfVersion must not be null"); } } @@ -51,12 +51,12 @@ class ServletBeanProxyContributor extends ConfigurationContributorAdapter { if (_jsfVersion != JSFVersion.V1_2) { - final Bundle servletBundle = Platform.getBundle("javax.servlet"); //$NON-NLS-1$ + final Bundle servletBundle = Platform.getBundle("javax.servlet"); controller.contributeClasspath(servletBundle, (IPath) null, IConfigurationContributionController.APPEND_USER_CLASSPATH, true); - final Bundle jspBundle = Platform.getBundle("javax.servlet.jsp"); //$NON-NLS-1$ + final Bundle jspBundle = Platform.getBundle("javax.servlet.jsp"); controller.contributeClasspath(jspBundle, (IPath) null, IConfigurationContributionController.APPEND_USER_CLASSPATH, true); @@ -65,10 +65,10 @@ class ServletBeanProxyContributor extends ConfigurationContributorAdapter { final Bundle coreBundle = JSFCorePlugin.getDefault().getBundle(); final IJavaProject javaProject = JavaCore.create(_project); - maybeAddJar(controller, "javax.servlet.jsp.tagext.JspIdConsumer", //$NON-NLS-1$ - javaProject, coreBundle, "/jars/fake_jsp_21.jar"); //$NON-NLS-1$ - maybeAddJar(controller, "javax.el.ELException", javaProject, //$NON-NLS-1$ - coreBundle, "/jars/fake_el.jar"); //$NON-NLS-1$ + maybeAddJar(controller, "javax.servlet.jsp.tagext.JspIdConsumer", + javaProject, coreBundle, "/jars/fake_jsp_21.jar"); + maybeAddJar(controller, "javax.el.ELException", javaProject, + coreBundle, "/jars/fake_el.jar"); } } @@ -103,25 +103,25 @@ class ServletBeanProxyContributor extends ConfigurationContributorAdapter { try { - if (FacetedProjectFramework.hasProjectFacet(project, "jst.jsf", //$NON-NLS-1$ - "1.0")) //$NON-NLS-1$ + if (FacetedProjectFramework.hasProjectFacet(project, "jst.jsf", + "1.0")) { return JSFVersion.V1_0; } else if (FacetedProjectFramework.hasProjectFacet(project, - "jst.jsf", "1.1")) //$NON-NLS-1$ //$NON-NLS-2$ + "jst.jsf", "1.1")) { return JSFVersion.V1_1; } else if (FacetedProjectFramework.hasProjectFacet(project, - "jst.jsf", "1.2")) //$NON-NLS-1$ //$NON-NLS-2$ + "jst.jsf", "1.2")) { return JSFVersion.V1_2; } } catch (final CoreException e) { - JSFCorePlugin.log("checking project version", e); //$NON-NLS-1$ + JSFCorePlugin.log("checking project version", e); // fall-through } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/TagAnalyzer.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/TagAnalyzer.java index ea1f16793..468907c71 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/TagAnalyzer.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/TagAnalyzer.java @@ -58,17 +58,17 @@ import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElement */ public final class TagAnalyzer { - private static final String JAVAX_FACES_WEBAPP_CONVERTER_TAG = "javax.faces.webapp.ConverterTag"; //$NON-NLS-1$ - private static final String JAVAX_FACES_WEBAPP_CONVERTER_ELTAG = "javax.faces.webapp.ConverterELTag"; //$NON-NLS-1$ - private static final String JAVAX_FACES_WEBAPP_VALIDATOR_TAG = "javax.faces.webapp.ValidatorTag"; //$NON-NLS-1$ - private static final String JAVAX_FACES_WEBAPP_VALIDATOR_ELTAG = "javax.faces.webapp.ValidatorELTag"; //$NON-NLS-1$ - private static final String JAVAX_FACES_WEBAPP_FACET_TAG = "javax.faces.webapp.FacetTag"; //$NON-NLS-1$ + private static final String JAVAX_FACES_WEBAPP_CONVERTER_TAG = "javax.faces.webapp.ConverterTag"; + private static final String JAVAX_FACES_WEBAPP_CONVERTER_ELTAG = "javax.faces.webapp.ConverterELTag"; + private static final String JAVAX_FACES_WEBAPP_VALIDATOR_TAG = "javax.faces.webapp.ValidatorTag"; + private static final String JAVAX_FACES_WEBAPP_VALIDATOR_ELTAG = "javax.faces.webapp.ValidatorELTag"; + private static final String JAVAX_FACES_WEBAPP_FACET_TAG = "javax.faces.webapp.FacetTag"; // private static final String JAVAX_FACES_WEBAPP_ACTIONLISTENER_TAG = // "javax.faces.webapp.ActionListenerTag"; // private static final String JAVAX_FACES_WEBAPP_VALUECHANGELISTENER_TAG = // "javax.faces.webapp.ValueChangeListenerTag"; - private static final String JAVAX_FACES_WEBAPP_ATTRIBUTE_TAG = "javax.faces.webapp.AttributeTag"; //$NON-NLS-1$ + private static final String JAVAX_FACES_WEBAPP_ATTRIBUTE_TAG = "javax.faces.webapp.AttributeTag"; private final static Set<String> COMPONENT_TAG_HANDLER_TYPES_JSF11; private final static Set<String> COMPONENT_TAG_HANDLER_TYPES_JSF12; @@ -98,15 +98,15 @@ public final class TagAnalyzer // components // JSF 1.1 Set<String> set = new HashSet<String>(8); - set.add("javax.faces.webapp.UIComponentTag"); //$NON-NLS-1$ - set.add("javax.faces.webapp.UIComponentBodyTag"); //$NON-NLS-1$ + set.add("javax.faces.webapp.UIComponentTag"); + set.add("javax.faces.webapp.UIComponentBodyTag"); COMPONENT_TAG_HANDLER_TYPES_JSF11 = Collections.unmodifiableSet(set); // JSF 1.2 set = new HashSet<String>(8); - set.add("javax.faces.webapp.UIComponentTag"); //$NON-NLS-1$ - set.add("javax.faces.webapp.UIComponentBodyTag"); //$NON-NLS-1$ - set.add("javax.faces.webapp.UIComponentELTag"); //$NON-NLS-1$ + set.add("javax.faces.webapp.UIComponentTag"); + set.add("javax.faces.webapp.UIComponentBodyTag"); + set.add("javax.faces.webapp.UIComponentELTag"); COMPONENT_TAG_HANDLER_TYPES_JSF12 = Collections.unmodifiableSet(set); // converters @@ -144,43 +144,32 @@ public final class TagAnalyzer final IConfigurationContributor[] contributor = new IConfigurationContributor[] { new ServletBeanProxyContributor(project) }; + final ProxyFactoryRegistry registry = getProxyFactoryRegistry( + contributor, project); - ProxyFactoryRegistry registry = null; - try + if (registry != null) { - registry = getProxyFactoryRegistry(contributor, project); - - if (registry != null) - { + final IStandardBeanTypeProxyFactory factory = registry + .getBeanTypeProxyFactory(); + final IBeanTypeProxy classTypeProxy = factory + .getBeanTypeProxy(className); + final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper( + classTypeProxy); - final IStandardBeanTypeProxyFactory factory = registry - .getBeanTypeProxyFactory(); - final IBeanTypeProxy classTypeProxy = factory - .getBeanTypeProxy(className); - final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper(project, - classTypeProxy); - - try - { - classTypeWrapper.init(); - return classTypeWrapper.callStringMethod("getComponentType"); //$NON-NLS-1$ - } - catch (final ProxyException tp) - { - if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR) - { - JSFCoreTraceOptions.log("TagAnalyzer.findComponentType", tp); //$NON-NLS-1$ - } - } + try + { + classTypeWrapper.init(); + return classTypeWrapper.callStringMethod("getComponentType"); } - } - finally - { - if (registry != null) + catch (final ProxyException tp) { - registry.terminateRegistry(true); + if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR) + { + JSFCoreTraceOptions.log("TagAnalyzer.findComponentType", tp); + } } } + return null; } @@ -204,82 +193,72 @@ public final class TagAnalyzer // based on the doStartTag method. They also don't provide a standard // interface for acquiring the id so instead we make some guess on // the internal field name. - ProxyFactoryRegistry registry = null; - try + final String className = tldDecl.getTagclass(); + + final IConfigurationContributor[] contributor = new IConfigurationContributor[] + { new ServletBeanProxyContributor(project) }; + final ProxyFactoryRegistry registry = getProxyFactoryRegistry( + contributor, project); + + if (registry != null) { - final String className = tldDecl.getTagclass(); - - final IConfigurationContributor[] contributor = new IConfigurationContributor[] - { new ServletBeanProxyContributor(project) }; - registry = getProxyFactoryRegistry( - contributor, project); - - if (registry != null) + final IStandardBeanTypeProxyFactory factory = registry + .getBeanTypeProxyFactory(); + final IBeanTypeProxy classTypeProxy = factory + .getBeanTypeProxy(className); + + try { - final IStandardBeanTypeProxyFactory factory = registry - .getBeanTypeProxyFactory(); - final IBeanTypeProxy classTypeProxy = factory - .getBeanTypeProxy(className); - - try + final IType type = JavaCore.create(project).findType(className); + + if (type != null + && DTComponentIntrospector + .isTypeNameInstanceOfClass( + type, + Collections + .singleton(JAVAX_FACES_WEBAPP_CONVERTER_ELTAG))) { - final IType type = JavaCore.create(project).findType(className); - - if (type != null - && DTComponentIntrospector - .isTypeNameInstanceOfClass( - type, - Collections - .singleton(JAVAX_FACES_WEBAPP_CONVERTER_ELTAG))) - { - return findConverterType_InELTag(factory, classTypeProxy,project); - } - // the assumption is that this is a component tag, so we assume - // it is one. - else if (type != null - && DTComponentIntrospector - .isTypeNameInstanceOfClass( - type, - Collections - .singleton(JAVAX_FACES_WEBAPP_CONVERTER_TAG))) - { - return findConverterType_InTag(factory, classTypeProxy, project); - } + return findConverterType_InELTag(factory, classTypeProxy); } - catch (final JavaModelException jme) + // the assumption is that this is a component tag, so we assume + // it is one. + else if (type != null + && DTComponentIntrospector + .isTypeNameInstanceOfClass( + type, + Collections + .singleton(JAVAX_FACES_WEBAPP_CONVERTER_TAG))) { - // suppress for now + return findConverterType_InTag(factory, classTypeProxy); } } - } - finally - { - if (registry != null) + catch (final JavaModelException jme) { - registry.terminateRegistry(true); + // suppress for now } } + return null; } private static String findConverterType_InTag( final IStandardBeanTypeProxyFactory factory, - final IBeanTypeProxy classTypeProxy, final IProject project) + final IBeanTypeProxy classTypeProxy) { final IBeanTypeProxy nullPageContextType = factory - .getBeanTypeProxy("javax.servlet.jsp.PageContext"); //$NON-NLS-1$ - final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper(project, + .getBeanTypeProxy("javax.servlet.jsp.PageContext"); + final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper( classTypeProxy); try { classTypeWrapper.init(); - callSuppressExceptions(classTypeWrapper, "setPageContext", //$NON-NLS-1$ + callSuppressExceptions(classTypeWrapper, "setPageContext", new IBeanProxy[] { null }, new IBeanTypeProxy[] { nullPageContextType }); - callSuppressExceptions(classTypeWrapper, "doStartTag"); //$NON-NLS-1$ + callSuppressExceptions(classTypeWrapper, "doStartTag"); final IBeanTypeProxy converterProxy = factory .getBeanTypeProxy(JAVAX_FACES_WEBAPP_CONVERTER_TAG); @@ -288,7 +267,7 @@ public final class TagAnalyzer // failed. // now try to guess what it's called String converterId = getStringField(classTypeWrapper, - converterProxy, "converterId"); //$NON-NLS-1$ + converterProxy, "converterId"); if (converterId != null) { @@ -296,7 +275,7 @@ public final class TagAnalyzer } converterId = getStringField(classTypeWrapper, converterProxy, - "_converterId"); //$NON-NLS-1$ + "_converterId"); if (converterId != null) { @@ -305,7 +284,7 @@ public final class TagAnalyzer // no? look for a CONVERTER_ID converterId = getStringField(classTypeWrapper, classTypeProxy, - "CONVERTER_ID"); //$NON-NLS-1$ + "CONVERTER_ID"); } catch (final ProxyException tp) { @@ -316,12 +295,12 @@ public final class TagAnalyzer private static String findConverterType_InELTag( final IStandardBeanTypeProxyFactory factory, - final IBeanTypeProxy classTypeProxy, final IProject project) + final IBeanTypeProxy classTypeProxy) { - final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper(project, + final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper( classTypeProxy); final IBeanTypeProxy elExpressionType = factory - .getBeanTypeProxy("javax.el.ValueExpression"); //$NON-NLS-1$ + .getBeanTypeProxy("javax.el.ValueExpression"); if (elExpressionType == null) { @@ -332,20 +311,20 @@ public final class TagAnalyzer { classTypeWrapper.init(); - callSuppressExceptions(classTypeWrapper, "doStartTag"); //$NON-NLS-1$ + callSuppressExceptions(classTypeWrapper, "doStartTag"); // no? look for a CONVERTER_ID final IBeanProxy converterId = getFieldInParents(classTypeWrapper, - classTypeProxy, "CONVERTER_ID_EXPR"); //$NON-NLS-1$ + classTypeProxy, "CONVERTER_ID_EXPR"); if (converterId != null) { converterId.getTypeProxy().isKindOf(elExpressionType); - final BeanProxyWrapper elExprValue = new BeanProxyWrapper(project, + final BeanProxyWrapper elExprValue = new BeanProxyWrapper( converterId.getTypeProxy()); final String value = elExprValue - .callStringMethod("getExpressionString"); //$NON-NLS-1$ - System.out.println("Expression string:" + value); //$NON-NLS-1$ + .callStringMethod("getExpressionString"); + System.out.println("Expression string:" + value); } // @@ -382,71 +361,60 @@ public final class TagAnalyzer final IConfigurationContributor[] contributor = new IConfigurationContributor[] { new ServletBeanProxyContributor(project) }; + final ProxyFactoryRegistry registry = getProxyFactoryRegistry( + contributor, project); - ProxyFactoryRegistry registry = null; - - try + if (registry != null) { - registry = getProxyFactoryRegistry(contributor, project); - - if (registry != null) + final IStandardBeanTypeProxyFactory factory = registry + .getBeanTypeProxyFactory(); + final IBeanTypeProxy classTypeProxy = factory + .getBeanTypeProxy(className); + final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper( + classTypeProxy); + final IBeanTypeProxy converterProxy = factory + .getBeanTypeProxy(JAVAX_FACES_WEBAPP_VALIDATOR_TAG); + try { - final IStandardBeanTypeProxyFactory factory = registry - .getBeanTypeProxyFactory(); - final IBeanTypeProxy classTypeProxy = factory - .getBeanTypeProxy(className); - final BeanProxyWrapper classTypeWrapper = new BeanProxyWrapper(project, - classTypeProxy); - final IBeanTypeProxy converterProxy = factory - .getBeanTypeProxy(JAVAX_FACES_WEBAPP_VALIDATOR_TAG); - try + classTypeWrapper.init(); + + callSuppressExceptions(classTypeWrapper, "doStartTag"); + callSuppressExceptions(classTypeWrapper, "createValidator"); + + // hopefully doStartTag set the converter field before it + // failed. + // now try to guess what it's called + String validatorId = getStringField(classTypeWrapper, + converterProxy, "validatorId"); + + if (validatorId != null) { - classTypeWrapper.init(); - - callSuppressExceptions(classTypeWrapper, "doStartTag"); //$NON-NLS-1$ - callSuppressExceptions(classTypeWrapper, "createValidator"); //$NON-NLS-1$ - - // hopefully doStartTag set the converter field before it - // failed. - // now try to guess what it's called - String validatorId = getStringField(classTypeWrapper, - converterProxy, "validatorId"); //$NON-NLS-1$ - - if (validatorId != null) - { - return validatorId; - } - - validatorId = getStringField(classTypeWrapper, converterProxy, - "_validatorId"); //$NON-NLS-1$ - - if (validatorId != null) - { - return validatorId; - } - - // no? then see if there's a VALIDATOR_ID field *on the tag* - validatorId = getStringField(classTypeWrapper, classTypeProxy, - "VALIDATOR_ID"); //$NON-NLS-1$ - - if (validatorId != null) - { - return validatorId; - } + return validatorId; } - catch (final ProxyException tp) + + validatorId = getStringField(classTypeWrapper, converterProxy, + "_validatorId"); + + if (validatorId != null) { - // fall through + return validatorId; + } + + // no? then see if there's a VALIDATOR_ID field *on the tag* + validatorId = getStringField(classTypeWrapper, classTypeProxy, + "VALIDATOR_ID"); + + if (validatorId != null) + { + return validatorId; } } - } - finally - { - if (registry != null) + catch (final ProxyException tp) { - registry.terminateRegistry(true); + // fall through } } + return null; } @@ -534,7 +502,7 @@ public final class TagAnalyzer } catch (final CoreException e) { - JSFCorePlugin.log("Error starting vm for project: " //$NON-NLS-1$ + JSFCorePlugin.log("Error starting vm for project: " + project.getName(), e); } @@ -554,7 +522,7 @@ public final class TagAnalyzer JSFCoreTraceOptions .log(String .format( - "TagAnalyzer.createTLDTagElement: Start tld=%s, project=%s", //$NON-NLS-1$ + "TagAnalyzer.createTLDTagElement: Start tld=%s, project=%s", tldDecl.getNodeName(), project.getName())); } long startTime = 0; @@ -574,7 +542,7 @@ public final class TagAnalyzer JavaCore.VERSION_1_3).getSeverity() == IStatus.ERROR) { JSFCorePlugin.log( - "Bad tag class name in " + tldDecl.toString(), //$NON-NLS-1$ + "Bad tag class name in " + tldDecl.toString(), new Throwable()); return null; } @@ -585,7 +553,7 @@ public final class TagAnalyzer { if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR) { - JSFCoreTraceOptions.log("Type not found for: "+typeName); //$NON-NLS-1$ + JSFCoreTraceOptions.log("Type not found for: "+typeName); } return null; } @@ -594,7 +562,7 @@ public final class TagAnalyzer if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR) { JSFCoreTraceOptions.log(String.format( - "Tag class type=%s\nTag type=%s", type, tagType)); //$NON-NLS-1$ + "Tag class type=%s\nTag type=%s", type, tagType)); } if (tagType == TagType.COMPONENT) @@ -604,9 +572,9 @@ public final class TagAnalyzer if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR_PERF) { String name = element != null ? element.toString() - : "<none>"; //$NON-NLS-1$ + : "<none>"; System.out.printf( - "Time to create component tag element %s was %d\n", //$NON-NLS-1$ + "Time to create component tag element %s was %d\n", name, Long.valueOf(System.nanoTime() - startTime)); } return element; @@ -617,9 +585,9 @@ public final class TagAnalyzer if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR_PERF) { String name = element != null ? element.toString() - : "<none>"; //$NON-NLS-1$ + : "<none>"; System.out.printf( - "Time to create converter tag element %s was %d\n", //$NON-NLS-1$ + "Time to create converter tag element %s was %d\n", name, Long.valueOf(System.nanoTime() - startTime)); } return element; @@ -630,9 +598,9 @@ public final class TagAnalyzer if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR_PERF) { String name = element != null ? element.toString() - : "<none>"; //$NON-NLS-1$ + : "<none>"; System.out.printf( - "Time to create validator tag element %s was %d\n", //$NON-NLS-1$ + "Time to create validator tag element %s was %d\n", name, Long.valueOf(System.nanoTime() - startTime)); } return element; @@ -643,9 +611,9 @@ public final class TagAnalyzer if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR_PERF) { String name = element != null ? element.toString() - : "<none>"; //$NON-NLS-1$ + : "<none>"; System.out.printf( - "Time to create handler tag element %s was %d\n", //$NON-NLS-1$ + "Time to create handler tag element %s was %d\n", name, Long.valueOf(System.nanoTime() - startTime)); } return element; @@ -653,7 +621,7 @@ public final class TagAnalyzer } catch (final JavaModelException jme) { - JSFCorePlugin.log(jme, "Trying to get type for TLD"); //$NON-NLS-1$ + JSFCorePlugin.log(jme, "Trying to get type for TLD"); } return null; @@ -674,7 +642,7 @@ public final class TagAnalyzer final String componentClass = DTComponentIntrospector .findComponentClass(componentType, project); - if (componentClass != null && !"".equals(componentClass.trim())) //$NON-NLS-1$ + if (componentClass != null && !"".equals(componentClass.trim())) { final ComponentTypeInfo typeInfo = DTComponentIntrospector .getComponent(componentType, componentClass, project, @@ -709,7 +677,7 @@ public final class TagAnalyzer final String converterClass = DTComponentIntrospector .findConverterClass(converterId, project); - if (converterClass != null && !"".equals(converterClass.trim())) //$NON-NLS-1$ + if (converterClass != null && !"".equals(converterClass.trim())) { final ConverterTypeInfo typeInfo = DTComponentIntrospector .getConverter(converterId, converterClass); @@ -739,7 +707,7 @@ public final class TagAnalyzer final String validatorClass = DTComponentIntrospector .findValidatorClass(validatorId, project); - if (validatorClass != null && !"".equals(validatorClass.trim())) //$NON-NLS-1$ + if (validatorClass != null && !"".equals(validatorClass.trim())) { final ValidatorTypeInfo typeInfo = DTComponentIntrospector .getValidator(validatorId, validatorClass); @@ -798,7 +766,7 @@ public final class TagAnalyzer JSFCoreTraceOptions .log(String .format( - "TagAnalyzer.getJSFComponentTagType: Determining Tag Type for type %s on project %s", //$NON-NLS-1$ + "TagAnalyzer.getJSFComponentTagType: Determining Tag Type for type %s on project %s", type.getFullyQualifiedName(), project .toString())); } @@ -852,8 +820,8 @@ public final class TagAnalyzer if (JSFCoreTraceOptions.TRACE_JSPTAGINTROSPECTOR) { JSFCoreTraceOptions.log(String.format( - "TagAnalyzer.getJSFComponentTagType: tag type is %s", //$NON-NLS-1$ - tagType != null ? tagType.toString() : "null")); //$NON-NLS-1$ + "TagAnalyzer.getJSFComponentTagType: tag type is %s", + tagType != null ? tagType.toString() : "null")); } return tagType; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/messages.properties b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/messages.properties deleted file mode 100644 index 15bf8c5b3..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/messages.properties +++ /dev/null @@ -1 +0,0 @@ -UnresolvedJSPTagResolvingStrategy_1=Unresolved Tag Resolver diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/MasterIndex.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/MasterIndex.java index fd6415474..d9856995c 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/MasterIndex.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/MasterIndex.java @@ -63,7 +63,7 @@ class MasterIndex implements Serializable { if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { - JSFCoreTraceOptions.log("MasterIndex.create, version=:" //$NON-NLS-1$ + JSFCoreTraceOptions.log("MasterIndex.create, version=:" + version.toString()); } @@ -81,7 +81,7 @@ class MasterIndex implements Serializable { if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { - JSFCoreTraceOptions.log("Trying to save master index file: " //$NON-NLS-1$ + JSFCoreTraceOptions.log("Trying to save master index file: " + file.getAbsolutePath()); } @@ -92,7 +92,7 @@ class MasterIndex implements Serializable if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { JSFCoreTraceOptions - .log("Master index file written successfully: " //$NON-NLS-1$ + .log("Master index file written successfully: " + file.getAbsolutePath()); } } @@ -114,7 +114,7 @@ class MasterIndex implements Serializable { if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { - JSFCoreTraceOptions.log("Trying to load master index file: " //$NON-NLS-1$ + JSFCoreTraceOptions.log("Trying to load master index file: " + _storageFile.getAbsolutePath()); } @@ -127,9 +127,9 @@ class MasterIndex implements Serializable if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { JSFCoreTraceOptions - .log("Loaded master index file successfully:" //$NON-NLS-1$ + .log("Loaded master index file successfully:" + _storageFile.getAbsolutePath()); - JSFCoreTraceOptions.log("Initial contents: "); //$NON-NLS-1$ + JSFCoreTraceOptions.log("Initial contents: "); System.out.println(index.toString()); } } @@ -146,11 +146,11 @@ class MasterIndex implements Serializable { StringBuffer buffer = new StringBuffer(); - buffer.append(String.format("Header: %s\n\n", _header.toString())); //$NON-NLS-1$ + buffer.append(String.format("Header: %s\n\n", _header.toString())); for (final ProjectIndex projIndex : _projectIndices) { - buffer.append(String.format("\t%s\n", projIndex.toString())); //$NON-NLS-1$ + buffer.append(String.format("\t%s\n", projIndex.toString())); } return buffer.toString(); @@ -176,8 +176,8 @@ class MasterIndex implements Serializable catch (IOException ioe) { JSFCorePlugin.log(ioe, - "Failed to save master index. Project Index for " //$NON-NLS-1$ - + project.toString() + " may not be saved"); //$NON-NLS-1$ + "Failed to save master index. Project Index for " + + project.toString() + " may not be saved"); } return index; } @@ -190,7 +190,7 @@ class MasterIndex implements Serializable _projectIndices.remove(index); if (!index.remove()) { - throw new IOException("Failed to remove index file"); //$NON-NLS-1$ + throw new IOException("Failed to remove index file"); } } } @@ -255,7 +255,7 @@ class MasterIndex implements Serializable public String toString() { - return "Version: " + _version.toString(); //$NON-NLS-1$ + return "Version: " + _version.toString(); } } @@ -336,7 +336,7 @@ class MasterIndex implements Serializable { final long uniqueCode = Math .round((Math.random() * Integer.MAX_VALUE)); - final String fileName = String.format("Project_%s_%x.idx", //$NON-NLS-1$ + final String fileName = String.format("Project_%s_%x.idx", _projectName, Long.valueOf(uniqueCode)); _file = new File(new Path(_relativePath).append(fileName) .toOSString()); @@ -391,9 +391,9 @@ class MasterIndex implements Serializable public String toString() { - return "project= " + _projectName + ", relativePath=" //$NON-NLS-1$ //$NON-NLS-2$ - + _relativePath + ", lastModified=" //$NON-NLS-1$ - + _lastModStampOnProject + ", saveFile=" + _file; //$NON-NLS-1$ + return "project= " + _projectName + ", relativePath=" + + _relativePath + ", lastModified=" + + _lastModStampOnProject + ", saveFile=" + _file; } // public synchronized void save() diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/PersistedDataTagStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/PersistedDataTagStrategy.java index 6c95f0274..a1eebbe38 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/PersistedDataTagStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/PersistedDataTagStrategy.java @@ -49,14 +49,6 @@ public class PersistedDataTagStrategy extends JSPTagResolvingStrategy false); /** - * @return the descriptor for this resolver strategy - */ - public static StrategyDescriptor createDescriptor() - { - return new StrategyDescriptor(ID, DISPLAY_NAME); - } - - /** * @param project */ public PersistedDataTagStrategy(final IProject project) diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/TagRepository.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/TagRepository.java index 0d15744f8..df457f820 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/TagRepository.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/persistence/TagRepository.java @@ -30,8 +30,8 @@ class TagRepository { private final static Object GLOBAL_MASTER_INDEX_LOCK = new Object(); private static MasterIndex GLOBAL_MASTER_INDEX; - private final static String PATH_TO_REPOSITORY = "/.jsptagregistry"; //$NON-NLS-1$ - private final static String MASTER_INDEX_FILE_NAME = "tagRegistryMasterIndex.idx"; //$NON-NLS-1$ + private final static String PATH_TO_REPOSITORY = "/.jsptagregistry"; + private final static String MASTER_INDEX_FILE_NAME = "tagRegistryMasterIndex.idx"; private final IProject _project; //private Map<String, SerializableTLDNamespace> _namespaces; @@ -46,7 +46,7 @@ class TagRepository { if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { - JSFCoreTraceOptions.log("Loading tag repository for: " //$NON-NLS-1$ + JSFCoreTraceOptions.log("Loading tag repository for: " + _project.toString()); } @@ -57,17 +57,17 @@ class TagRepository if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { - JSFCoreTraceOptions.log("Contents of repo for: " //$NON-NLS-1$ + JSFCoreTraceOptions.log("Contents of repo for: " + _project.toString()); for (final Map.Entry<String, SerializableTLDNamespace> nsEntry : namespaces.entrySet()) { - JSFCoreTraceOptions.log("\tNamespace: "+nsEntry.getKey()); //$NON-NLS-1$ + JSFCoreTraceOptions.log("\tNamespace: "+nsEntry.getKey()); SerializableTLDNamespace ns = nsEntry.getValue(); for (final ITagElement element : ns.getViewElements()) { - JSFCoreTraceOptions.log("\t\tTag: "+element.toString()); //$NON-NLS-1$ + JSFCoreTraceOptions.log("\t\tTag: "+element.toString()); } } } @@ -103,7 +103,7 @@ class TagRepository if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { JSFCoreTraceOptions - .log("GLOBAL_MASTER_INDEX already exists for: " //$NON-NLS-1$ + .log("GLOBAL_MASTER_INDEX already exists for: " + _project.toString()); } return GLOBAL_MASTER_INDEX; @@ -124,12 +124,12 @@ class TagRepository if (!masterIndexFile.createNewFile()) { throw new IOException( - "Could not create new master index file: " //$NON-NLS-1$ + "Could not create new master index file: " + masterIndexFile.toString()); } if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { - JSFCoreTraceOptions.log("Creating master index file for " //$NON-NLS-1$ + JSFCoreTraceOptions.log("Creating master index file for " + _project.toString()); } index.create(new SerializableVersion(1, 0, 0)); @@ -138,7 +138,7 @@ class TagRepository { if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { - JSFCoreTraceOptions.log("Loading master index file for " //$NON-NLS-1$ + JSFCoreTraceOptions.log("Loading master index file for " + _project.toString()); } index.load(new SerializableVersion(1, 0, 0)); @@ -153,13 +153,13 @@ class TagRepository { if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE) { - JSFCoreTraceOptions.log("Creating repo directory: " //$NON-NLS-1$ + JSFCoreTraceOptions.log("Creating repo directory: " + repoDir.getAbsolutePath()); } if (!repoDir.mkdir()) { - throw new IOException("Failed to create repo directory: " //$NON-NLS-1$ + throw new IOException("Failed to create repo directory: " + repoDir.getAbsolutePath()); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/LibraryOperation.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/LibraryOperation.java index 403fea914..31cfeb078 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/LibraryOperation.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/LibraryOperation.java @@ -37,7 +37,7 @@ abstract class LibraryOperation implements Runnable catch (final Exception e) { _result = new Status(IStatus.ERROR, JSFCorePlugin.PLUGIN_ID, - "Problem during run", e); //$NON-NLS-1$ + "Problem during run", e); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryManager.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryManager.java index e3463d033..094dff0de 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryManager.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryManager.java @@ -22,7 +22,6 @@ import org.eclipse.core.runtime.Status; import org.eclipse.jst.jsf.common.internal.resource.ResourceSingletonObjectManager; import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; import org.eclipse.jst.jsf.core.internal.JSFCoreTraceOptions; -import org.eclipse.jst.jsf.designtime.internal.Messages; import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry; import org.eclipse.jst.jsf.designtime.internal.view.model.TagRegistryFactory; @@ -50,7 +49,7 @@ public final class TLDRegistryManager extends if (JSFCoreTraceOptions.TRACE_TLDREGISTRYMANAGER) { JSFCoreTraceOptions - .log("TLDRegistryManager: Initializing TLDRegistryManager singleton"); //$NON-NLS-1$ + .log("TLDRegistryManager: Initializing TLDRegistryManager singleton"); } INSTANCE = new TLDRegistryManager(); } @@ -70,7 +69,7 @@ public final class TLDRegistryManager extends } catch (CoreException e) { - JSFCorePlugin.log(e, "TLDRegistryManager failed to install save participant"); //$NON-NLS-1$ + JSFCorePlugin.log(e, "TLDRegistryManager failed to install save participant"); } } @@ -80,7 +79,7 @@ public final class TLDRegistryManager extends if (JSFCoreTraceOptions.TRACE_TLDREGISTRYMANAGER) { JSFCoreTraceOptions - .log("TLDRegistryManager: creating new instance for " //$NON-NLS-1$ + .log("TLDRegistryManager: creating new instance for " + project.toString()); } @@ -93,7 +92,7 @@ public final class TLDRegistryManager extends if (JSFCoreTraceOptions.TRACE_TLDREGISTRYMANAGER) { JSFCoreTraceOptions - .log("TLDRegistryManager: Acquired instance for " //$NON-NLS-1$ + .log("TLDRegistryManager: Acquired instance for " + resource.toString()); } } @@ -103,7 +102,7 @@ public final class TLDRegistryManager extends { if (JSFCoreTraceOptions.TRACE_TLDREGISTRYMANAGER) { - JSFCoreTraceOptions.log("TLDRegistryManager: Getting registry for " //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDRegistryManager: Getting registry for " + resource.toString()); } } @@ -130,16 +129,11 @@ public final class TLDRegistryManager extends } } - @Override - public boolean isInstance(IProject project) - { - return getGlobalManager().isInstance(project); - } - public String getDisplayName() { - return Messages.TLDRegistryManager_DisplayName; + return "JSP Registry Factory"; } + } private class MyWorkspaceSaveParticipant implements ISaveParticipant @@ -148,7 +142,7 @@ public final class TLDRegistryManager extends { if (JSFCoreTraceOptions.TRACE_TLDREGISTRYMANAGER) { - JSFCoreTraceOptions.log("MyWorkspaceSaveParticipant.saving: Kind="+context.getKind()); //$NON-NLS-1$ + JSFCoreTraceOptions.log("MyWorkspaceSaveParticipant.saving: Kind="+context.getKind()); } try { @@ -171,7 +165,7 @@ public final class TLDRegistryManager extends catch (ManagedObjectException moe) { throw new CoreException(new Status(IStatus.ERROR, - JSFCorePlugin.PLUGIN_ID, "Couldn't commit workspace", //$NON-NLS-1$ + JSFCorePlugin.PLUGIN_ID, "Couldn't commit workspace", moe)); } } @@ -181,7 +175,7 @@ public final class TLDRegistryManager extends { if (JSFCoreTraceOptions.TRACE_TLDREGISTRYMANAGER) { - JSFCoreTraceOptions.log("MyWorkspaceSaveParticipant.saveProject: Project="+project.toString()); //$NON-NLS-1$ + JSFCoreTraceOptions.log("MyWorkspaceSaveParticipant.saveProject: Project="+project.toString()); } // check that there is already instance -- don't do anything if there @@ -192,7 +186,7 @@ public final class TLDRegistryManager extends .getInstance(project); if (JSFCoreTraceOptions.TRACE_TLDREGISTRYMANAGER) { - JSFCoreTraceOptions.log("MyWorkspaceSaveParticipant.saveProject: calling checkpoint on registry: "+registry.toString()); //$NON-NLS-1$ + JSFCoreTraceOptions.log("MyWorkspaceSaveParticipant.saveProject: calling checkpoint on registry: "+registry.toString()); } registry.checkpoint(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryPreferences.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryPreferences.java index 593597ea7..aa0ed8f58 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryPreferences.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryPreferences.java @@ -12,66 +12,44 @@ package org.eclipse.jst.jsf.designtime.internal.view.model.jsp.registry; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.atomic.AtomicBoolean; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.util.IPropertyChangeListener; -import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jst.jsf.common.internal.policy.OrderedListProvider; import org.eclipse.jst.jsf.common.internal.policy.OrderedListProvider.OrderableObject; -import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.DefaultJSPTagResolver; import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TagIntrospectingStrategy; -import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.JSPTagResolvingStrategy.StrategyDescriptor; import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.persistence.PersistedDataTagStrategy; /** - * Preferences model for the TLD registry. This class is not thread-safe and - * a single instance should only be used by one owner. + * Preferences model for the TLD registry * * @author cbateman * */ public class TLDRegistryPreferences { - private final static Map<String, StrategyDescriptor> ALL_KNOWN_STRATEGIES; - private final IPreferenceStore _prefStore; - private final CopyOnWriteArrayList<PropertyListener> _listeners; - private final AtomicBoolean _isDisposed = new AtomicBoolean(false); - private final static String KEY_STRATEGY_ID_ORDER = "org.eclipse.jst.jsf.designtime.jsp.registry.StrategyIDOrder"; //$NON-NLS-1$ + private final static String KEY_STRATEGY_ID_ORDER = "org.eclipse.jst.jsf.designtime.jsp.registry.StrategyIDOrder"; private final static List<OrderableObject> DEFAULT_STRATEGY_ORDER; static { final List<OrderableObject> list = new ArrayList<OrderableObject>(); - - // NOTE !!! this ordering is important and effects the default order - // in which strategies will be consulted !!! - list.add(new OrderableObject(new StrategyIdentifier(PersistedDataTagStrategy.createDescriptor()), true)); - list.add(new OrderableObject(new StrategyIdentifier(DefaultJSPTagResolver.createDescriptor()), true)); - list.add(new OrderableObject(new StrategyIdentifier(TagIntrospectingStrategy.createDescriptor()), true)); + list.add(new OrderableObject(new StrategyIdentifier(PersistedDataTagStrategy.DISPLAY_NAME, + PersistedDataTagStrategy.ID), true)); + list.add(new OrderableObject(new StrategyIdentifier(DefaultJSPTagResolver.DISPLAY_NAME, + DefaultJSPTagResolver.ID), true)); + list.add(new OrderableObject(new StrategyIdentifier(TagIntrospectingStrategy.DISPLAY_NAME, + TagIntrospectingStrategy.ID), true)); + // list.add(UnresolvedJSPTagResolvingStrategy.ID); DEFAULT_STRATEGY_ORDER = Collections.unmodifiableList(list); - - - final Map<String, StrategyDescriptor> knownDescriptors = new HashMap<String, StrategyDescriptor>(); - for (final OrderableObject object : DEFAULT_STRATEGY_ORDER) - { - StrategyIdentifier strategyId = (StrategyIdentifier) object.getObject(); - knownDescriptors.put(strategyId.getId(), strategyId._descriptor); - } - ALL_KNOWN_STRATEGIES = Collections.unmodifiableMap(knownDescriptors); } private List<OrderableObject> _ids; private List<OrderableObject> _originalIds; - private IPropertyChangeListener _propertyListener; /** * Constructor @@ -82,86 +60,6 @@ public class TLDRegistryPreferences { _prefStore = prefStore; _ids = new ArrayList<OrderableObject>(); - _listeners = new CopyOnWriteArrayList<PropertyListener>(); - } - - /** - * Dispose of this preferences object - */ - public void dispose() - { - if (_isDisposed.compareAndSet(false, true)) - { - if (_propertyListener != null) - { - _prefStore.removePropertyChangeListener(_propertyListener); - } - } - } - - void addListener(final PropertyListener propListener) - { - if (!assertNotDisposed()) - { - return; - } - - if (_propertyListener == null) - { - _propertyListener = new IPropertyChangeListener() - { - public void propertyChange(PropertyChangeEvent event) - { - if (KEY_STRATEGY_ID_ORDER.equals(event.getProperty())) - { - fireStrategyOrderChanged(); - } - } - }; - - _prefStore.addPropertyChangeListener(_propertyListener); - } - _listeners.addIfAbsent(propListener); - } - - void removeListener(final PropertyListener propListener) - { - if (!assertNotDisposed()) - { - return; - } - _listeners.remove(propListener); - - if (_listeners.isEmpty()) - { - _prefStore.removePropertyChangeListener(_propertyListener); - _propertyListener = null; - } - } - - private void fireStrategyOrderChanged() - { - if (!assertNotDisposed()) - { - return; - } - for (final PropertyListener listener : _listeners) - { - listener.strategyOrderChanged(); - } - } - - /** - * @return false if the assertion fails - */ - private boolean assertNotDisposed() - { - if (_isDisposed.get()) - { - JSFCorePlugin.log(new Exception("Stack trace only"), "TLDRegistryPreferences is disposed"); //$NON-NLS-1$ //$NON-NLS-2$ - return false; - } - return true; } /** @@ -249,12 +147,12 @@ public class TLDRegistryPreferences for (final OrderableObject id : ids) { StrategyIdentifier strategyId = (StrategyIdentifier) id.getObject(); - buffer.append("dummyValue"); //$NON-NLS-1$ - buffer.append(","); //$NON-NLS-1$ + buffer.append(strategyId.getDisplayName()); + buffer.append(","); buffer.append(strategyId.getId()); - buffer.append(","); //$NON-NLS-1$ + buffer.append(","); buffer.append(id.isEnabled()); - buffer.append(","); //$NON-NLS-1$ + buffer.append(","); } return buffer.toString(); } @@ -262,36 +160,28 @@ public class TLDRegistryPreferences private List<OrderableObject> deserialize(final String serializedList) { final List<OrderableObject> list = new ArrayList<OrderableObject>(); - final String[] ids = serializedList.split(","); //$NON-NLS-1$ + final String[] ids = serializedList.split(","); if ((ids.length % 3) != 0) { - return null; + return new ArrayList<OrderableObject>(); } for (int i = 0; i < ids.length; i += 3) { - /// ingore the dummy value: final String displayName = ids[i]; + final String displayName = ids[i]; String id = ids[i + 1]; final String enabled = ids[i + 2]; // fix old id for meta-data resolver - if ("org.eclipse.jst.jsf.THISISTEMPORARY".equals(id)) //$NON-NLS-1$ + if ("org.eclipse.jst.jsf.THISISTEMPORARY".equals(id)) { id = DefaultJSPTagResolver.ID; } - final StrategyDescriptor desc = ALL_KNOWN_STRATEGIES.get(id); - - if (desc == null) - { - JSFCorePlugin.log(new Exception("Stack trace only"), "Error: unknown strategy id: "+id); //$NON-NLS-1$ //$NON-NLS-2$ - } - else - { - final StrategyIdentifier strategyIdentifier = new StrategyIdentifier(desc); - list.add(new OrderableObject(strategyIdentifier - , Boolean.valueOf(enabled).booleanValue())); - } + final StrategyIdentifier strategyIdentifier = new StrategyIdentifier( + displayName, id); + list.add(new OrderableObject(strategyIdentifier + , Boolean.valueOf(enabled).booleanValue())); } return list; } @@ -305,8 +195,6 @@ public class TLDRegistryPreferences { prefStore.setValue(KEY_STRATEGY_ID_ORDER, serialize(getStrategyIdOrdering())); - // refresh local copy of preferences - load(); } /** @@ -335,11 +223,13 @@ public class TLDRegistryPreferences */ public static class StrategyIdentifier { - private final StrategyDescriptor _descriptor; + private final String _id; + private final String _displayName; - StrategyIdentifier(final StrategyDescriptor descriptor) + StrategyIdentifier(final String displayName, final String id) { - _descriptor = descriptor; + _displayName = displayName; + _id = id; } /** @@ -347,7 +237,15 @@ public class TLDRegistryPreferences */ public String getId() { - return _descriptor.getId(); + return _id; + } + + /** + * @return the display name for the strategy + */ + public String getDisplayName() + { + return _displayName; } @Override @@ -355,7 +253,7 @@ public class TLDRegistryPreferences { if (obj instanceof StrategyIdentifier) { - return getId().equals(((StrategyIdentifier)obj).getId()); + return _id.equals(((StrategyIdentifier)obj)._id); } return false; } @@ -363,15 +261,7 @@ public class TLDRegistryPreferences @Override public int hashCode() { - return getId().hashCode(); - } - - /** - * @return the display name of the strategy - */ - public String getDisplayName() - { - return _descriptor.getDisplayName(); + return _id.hashCode(); } } @@ -384,8 +274,4 @@ public class TLDRegistryPreferences } } - static abstract class PropertyListener - { - public abstract void strategyOrderChanged(); - } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDTagRegistry.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDTagRegistry.java index b2248085d..e96d3f284 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDTagRegistry.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDTagRegistry.java @@ -32,7 +32,6 @@ import org.eclipse.jst.jsf.common.internal.policy.IdentifierOrderedIteratorPolic import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace; import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; import org.eclipse.jst.jsf.core.internal.JSFCoreTraceOptions; -import org.eclipse.jst.jsf.designtime.internal.Messages; import org.eclipse.jst.jsf.designtime.internal.view.model.AbstractTagRegistry; import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.CompositeTagResolvingStrategy; import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.DefaultJSPTagResolver; @@ -65,8 +64,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements private final Job _changeJob; private final PersistedDataTagStrategy _persistedTagStrategy; private TagIndexListener _tagIndexListener; - private final TLDRegistryPreferences _prefs; - private final MyPropertyListener _myPropertyListener; + private TLDRegistryPreferences _prefs; TLDTagRegistry(final IProject project) { @@ -74,12 +72,13 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements _nsResolved = new HashMap<String, TLDNamespace>(); _prefs = new TLDRegistryPreferences(JSFCorePlugin.getDefault().getPreferenceStore()); - _myPropertyListener = new MyPropertyListener(); - _prefs.addListener(_myPropertyListener); _prefs.load(); final IdentifierOrderedIteratorPolicy<String> policy = getTagResolvingPolicy(); - + // exclude things that are not explicitly listed in the policy. That + // way preference-based disablement will cause those strategies to + // be excluded. + policy.setExcludeNonExplicitValues(true); _resolver = new CompositeTagResolvingStrategy<TLDElementDeclaration>( policy); @@ -107,10 +106,6 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements final IdentifierOrderedIteratorPolicy<String> policy = new IdentifierOrderedIteratorPolicy<String>( strategyOrdering); - // exclude things that are not explicitly listed in the policy. That - // way preference-based disablement will cause those strategies to - // be excluded. - policy.setExcludeNonExplicitValues(true); return policy; } @@ -118,7 +113,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements { if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { - JSFCoreTraceOptions.log("TLDTagRegistry: Disposing for project " //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDTagRegistry: Disposing for project " + _project.toString()); } @@ -132,7 +127,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { JSFCoreTraceOptions - .log("TLDTagRegistry: Done disposing registry for " //$NON-NLS-1$ + .log("TLDTagRegistry: Done disposing registry for " + _project.toString()); } } @@ -151,25 +146,25 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements } catch (IOException e) { - JSFCorePlugin.log(e, "Checkpointing JSP tags failed"); //$NON-NLS-1$ + JSFCorePlugin.log(e, "Checkpointing JSP tags failed"); } catch (ClassNotFoundException e) { - JSFCorePlugin.log(e, "Checkpointing JSP tags failed"); //$NON-NLS-1$ + JSFCorePlugin.log(e, "Checkpointing JSP tags failed"); } } @Override protected Job getRefreshJob(final boolean flushCaches) { - return new Job(Messages.TLDTagRegistry_RefreshJob + _project.getName()) + return new Job("Refreshing JSP tag registry for " + _project.getName()) { @Override protected IStatus run(final IProgressMonitor monitor) { if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { - JSFCoreTraceOptions.log("TLDTagRegistry.refresh: start"); //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDTagRegistry.refresh: start"); } synchronized (TLDTagRegistry.this) @@ -177,7 +172,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { JSFCoreTraceOptions - .log("TLDTagRegistry.refresh: start"); //$NON-NLS-1$ + .log("TLDTagRegistry.refresh: start"); } final List<Namespace> namespaces = new ArrayList( @@ -205,7 +200,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { JSFCoreTraceOptions - .log("TLDTagRegistry.refresh: finished"); //$NON-NLS-1$ + .log("TLDTagRegistry.refresh: finished"); } return Status.OK_STATUS; } @@ -219,7 +214,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements { if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { - JSFCoreTraceOptions.log("TLDTagRegistry.initialize: start"); //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDTagRegistry.initialize: start"); } final ITaglibRecord[] tldrecs = TaglibIndex @@ -244,7 +239,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements if (JSFCoreTraceOptions.TRACE_TLDREGISTRYMANAGER) { JSFCoreTraceOptions - .log("TLDRegistryManager: installing tag index listener due to create instance for " //$NON-NLS-1$ + .log("TLDRegistryManager: installing tag index listener due to create instance for " + _project.toString()); } @@ -261,7 +256,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { - JSFCoreTraceOptions.log("TLDTagRegistry.initialize: finished"); //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDTagRegistry.initialize: finished"); } } @@ -272,7 +267,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements { if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_CHANGES) { - JSFCoreTraceOptions.log("TLDTagRegistry.initialize_TagRecord: Initializing new tld record: "+tagRecord.toString()); //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDTagRegistry.initialize_TagRecord: Initializing new tld record: "+tagRecord.toString()); } long startTime = 0; @@ -298,7 +293,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_PERF) { - System.out.printf("Time to update namespace %s was %d\n", //$NON-NLS-1$ + System.out.printf("Time to update namespace %s was %d\n", ns.getNSUri(), Long.valueOf(System.nanoTime() - startTime)); } @@ -309,7 +304,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements { if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_CHANGES) { - JSFCoreTraceOptions.log("TLDTagRegistry.initialize_TagRecord: Skipping tag record for "+tagRecord.toString()); //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDTagRegistry.initialize_TagRecord: Skipping tag record for "+tagRecord.toString()); } } @@ -341,7 +336,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements { if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { - JSFCoreTraceOptions.log("TLDTagRegistry.getAllTagLibraries: start"); //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDTagRegistry.getAllTagLibraries: start"); } long startTime = 0; @@ -360,12 +355,12 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_PERF) { - System.out.println("Time to getAllTagLibraries for JSP: "+(System.nanoTime()-startTime)); //$NON-NLS-1$ + System.out.println("Time to getAllTagLibraries for JSP: "+(System.nanoTime()-startTime)); } if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { JSFCoreTraceOptions - .log("TLDTagRegistry.getAllTagLibraries: finished"); //$NON-NLS-1$ + .log("TLDTagRegistry.getAllTagLibraries: finished"); } return allTagLibraries; } @@ -379,7 +374,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements { if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { - JSFCoreTraceOptions.log("TLDTagRegistry.getTagLibrary: start uri=" //$NON-NLS-1$ + JSFCoreTraceOptions.log("TLDTagRegistry.getTagLibrary: start uri=" + uri); } @@ -393,7 +388,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY) { JSFCoreTraceOptions - .log("TLDTagRegistry.getTagLibrary: finished, result=" //$NON-NLS-1$ + .log("TLDTagRegistry.getTagLibrary: finished, result=" + ns.toString()); } return ns; @@ -404,7 +399,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements { return String .format( - "TLDRegistry for project %s, isDisposed=%s, hasBeenInitialized=%s, numberOfNamespace=%d", //$NON-NLS-1$ + "TLDRegistry for project %s, isDisposed=%s, hasBeenInitialized=%s, numberOfNamespace=%d", _project.toString(), Boolean.valueOf(isDisposed()), Boolean.valueOf(_hasBeenInitialized), Integer .valueOf(_nsResolved.size())); @@ -423,7 +418,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements public ChangeJob(final String projectName) { - super(Messages.TLDTagRegistry_UpdateJob + projectName); + super("Update job for project " + projectName); } @Override @@ -435,7 +430,7 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements LibraryOperation operation = null; final MultiStatus multiStatus = new MultiStatus( - JSFCorePlugin.PLUGIN_ID, 0, "Result of change job", //$NON-NLS-1$ + JSFCorePlugin.PLUGIN_ID, 0, "Result of change job", new Throwable()); while ((operation = _changeOperations.poll()) != null) { @@ -457,19 +452,4 @@ public final class TLDTagRegistry extends AbstractTagRegistry implements } } } - - private class MyPropertyListener extends TLDRegistryPreferences.PropertyListener - { - @Override - public void strategyOrderChanged() - { - synchronized(TLDTagRegistry.this) - { - _prefs.load(); - final IdentifierOrderedIteratorPolicy<String> policy = - getTagResolvingPolicy(); - _resolver.setPolicy(policy); - } - } - } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TagIndexListener.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TagIndexListener.java index b360a276f..0c075af57 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TagIndexListener.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TagIndexListener.java @@ -33,14 +33,14 @@ class TagIndexListener implements ITaglibIndexListener { if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_CHANGES) { - JSFCoreTraceOptions.log("TagIndexListener.indexChanged: start"); //$NON-NLS-1$ + JSFCoreTraceOptions.log("TagIndexListener.indexChanged: start"); } visitDelta(delta); if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_CHANGES) { - JSFCoreTraceOptions.log("TagIndexListener.indexChanged: finish"); //$NON-NLS-1$ + JSFCoreTraceOptions.log("TagIndexListener.indexChanged: finish"); } } @@ -58,7 +58,7 @@ class TagIndexListener implements ITaglibIndexListener if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_CHANGES) { JSFCoreTraceOptions.log(String.format( - "Processing add change: project=%s", project //$NON-NLS-1$ + "Processing add change: project=%s", project .getName())); } @@ -73,7 +73,7 @@ class TagIndexListener implements ITaglibIndexListener JSFCoreTraceOptions .log(String .format( - "Processing remove change: project=%s, tagrecord=%s", //$NON-NLS-1$ + "Processing remove change: project=%s, tagrecord=%s", project.getName())); } _registry.addLibraryOperation(_factory @@ -85,7 +85,7 @@ class TagIndexListener implements ITaglibIndexListener if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_CHANGES) { JSFCoreTraceOptions.log(String.format( - "Processing change: project=%s, tagrecord=%s", //$NON-NLS-1$ + "Processing change: project=%s, tagrecord=%s", project.getName())); } _registry.addLibraryOperation(_factory |