diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context')
112 files changed, 0 insertions, 20083 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/AbstractDelegatingFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/AbstractDelegatingFactory.java deleted file mode 100644 index 4dde2c0cf..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/AbstractDelegatingFactory.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; - -import org.eclipse.core.runtime.IAdaptable; - -/** - * An abstract implementation of the IDelegatingFactory interface - * - * Clients may extend this class. - * - * @author cbateman - * - */ -public abstract class AbstractDelegatingFactory implements IDelegatingFactory -{ - - /* instance attributes */ - - /** - * the list of registered factory delegates - */ - protected final CopyOnWriteArrayList<IAdaptable> _delegates; - - private final List<Class> _supportedDelegates; - - /** - * @param supportedDelegateTypes - * -- populates the list of classes used by the isValidDelegate - * contract - */ - protected AbstractDelegatingFactory(final Class[] supportedDelegateTypes) - { - _delegates = new CopyOnWriteArrayList<IAdaptable>(); - - final List<Class> supportedTypes = new ArrayList<Class>(); - supportedTypes.addAll(Arrays.asList(supportedDelegateTypes)); - _supportedDelegates = Collections.unmodifiableList(supportedTypes); - } - - /** - * @see org.eclipse.jst.jsf.context.IDelegatingFactory#addFactoryDelegate(org.eclipse.core.runtime.IAdaptable) - */ - public final void addFactoryDelegate(final IAdaptable delegate) - { - if (isValidDelegate(delegate)) - { - _delegates.addIfAbsent(delegate); - } - } - - /** - * @see org.eclipse.jst.jsf.context.IDelegatingFactory#removeFactoryDelegate(org.eclipse.core.runtime.IAdaptable) - */ - public final boolean removeFactoryDelegate(final IAdaptable delegate) - { - return _delegates.remove(delegate); - } - - /** - * @see org.eclipse.jst.jsf.context.IDelegatingFactory#getValidDelegateTypes() - */ - public final List<Class> getValidDelegateTypes() - { - return _supportedDelegates; - } - - /** - * @see org.eclipse.jst.jsf.context.IDelegatingFactory#isValidDelegate(org.eclipse.core.runtime.IAdaptable) - */ - public final boolean isValidDelegate(final IAdaptable delegate) - { - for (final Class clazz : _supportedDelegates) - { - // if the delegate supports one of the valid delegate classes - // via adaptation, then it is a valid delegate - if (delegate.getAdapter(clazz) != null) - { - return true; - } - } - - // if no found, delegate is not supported - return false; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/AbstractDocumentContext.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/AbstractDocumentContext.java deleted file mode 100644 index 9dad3487d..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/AbstractDocumentContext.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context; - - -/** - * A convenience super-type for all context instances that implement - * IDocumentContext or one of its sub-types. - * - * - * @author cbateman - * - */ -public abstract class AbstractDocumentContext implements IDocumentContext { - - /** - * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) - */ - public Object getAdapter(Class adapterClass) - { - if (adapterClass.equals(IDocumentContext.class)) - { - return this; - } - else if (adapterClass.equals(IModelContext.class)) - { - return this; - } - - return null; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IDelegatingFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IDelegatingFactory.java deleted file mode 100644 index 6e91576ef..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IDelegatingFactory.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context; - -import java.util.List; - -import org.eclipse.core.runtime.IAdaptable; - -/** - * Defines a type of factory that can have delegate factories to help it - * create an appropriate instance type. The general contract for implementors - * is: - * - * 1) You must follow the isValidDelegate contract. - * 2) You should try to create an instance yourself and only delegate - * if cannot do it yourself. Deviations from this rule must be - * clearly documented to ensure clients understand how the factory works. - * - * Clients may NOT implement this interface. - * Extend AbstractDelegatingFactory instead. - * - * @author cbateman - * - */ -public interface IDelegatingFactory -{ - /** -- Delegates */ - /** If this factory is asked to construct but does not know how to, - * it will ask each of its registered delegates to do so in the order - * they were added. - */ - - /** - * Adds delgate to the end of the list of factory delegates if the list - * does not already contain it. - * - * @param delegate - * @throws ClassCastException if delegate does not implement an expected - * interface. Each implementor can define what delegates are valid - * based on the isValidDelegate() and getValidDelegates contracts - */ - void addFactoryDelegate(IAdaptable delegate); - - - /** - * @param delegate - * @return true if delegate was removed, false if delegate wasn't in - * the list of delegates - */ - boolean removeFactoryDelegate(IAdaptable delegate); - - /** - * @return a list of Class objects that represent the interfaces - * that may be passed to addFactoryDelegate. Implementor should - * return at least one supported class. - */ - List<Class> getValidDelegateTypes(); - - - /** - * The return value of this method should conform to the following contract: - * - * Let v = getValidDelegates. Then isValidDelegate should return true - * only if the set of v contains a Class for which delegate.getAdapter(Class) - * returns a non-null value. - * - * @param delegate - * @return true if delegate is supported, false otherwise. - */ - boolean isValidDelegate(IAdaptable delegate); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IDocumentContext.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IDocumentContext.java deleted file mode 100644 index fe7d03339..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IDocumentContext.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context; - -/** - * Encapsulates runtime context in a JFace IDocument model - * - * Clients may NOT implement this interface directly but may sub-class - * Extend AbstractDocumentContext instead. - - * @author cbateman - * - */ -public interface IDocumentContext extends IModelContext -{ - // TODO: might make sense to have a getDocument() accessor here - // currently empty -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IModelContext.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IModelContext.java deleted file mode 100644 index 1ace325cd..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/IModelContext.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context; - -import org.eclipse.core.runtime.IAdaptable; - -/** - * Encapsulates the current runtime context in some model. - * - * This interface may be sub-classed but not implemented directly - */ -public interface IModelContext extends IAdaptable -{ - // current empty -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/package-info.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/package-info.java deleted file mode 100644 index f31d0b2ff..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - * - ********************************************************************************/ - -/** - * Model context framework. - */ -package org.eclipse.jst.jsf.context; diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/AbstractContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/AbstractContextResolver.java deleted file mode 100644 index d7b8c7cd7..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/AbstractContextResolver.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2007 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.resolver; - -import org.eclipse.jst.jsf.context.IModelContext; - -/** - * The super-class of all context resolver impls. - * - * @author cbateman - * - */ -public abstract class AbstractContextResolver implements IContextResolver { - - public abstract boolean canResolveContext(IModelContext modelContext); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/AbstractDocumentContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/AbstractDocumentContextResolver.java deleted file mode 100644 index 3571dc4d0..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/AbstractDocumentContextResolver.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2007 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.resolver; - -import org.eclipse.jst.jsf.context.IModelContext; - -/** - * The parent of all IDocumentContextResolver implementations. - * - * @author cbateman - * - */ -public abstract class AbstractDocumentContextResolver implements - IDocumentContextResolver { - - public abstract boolean canResolveContext(IModelContext modelContext); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/IContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/IContextResolver.java deleted file mode 100644 index 4471cabf9..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/IContextResolver.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.resolver; - -import org.eclipse.jst.jsf.context.IModelContext; - -/** - * Super type of all context resolvers. - * - * May be sub-classed but should not be implemented directly. - * Use AbstractContextResolver to implement. - * - * @author cbateman - * - */ -public interface IContextResolver -{ - /** - * @param modelContext - * @return true if this resolver can resolve context information - * based on this context - */ - boolean canResolveContext(IModelContext modelContext); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/IDocumentContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/IDocumentContextResolver.java deleted file mode 100644 index 0191c3f0b..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/IDocumentContextResolver.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver; - -/** - * The super-interface for all context resolvers that are related - * to IDocumentContext's. - * - * This interface may NOT be implemented by clients directly but may be sub-classed. - * Use AbstractDocumentContextResolver for implementation. - * - * @author cbateman - * - */ -public interface IDocumentContextResolver extends IContextResolver -{ - // currently empty -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/package-info.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/package-info.java deleted file mode 100644 index 27cb48d37..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - * - ********************************************************************************/ - -/** - * Context resolver framework. - */ -package org.eclipse.jst.jsf.context.resolver; diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IDOMContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IDOMContextResolver.java deleted file mode 100644 index 4677bc851..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IDOMContextResolver.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument; - -import org.eclipse.jst.jsf.context.resolver.IDocumentContextResolver; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -/** - * Defines a type of context resolver used to resolve the current context - * in the XML DOM context. - * - * This interface may be sub-classed or implemented by clients - * - * @author cbateman - * - */ -public interface IDOMContextResolver extends IDocumentContextResolver -{ - /** - * @return the complete DOM Document for this context or null if it - * cannot be resolved. - */ - Document getDOMDocument(); - - /** - * @return the node which the current context is pointing to. - * If document context is on an attribute will return that attribute - */ - Node getNode(); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IMetadataContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IMetadataContextResolver.java deleted file mode 100644 index 12e9987cc..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IMetadataContextResolver.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument; - -import java.util.List; - -import org.eclipse.jst.jsf.context.resolver.IDocumentContextResolver; - -/** - * Resolves meta-data for a particular context - * - * This interface may sub-classed or implemented by clients - * - * @author cbateman - * - */ -public interface IMetadataContextResolver extends IDocumentContextResolver -{ - /** - * @param key - * @return a list of one or more String values associated with key - * for the current context location. - */ - List getPropertyValue(String key); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IStructuredDocumentContextResolverFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IStructuredDocumentContextResolverFactory.java deleted file mode 100644 index 1727b2f39..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IStructuredDocumentContextResolverFactory.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument; - -import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver; -import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.impl.StructuredDocumentContextResolverFactory; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; - - -/** - * A factory for creating context resolvers that work with structured - * document contexts - * - * This factory may be used but not implemented or extended by clients. - * TODO: - * Note that getTextRegionResolver() will be moved to to an internal factory - * interface and should not be considered part of the provisional API - * - * @author cbateman - * - */ -public interface IStructuredDocumentContextResolverFactory -{ - - /** - * The global instance of the factory - */ - public static final IStructuredDocumentContextResolverFactory INSTANCE = StructuredDocumentContextResolverFactory.getInstance(); - - /** - * @param context - * @return a resolver capable of resolving information in context or null - * if one cannot be created. - */ - IDOMContextResolver getDOMContextResolver(IStructuredDocumentContext context); - - /** - * **Non-WTP Clients: this method should not be considered API** - * - * @param context - * @return a resolver capable of resolving information in the context or - * null if one cannot be created - */ - ITextRegionContextResolver getTextRegionResolver(IStructuredDocumentContext context); - - /** - * @param context - * @return a resolver capable of resolving information in the context or - * null if one cannot be created - */ - IWorkspaceContextResolver getWorkspaceContextResolver(IStructuredDocumentContext context); - - /** - * @param context - * @return a resolver capable of resolving information in the context - * or null one cannot be created - */ - ITaglibContextResolver getTaglibContextResolver(IStructuredDocumentContext context); - - /** - * @param context - * @return a resolver capable of resolving information in the context - * or null if one cannot be created - */ - IMetadataContextResolver getMetadataContextResolver(IStructuredDocumentContext context); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/ITaglibContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/ITaglibContextResolver.java deleted file mode 100644 index 34c4b6f6f..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/ITaglibContextResolver.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument; - -import org.eclipse.jst.jsf.context.resolver.IDocumentContextResolver; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * Defines a context resolver that resolves tag library information - * for a particular context. - * - * This interface may be sub-classed or implemented by clients - * - * @author cbateman - * - */ -public interface ITaglibContextResolver extends IDocumentContextResolver -{ - /** - * @param node - * @return the URI corresponding to the taglib that defines the - * node in the context document or null if it cannot be found - */ - String getTagURIForNodeName(Node node); - - /** - * @param uri - * @return the tag prefix used in the context document for - * the provided uri or null if it cannot be found. - */ - String getTagPrefixForURI(String uri); - - /** - * A list all tags in the document context that are called - * tagName defined in the namespace indicated by uri - * - * @param uri - * @param tagName - * @return a (possibly empty) list of tags -- must never - * be null. Indicate none found with an empty list. - */ - NodeList getTagsByNamespaceURI(String uri, String tagName); - - /** - * @param node - * @return true if node has a tag library associated with it in this context - */ - public boolean hasTag(Node node); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IWorkspaceContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IWorkspaceContextResolver.java deleted file mode 100644 index 9a9f39994..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/IWorkspaceContextResolver.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.jst.jsf.context.resolver.IDocumentContextResolver; - -/** - * A resolver to determine the current context within the Eclipse - * workspace. - * - * This interface may be sub-classed or implemented by clients - * - * @author cbateman - * - */ -public interface IWorkspaceContextResolver extends IDocumentContextResolver -{ - /** - * @return the project that contains the document context - * or null if it cannot be determined - */ - IProject getProject(); - - /** - * @return the resource that contains the document context - * or null if it cannot be determined. - * This should normally be an IFile. - */ - IResource getResource(); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/IStructuredDocumentContextResolverFactory2.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/IStructuredDocumentContextResolverFactory2.java deleted file mode 100644 index 4244d33b2..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/IStructuredDocumentContextResolverFactory2.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal; - -import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory; -import org.eclipse.jst.jsf.context.resolver.structureddocument.ITaglibContextResolver; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; - -/** - * An additional factory interface for context resolvers. - * - * @author cbateman - * - */ -public interface IStructuredDocumentContextResolverFactory2 extends - IStructuredDocumentContextResolverFactory -{ - /** - * The global instance of the factory - */ - public static final IStructuredDocumentContextResolverFactory2 INSTANCE = - (IStructuredDocumentContextResolverFactory2) IStructuredDocumentContextResolverFactory.INSTANCE; - - /** - * Same as getTaglibContextResolver but checks delegate factory first. - * - * @param context - * @return a resolver capable of resolving information in the context - * or null one cannot be created - */ - ITaglibContextResolver getTaglibContextResolverFromDelegates(IStructuredDocumentContext context); - - /** - * @param <T> resolver type - * @param context - * @param clazz - * @return resolver of type T - */ - <T> T getResolver(IStructuredDocumentContext context, Class<T> clazz); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/ITextRegionContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/ITextRegionContextResolver.java deleted file mode 100644 index aca84351e..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/ITextRegionContextResolver.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal; - -import org.eclipse.jst.jsf.context.resolver.IDocumentContextResolver; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; - -/** - * Defines a resolver that can resolve context information in the - * structured document region context. - * - * Unless otherwise stated, the context region is the most specific - * region (leaf) in which the current context is contained. - * - * Note: this interface may use internal/provisional types. - * - * @author cbateman - * - */ -public interface ITextRegionContextResolver extends IDocumentContextResolver -{ - /** - * @return the text for the context region - */ - String getRegionText(); - - /** - * @return the document relative offset of the start of the region - * in which the context in is contained or -1 if the offset cannot be determined. - */ - int getStartOffset(); - - /** - * @return the document relative offset of the end of the region - * in which the context is contained or -1 if the offset cannot be determined - */ - int getEndOffset(); - - /** - * @return the length of the most specific region in which the context - * is contained or -1 if the length cannot be determined. - */ - int getLength(); - - /** - * @return the most specific TextRegion type for the current context - */ - String getRegionType(); - - /** - * @return the path to the most specific TextRegtion for the current context - * note that this does not include the actual region for the current region. - * That is returned by getRegionType(). - * - */ - String[] getRegionTypePath(); - - - /** - * The offset into the structured document will be set to be - * the start offset of the previous region - * - * @return a context for the previous sibling of this context's - * text region parent or null if no previous sibling exists - */ - IStructuredDocumentContext getPreviousContext(); - - /** - * The offset into the structured document will be set to be - * the start offset of the next region - * - * @return a context for the next sibling of this context's - * text region parent or null if no next sibling exists - */ - IStructuredDocumentContext getNextContext(); - - /** - * Relative path works backwards from the current context. So if the - * path to current context is /a/b/c/d/e then: - * - * matchesRelative({"e"}) == true - * matchesRelative({"d", "e"}) == true - * matchesRelative({"c", "d", "e"}) == true - * matchesRelative({"b", "c", "d", "e"}) == true - * matchesRelative({"a", "b", "c", "d", "e"}) == true - * - * because in every case the path matches working backward from the current - * context - * - * but - * - * matchesRelative({a}) == false because context/.. == e not a - * - * TODO: what does path = new String[0] mean? - * - * @param path - * @return true if the relative path matches the path to the current context - * working relative to the current context. - */ - boolean matchesRelative(String[] path); - - /** - * Absolute path works forward from the root of the document to the - * current context. So if the path to the current context is /a/b/c/d/e then: - * - * matchesAbsolute({"a", "b", "c", "d", "e"}) == true - * - * but - * - * matchesAbsolute({"b", "c", "d", "e"}) == true because starting from the root - * you cannot follow /b/c/d/e to the context. - * - * @param path - * @return true if the absolute path from the root of the document - * matches the current context - */ - boolean matchesAbsolute(String[] path); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/ResolverUtil.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/ResolverUtil.java deleted file mode 100644 index fda4dbc56..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/ResolverUtil.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IWorkspaceContextResolver; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory; - -/** - * Internal convenience class to simplify regularly repeated tasks - * @author cbateman - * - */ -public final class ResolverUtil -{ - /** - * This method will generally only work if the document is an - * IStructuredDocument. - * - * @param document - * @return the IFile corresponding to document or null if not applicable. - * - */ - public static IFile getFileForDocument(final IDocument document) - { - final IStructuredDocumentContext context = - IStructuredDocumentContextFactory.INSTANCE.getContext(document, - -1); - - if (context != null) - { - final IWorkspaceContextResolver wkResolver = - IStructuredDocumentContextResolverFactory.INSTANCE - .getWorkspaceContextResolver(context); - - if (wkResolver != null) - { - final IResource res = wkResolver.getResource(); - - if (res instanceof IFile) - { - return (IFile) res; - } - } - } - return null; - } - - private ResolverUtil() - { - // no instantiation - throw new UnsupportedOperationException(); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/DOMContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/DOMContextResolver.java deleted file mode 100644 index 76d75938c..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/DOMContextResolver.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal.impl; - -import org.eclipse.jst.jsf.context.IModelContext; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IDOMContextResolver; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -/** - * Resolves DOM-related information in the provided context - * - * @author cbateman - * - */ -class DOMContextResolver implements IDOMContextResolver -{ - private final IStructuredDocumentContext _context; - //private ITextRegionContextResolver _regionResolver; // null; lazy initialized if needed - - DOMContextResolver(IStructuredDocumentContext context) - { - _context = context; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.IDOMContextResolver#getDOMDocument() - */ - public Document getDOMDocument() - { - return StructuredDocumentResolverUtil.getDOMDocument((IStructuredDocument)_context.getStructuredDocument()); - } - - public Node getNode() - { - IndexedRegion region = StructuredDocumentResolverUtil.getIndexedRegion((IStructuredDocument) _context.getStructuredDocument(), _context.getDocumentPosition()); - - if (region instanceof Node) - { - return (Node) region; - } - - return null; - } - - - public boolean canResolveContext(IModelContext modelContext) - { - return modelContext.getAdapter(IStructuredDocumentContext.class) != null; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/MetadataContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/MetadataContextResolver.java deleted file mode 100644 index a1022e8fb..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/MetadataContextResolver.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal.impl; - -import java.util.Collections; -import java.util.List; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jst.jsf.common.metadata.Trait; -import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper; -import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext; -import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper; -import org.eclipse.jst.jsf.context.IModelContext; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IMetadataContextResolver; -import org.eclipse.jst.jsf.context.resolver.structureddocument.ITaglibContextResolver; -import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.IStructuredDocumentContextResolverFactory2; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.w3c.dom.Attr; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -/** - * A default implementation of meta-data context resolver - * - * @author cbateman - * - */ -class MetadataContextResolver implements IMetadataContextResolver -{ - private final IStructuredDocumentContext _context; - private final IStructuredDocumentContextResolverFactory2 _factory; - - /** - * @param factory - * @param context - */ - public MetadataContextResolver(final IStructuredDocumentContextResolverFactory2 factory, - final IStructuredDocumentContext context) - { - _factory = factory; - _context = context; - } - - public List getPropertyValue(final String key) - { - final DOMContextResolver domResolver = new DOMContextResolver(_context); - final WorkspaceContextResolver wsResolver = new WorkspaceContextResolver(_context); - final ITaglibContextResolver tagResolver = - _factory.getTaglibContextResolverFromDelegates(_context); - final Node curNode = domResolver.getNode(); - - if (curNode instanceof Attr) - { - final Attr attribute = (Attr) curNode; - final Element element = attribute.getOwnerElement(); - final String uri = tagResolver.getTagURIForNodeName(element); - final IProject project = wsResolver.getProject(); - - final ITaglibDomainMetaDataModelContext mdContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri); - Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(mdContext, element.getLocalName()+"/"+attribute.getLocalName(), key); //$NON-NLS-1$ - if( trait != null ) - { - return TraitValueHelper.getValueAsListOfStrings(trait); - } - - } - else if (curNode instanceof Element) - { - final Element element = (Element) curNode; - final String uri = tagResolver.getTagURIForNodeName(element); - final IProject project = wsResolver.getProject(); - - final ITaglibDomainMetaDataModelContext mdContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri); - Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(mdContext, element.getLocalName(), key); - if( trait != null ) - { - return TraitValueHelper.getValueAsListOfStrings(trait); - } - } - - return Collections.EMPTY_LIST; - } - - public boolean canResolveContext(IModelContext modelContext) { - return (modelContext.getAdapter(IStructuredDocumentContext.class) != null); - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/StructuredDocumentContextResolverFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/StructuredDocumentContextResolverFactory.java deleted file mode 100644 index a12d3a92d..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/StructuredDocumentContextResolverFactory.java +++ /dev/null @@ -1,349 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal.impl; - - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jst.jsf.context.AbstractDelegatingFactory; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IDOMContextResolver; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IMetadataContextResolver; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory; -import org.eclipse.jst.jsf.context.resolver.structureddocument.ITaglibContextResolver; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IWorkspaceContextResolver; -import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.IStructuredDocumentContextResolverFactory2; -import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; - -/** - * Implements a factory for creating context resolvers for structured document - * contexts. - * - * @author cbateman - * - */ -public class StructuredDocumentContextResolverFactory extends -AbstractDelegatingFactory implements -IStructuredDocumentContextResolverFactory, IStructuredDocumentContextResolverFactory2 -{ - /* static attributes */ - private static StructuredDocumentContextResolverFactory INSTANCE; - - /** - * @return an instance (possibly shared) of the this factory - */ - public synchronized static StructuredDocumentContextResolverFactory getInstance() - { - if (INSTANCE == null) - { - INSTANCE = new StructuredDocumentContextResolverFactory(); - } - - return INSTANCE; - } - - /** - * Constructor - */ - protected StructuredDocumentContextResolverFactory() - { - super(new Class[] - { IStructuredDocumentContextResolverFactory.class }); - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory#getDOMContextResolver(org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext) - */ - public IDOMContextResolver getDOMContextResolver( - final IStructuredDocumentContext context) - { - IDOMContextResolver resolver = internalGetDOMResolver(context); - - if (resolver == null) - { - resolver = delegateGetDOMResolver(context); - } - - return resolver; - } - - private IDOMContextResolver internalGetDOMResolver( - final IStructuredDocumentContext context) - { - if (context.getStructuredDocument() instanceof IStructuredDocument) - { - return new DOMContextResolver(context); - } - - return null; - } - - private IDOMContextResolver delegateGetDOMResolver( - final IStructuredDocumentContext context) - { - synchronized (_delegates) - { - for (final IAdaptable adaptable : _delegates) - { - - final IStructuredDocumentContextResolverFactory delegateFactory = (IStructuredDocumentContextResolverFactory) adaptable - .getAdapter(IStructuredDocumentContextResolverFactory.class); - - if (delegateFactory != null) - { - final IDOMContextResolver contextResolver = delegateFactory - .getDOMContextResolver(context); - - if (contextResolver != null) - { - return contextResolver; - } - } - } - - return null; - } - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory#getTextRegionResolver(org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext) - */ - public ITextRegionContextResolver getTextRegionResolver( - final IStructuredDocumentContext context) - { - ITextRegionContextResolver resolver = internalGetTextRegionResolver(context); - - if (resolver == null) - { - resolver = delegateGetTextRegionResolver(context); - } - - return resolver; - } - - private ITextRegionContextResolver internalGetTextRegionResolver( - final IStructuredDocumentContext context) - { - if (context.getStructuredDocument() instanceof IStructuredDocument) - { - return new TextRegionContextResolver(context); - } - - return null; - } - - private ITextRegionContextResolver delegateGetTextRegionResolver( - final IStructuredDocumentContext context) - { - synchronized (_delegates) - { - for (final Object element : _delegates) - { - final IStructuredDocumentContextResolverFactory delegateFactory = (IStructuredDocumentContextResolverFactory) ((IAdaptable) element) - .getAdapter(IStructuredDocumentContextResolverFactory.class); - final ITextRegionContextResolver contextResolver = delegateFactory - .getTextRegionResolver(context); - - if (contextResolver != null) - { - return contextResolver; - } - } - - return null; - } - } - - public IWorkspaceContextResolver getWorkspaceContextResolver( - final IStructuredDocumentContext context) - { - IWorkspaceContextResolver resolver = internalGetWorkspaceContextResolver(context); - - if (resolver == null) - { - resolver = delegateGetWorkspaceContextResolver(context); - } - - return resolver; - - } - - private IWorkspaceContextResolver internalGetWorkspaceContextResolver( - final IStructuredDocumentContext context) - { - if (context.getStructuredDocument() instanceof IStructuredDocument) - { - return new WorkspaceContextResolver(context); - } - - return null; - } - - private IWorkspaceContextResolver delegateGetWorkspaceContextResolver( - final IStructuredDocumentContext context) - { - synchronized (_delegates) - { - for (final Object element : _delegates) - { - final IStructuredDocumentContextResolverFactory delegateFactory = (IStructuredDocumentContextResolverFactory) ((IAdaptable) element) - .getAdapter(IStructuredDocumentContextResolverFactory.class); - final IWorkspaceContextResolver contextResolver = delegateFactory - .getWorkspaceContextResolver(context); - - if (contextResolver != null) - { - return contextResolver; - } - } - - return null; - } - } - - public ITaglibContextResolver getTaglibContextResolver( - final IStructuredDocumentContext context) - { - // check the delegats first - ITaglibContextResolver resolver = internalGetTaglibContextResolver(context); - - if (resolver == null) - { - resolver = delegateGetTaglibContextResolver(context); - } - - return resolver; - } - - public ITaglibContextResolver getTaglibContextResolverFromDelegates( - final IStructuredDocumentContext context) - { - // check the delegats first - ITaglibContextResolver resolver = delegateGetTaglibContextResolver(context); - - if (resolver == null) - { - resolver = internalGetTaglibContextResolver(context); - } - - return resolver; - } - - private ITaglibContextResolver internalGetTaglibContextResolver( - final IStructuredDocumentContext context) - { - // always delegate. No defaults. - return null; - } - - private ITaglibContextResolver delegateGetTaglibContextResolver( - final IStructuredDocumentContext context) - { - synchronized (_delegates) - { - for (final IAdaptable adapter : _delegates) - { - final IStructuredDocumentContextResolverFactory delegateFactory = - (IStructuredDocumentContextResolverFactory) adapter - .getAdapter(IStructuredDocumentContextResolverFactory.class); - - if (delegateFactory != null) - { - final ITaglibContextResolver contextResolver = delegateFactory - .getTaglibContextResolver(context); - - if (contextResolver != null) - { - return contextResolver; - } - } - } - - return null; - } - } - - public IMetadataContextResolver getMetadataContextResolver( - final IStructuredDocumentContext context) - { - IMetadataContextResolver resolver = internalGetMetadataContextResolver(context); - - if (resolver == null) - { - resolver = delegateGetMetadataContextResolver(context); - } - - return resolver; - } - - private IMetadataContextResolver internalGetMetadataContextResolver( - final IStructuredDocumentContext context) - { - if (context.getStructuredDocument() instanceof IStructuredDocument) - { - return new MetadataContextResolver(this, context); - } - - return null; - } - - private IMetadataContextResolver delegateGetMetadataContextResolver( - final IStructuredDocumentContext context) - { - synchronized (_delegates) - { - for (final Object element : _delegates) - { - final IStructuredDocumentContextResolverFactory delegateFactory = (IStructuredDocumentContextResolverFactory) ((IAdaptable) element) - .getAdapter(IStructuredDocumentContextResolverFactory.class); - final IMetadataContextResolver contextResolver = delegateFactory - .getMetadataContextResolver(context); - - if (contextResolver != null) - { - return contextResolver; - } - } - - return null; - } - } - - public <T> T getResolver(final IStructuredDocumentContext context, final Class<T> clazz) { - - { - synchronized (_delegates) - { - for (final IAdaptable adapter : _delegates) - { - final IStructuredDocumentContextResolverFactory delegateFactory = - (IStructuredDocumentContextResolverFactory) adapter - .getAdapter(IStructuredDocumentContextResolverFactory.class); - - if (delegateFactory != null - && delegateFactory instanceof IStructuredDocumentContextResolverFactory2) - { - final IStructuredDocumentContextResolverFactory2 contextResolverFactory = (IStructuredDocumentContextResolverFactory2)delegateFactory; - final T contextResolver = contextResolverFactory.getResolver(context, clazz); - if (contextResolver != null) - { - return contextResolver; - } - } - } - - return null; - } - } - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/StructuredDocumentResolverUtil.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/StructuredDocumentResolverUtil.java deleted file mode 100644 index 9a4a780ac..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/StructuredDocumentResolverUtil.java +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal.impl; - -import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; -import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -/** - * @author cbateman - * - * Defines common utility methods for document resolvers - */ -final class StructuredDocumentResolverUtil -{ - static IDOMDocument getDOMDocument(IStructuredDocument document) - { - IStructuredModel model = getStructuredModel(document); - - try - { - if (model instanceof IDOMModel) - { - return ((IDOMModel)model).getDocument(); - } - } - finally - { - if (model != null) - { - model.releaseFromRead(); - } - } - - return null; - } - - static IndexedRegion getIndexedRegion(final IStructuredDocument document, final int documentOffset) - { - // C.B: most of this logic was copied from ContentAssistUtils.getNodeAt - // I chose to copy rather than just call that because ContentAssistUtils is - // internal - IStructuredModel model = getStructuredModel(document); - IndexedRegion region = null; - if (model != null) - { - try - { - int lastOffset = documentOffset; - region = model.getIndexedRegion(documentOffset); - while (region == null && lastOffset >= 0) { - lastOffset--; - region = model.getIndexedRegion(lastOffset); - } - - // now we assume we have an element. But our context may be - // on an attribute in that node, so we need to check - if (region instanceof IDOMElement) - { - IDOMElement domElement = (IDOMElement) region; - - NamedNodeMap attributes = domElement.getAttributes(); - - for (int i = 0; i < attributes.getLength(); i++) - { - Node attrNode = attributes.item(i); - - if (attrNode instanceof IDOMAttr) - { - IDOMAttr attr = (IDOMAttr) attrNode; - - if (documentOffset >= attr.getStartOffset() - && documentOffset < attr.getEndOffset()) - { - region = attr; - break; - } - } - } - } - } - finally - { - model.releaseFromRead(); - } - } - - return region; - } - - /** - * @param document - * @return a structured model or null if one cannot be opened for document. - * Note: the caller is responsible for releasing the instance of structured - * model that gets returned. - */ - private static IStructuredModel getStructuredModel(IStructuredDocument document) - { - IModelManager modelManager = StructuredModelManager.getModelManager(); - - if (modelManager != null) - { - return StructuredModelManager.getModelManager().getModelForRead(document); - } - - return null; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TaglibContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TaglibContextResolver.java deleted file mode 100644 index 4b10c020e..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TaglibContextResolver.java +++ /dev/null @@ -1,163 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal.impl; - -import java.util.Iterator; - -import org.eclipse.jst.jsf.common.internal.JSPUtil; -import org.eclipse.jst.jsf.context.IModelContext; -import org.eclipse.jst.jsf.context.resolver.structureddocument.ITaglibContextResolver; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController; -import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager; -import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker; -import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.w3c.dom.Attr; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * TODO: this resolver only applies to structured documents that can have - * taglibs (I think only JSPs). Should we move a different package? - * Default taglib context resolver - * - * @author cbateman - * @deprecated Use ViewBasedTaglibResolver instead. This impl will be removed - * post-Helios. - */ -class TaglibContextResolver implements ITaglibContextResolver -{ - private final IStructuredDocumentContext _context; - - TaglibContextResolver(IStructuredDocumentContext context) - { - _context = context; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.ITaglibContextResolver#getTagPrefixForURI(java.lang.String) - */ - public String getTagPrefixForURI(String uri) - { - return null; - } - - public boolean hasTag(final Node node) - { - Node checkNode = node; - - if (node instanceof Attr) - { - checkNode = ((Attr)node).getOwnerElement(); - } - - return getTracker(checkNode) != null; - } - - private TaglibTracker getTracker(Node node) - { - final String prefix = node.getPrefix(); - - final TLDCMDocumentManager docMgr = - TaglibController.getTLDCMDocumentManager(_context.getStructuredDocument()); - - // if there's no prefix, there's no way to id the tag library - // TODO: is this always true? need to consult spec - // similar problem if couldn't load docMgr - if (prefix == null - || docMgr == null) - { - return null; - } - - for (final Iterator it = docMgr.getTaglibTrackers().iterator(); it.hasNext();) - { - final TaglibTracker tracker = (TaglibTracker) it.next(); - - if (prefix.equals(tracker.getPrefix())) - { - return tracker; - } - } - - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.ITaglibContextResolver#getTagURIForNodeName(org.w3c.dom.Node) - */ - public String getTagURIForNodeName(final Node node) - { - Node checkNode = node; - - if (node instanceof Attr) - { - checkNode = ((Attr)node).getOwnerElement(); - } - - final TaglibTracker tracker = getTracker(checkNode); - - if (tracker != null) - { - return tracker.getURI(); - } - - - return null; - } - - - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.ITaglibContextResolver#getTagsByNamespaceURI(java.lang.String, java.lang.String) - */ - public NodeList getTagsByNamespaceURI(String uri, String tagName) - { - //Document domDoc = new DOMContextResolver(_context).getDOMDocument(); - return null; - - } - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.resolver.IContextResolver#canResolveContext(org.eclipse.jst.jsf.context.IModelContext) - */ - public boolean canResolveContext(IModelContext modelContext) - { - // must be a JSP page - Object adapter = modelContext.getAdapter(IStructuredDocumentContext.class); - - if (adapter instanceof IStructuredDocumentContext) - { - IStructuredDocumentContext context = - (IStructuredDocumentContext) adapter; - IStructuredModel smodel = null; - - try - { - smodel = StructuredModelManager.getModelManager().getModelForRead((IStructuredDocument)context.getStructuredDocument()); - return JSPUtil.isJSPContentType(smodel.getContentTypeIdentifier()); - } - finally - { - if (smodel != null) - { - smodel.releaseFromRead(); - } - } - } - - return false; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TextRegionContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TextRegionContextResolver.java deleted file mode 100644 index 9cf0f218b..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TextRegionContextResolver.java +++ /dev/null @@ -1,295 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal.impl; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jst.jsf.context.IModelContext; -import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList; - -/*package*/ class TextRegionContextResolver implements ITextRegionContextResolver { - - private final IStructuredDocumentContext _context; - - /*package*/ TextRegionContextResolver(IStructuredDocumentContext context) - { - _context = context; - } - - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#getRegionText() - */ - public String getRegionText() - { - final ITextRegionCollection parent = getParentRegion(); - String text = null; - - if (parent != null) - { - ITextRegion me = parent.getRegionAtCharacterOffset(_context.getDocumentPosition()); - text = parent.getText(me); - } - - return text; - } - - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#getEndOffset() - */ - public int getEndOffset() { - final ITextRegionCollection parent = getParentRegion(); - int endOffset = -1; - if (parent != null) - { - ITextRegion me = parent.getRegionAtCharacterOffset(_context.getDocumentPosition()); - endOffset = parent.getEndOffset(me); - } - - return endOffset; - } - - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#getLength() - */ - public int getLength() { - final ITextRegionCollection parent = getParentRegion(); - int length = -1; - if (parent != null) - { - ITextRegion me = parent.getRegionAtCharacterOffset(_context.getDocumentPosition()); - length = me.getLength(); - } - - return length; - - } - - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#getStartOffset() - */ - public int getStartOffset() - { - final ITextRegionCollection parent = getParentRegion(); - int startOffset = -1; - if (parent != null) - { - ITextRegion me = parent.getRegionAtCharacterOffset(_context.getDocumentPosition()); - startOffset = parent.getStartOffset(me); - } - - return startOffset; - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#getRegionType() - */ - public String getRegionType() - { - final ITextRegionCollection parent = getParentRegion(); - String regionType = null; - - if (parent != null) - { - ITextRegion me = parent.getRegionAtCharacterOffset(_context.getDocumentPosition()); - - if (me != null) - { - regionType = me.getType(); - } - } - - return regionType; - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#getRegionTypePath() - */ - public String[] getRegionTypePath() { - final ITextRegion[] path = createPathToContext(); - final String[] typePath = new String[path.length]; - - for (int i = 0; i < path.length; i++) - { - typePath[i] = path[i].getType(); - } - - return typePath; - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#getNextContext() - */ - public IStructuredDocumentContext getNextContext() - { - ITextRegionCollection parent = getParentRegion(); - IStructuredDocumentContext newContext = null; - - if (parent != null) - { - final ITextRegion me = parent.getRegionAtCharacterOffset(_context.getDocumentPosition()); - ITextRegionList regions = parent.getRegions(); - ITextRegion nextRegion = null; - for (final Iterator it = regions.iterator(); it.hasNext();) - { - if (it.next() == me - && it.hasNext()) - { - nextRegion = (ITextRegion) it.next(); - } - } - - if (nextRegion != null) - { - // use the first position offset in the next region - final int documentPosition = parent.getStartOffset(nextRegion); - newContext = - IStructuredDocumentContextFactory.INSTANCE.getContext(_context.getStructuredDocument(), documentPosition); - } - } - - return newContext; - } - - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#getPreviousContext() - */ - public IStructuredDocumentContext getPreviousContext() - { - ITextRegionCollection parent = getParentRegion(); - IStructuredDocumentContext newContext = null; - - if (parent != null) - { - final ITextRegion me = parent.getRegionAtCharacterOffset(_context.getDocumentPosition()); - ITextRegionList regions = parent.getRegions(); - final Iterator it = regions.iterator(); - ITextRegion prevRegion = null; - ITextRegion nextRegion = null; - - SEARCH_LOOP: while (it.hasNext()) - { - nextRegion = (ITextRegion) it.next(); - - if (nextRegion == me) - { - break SEARCH_LOOP; - } - - prevRegion = nextRegion; - } - - if (prevRegion != null) - { - // use the last position offset in the prev region - final int documentPosition = parent.getStartOffset(prevRegion); - newContext = - IStructuredDocumentContextFactory.INSTANCE.getContext(_context.getStructuredDocument(), documentPosition); - } - } - - return newContext; - } - - private ITextRegionCollection getParentRegion() - { - final ITextRegion[] path = createPathToContext(); - ITextRegionCollection parent = null; - - if (path.length > 0) - { - parent = (ITextRegionCollection) path[path.length-1]; - } - - return parent; - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#matchesRelative(java.lang.String[]) - */ - public boolean matchesRelative(String[] path) { - final ITextRegion[] myPath = createPathToContext(); - return matchPath(myPath, path); - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver#matchesAbsolute(java.lang.String[]) - */ - public boolean matchesAbsolute(String[] path) - { - final ITextRegion[] myPath = createPathToContext(); - // only works if myPath and path are the same length - return (myPath.length == path.length) - && matchPath(myPath, path); - } - - private boolean matchPath(ITextRegion[] myPath, String[] path) - { - boolean matches = false; - - // only makes sense if path is a containing subset of myPath - if (path.length <= myPath.length) - { - matches = true; - SEARCH_LOOP: - for (int i = 1; i <= path.length; i++) - { - if (!path[path.length-i].equals(myPath[myPath.length-i].getType())) - { - matches = false; - break SEARCH_LOOP; - } - } - } - - return matches; - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.IContextResolver#canResolveContext(org.eclipse.jst.jsf.context.IModelContext) - */ - public boolean canResolveContext(IModelContext modelContext) - { - return (modelContext.getAdapter(IStructuredDocumentContext.class) != null); - } - - private ITextRegion[] createPathToContext() - { - final List regionPath = new ArrayList(); - - final IStructuredDocument doc = (IStructuredDocument) _context.getStructuredDocument(); - - ITextRegion container = doc.getRegionAtCharacterOffset(_context.getDocumentPosition()); - - while(container != null - && container instanceof ITextRegionCollection) - { - regionPath.add(container); - container = ((ITextRegionCollection)container).getRegionAtCharacterOffset(_context.getDocumentPosition()); - } - - return (ITextRegion[]) regionPath.toArray(new ITextRegion[0]); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/WorkspaceContextResolver.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/WorkspaceContextResolver.java deleted file mode 100644 index cb6363065..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/WorkspaceContextResolver.java +++ /dev/null @@ -1,135 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.resolver.structureddocument.internal.impl; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jst.jsf.context.IModelContext; -import org.eclipse.jst.jsf.context.resolver.structureddocument.IWorkspaceContextResolver; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; - -/** - * - * @author cbateman - * - */ -/*package*/ class WorkspaceContextResolver implements IWorkspaceContextResolver -{ - private final IStructuredDocumentContext _context; - - /*package*/WorkspaceContextResolver(IStructuredDocumentContext context) - { - _context = context; - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.structureddocument.IWorkspaceContextResolver#getProject() - */ - public IProject getProject() - { - // copied from ModelManagerImpl (with some rework by C.B.) - final String path = getPath(); - - if (path == null) - { - return null; - } - - // TOODO needs rework for linked resources - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - IPath iPath = new Path(path); - if (iPath.isAbsolute()) - { - String projectName = iPath.segment(0); - - IProject projects[] = root.getProjects(); - - for (int i = 0; i < projects.length; i++) - { - IProject project = projects[i]; - - if (project.isOpen() - && projectName.equals(project.getFullPath().segment(0))) - { - return project; // - } - } - } - - return null; - } - - public IResource getResource() - { - IProject project = getProject(); - - if (project != null) - { - final String path = getPath(); - - if (path != null) - { - final IPath iPath = new Path(path); - if (iPath.isAbsolute()) - { - return project.getFile(iPath.removeFirstSegments(1)); - } - } - } - return null; - } - - private String getPath() - { - IStructuredModel model = null; - - try - { - model = StructuredModelManager.getModelManager().getExistingModelForRead(_context.getStructuredDocument()); - - if (model == null) - return null; - String path = model.getBaseLocation(); - if (path == null || path.length() == 0) - { - Object id = model.getId(); - if (id == null) - return null; - path = id.toString(); - } - - return path; - } - finally - { - if (model != null) - { - model.releaseFromRead(); - } - } - } - - /** - * @see org.eclipse.jst.jsf.context.resolver.IContextResolver#canResolveContext(org.eclipse.jst.jsf.context.IModelContext) - */ - public boolean canResolveContext(IModelContext modelContext) - { - return (modelContext.getAdapter(IStructuredDocumentContext.class) != null); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/package-info.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/package-info.java deleted file mode 100644 index 538982108..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - * - ********************************************************************************/ - -/** - * Context resolvers for contexts based on SSE structured documents. - */ -package org.eclipse.jst.jsf.context.resolver.structureddocument; diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/AbstractStructuredDocumentContext.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/AbstractStructuredDocumentContext.java deleted file mode 100644 index b431d485f..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/AbstractStructuredDocumentContext.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.structureddocument; - -import org.eclipse.jst.jsf.context.AbstractDocumentContext; - -/** - * A convenience abstract super-class for context implementing - * the IStructuredDocumentContext interface - * - * Class may be sub-classed by clients - * - * @author cbateman - * - */ -public abstract class AbstractStructuredDocumentContext extends AbstractDocumentContext - implements IStructuredDocumentContext -{ - /** - * @see org.eclipse.jst.jsf.context.AbstractDocumentContext#getAdapter(java.lang.Class) - */ - public Object getAdapter(Class adapterClass) - { - if (adapterClass.equals(IStructuredDocumentContext.class)) - { - return this; - } - - return super.getAdapter(adapterClass); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/AbstractStructuredDocumentContextFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/AbstractStructuredDocumentContextFactory.java deleted file mode 100644 index 054fc71db..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/AbstractStructuredDocumentContextFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2007 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.structureddocument; - -import org.eclipse.jst.jsf.context.AbstractDelegatingFactory; - -/** - * Abstract implementation of IStructuredDocumentContextFactory that must be used - * by all implementers of new factories for document contexts. - * - * @author cbateman - * - */ -public abstract class AbstractStructuredDocumentContextFactory extends AbstractDelegatingFactory { - - /** - * @param supportedDelegateTypes - */ - protected AbstractStructuredDocumentContextFactory(Class[] supportedDelegateTypes) - { - super(supportedDelegateTypes); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContext.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContext.java deleted file mode 100644 index 2cf532885..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContext.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.structureddocument; - -import org.eclipse.jface.text.IDocument; -import org.eclipse.jst.jsf.context.IDocumentContext; - -/** - * Encapsulates runtime context in an SSE IStructuredDocument - * @author cbateman - * - * Interface must NOT be implemented by clients. - * Implementers should sub-class AbstractStructuredDocumentContext - * - */ -public interface IStructuredDocumentContext extends IDocumentContext -{ - /** - * @return the text viewer whose context we are in - */ - IDocument getStructuredDocument(); - /** - * @return the document position within the text viewer's context - * where we are. - */ - int getDocumentPosition(); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContextFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContextFactory.java deleted file mode 100644 index d9412dcc5..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContextFactory.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.structureddocument; - -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextViewer; -import org.eclipse.jst.jsf.context.structureddocument.internal.impl.StructuredDocumentContextFactory; -import org.w3c.dom.Node; - - -/** - * A factory method for constructing context objects related to - * SSE structured documents. - * - * May be sub-classed or implemented by clients - * - * @author cbateman - * - */ -public interface IStructuredDocumentContextFactory -{ - /** - * The default singleton instance of the factory - */ - public static final IStructuredDocumentContextFactory INSTANCE = - StructuredDocumentContextFactory.getInstance(); - - /** - * - * @param textViewer -- the text viewer where the context exists - * @param documentPosition -- the absolute position of the context relative to textViewer - * @return a context for a given text viewer and document position within the - * document model of that text viewer or null if one cannot be determined. - */ - IStructuredDocumentContext getContext(ITextViewer textViewer, int documentPosition); - - /** - * @param document -- the document - * @param documentPosition -- the absolute position of the context relative to the document - * @return a context for the document model or null if one cannot be determined - */ - IStructuredDocumentContext getContext(IDocument document, int documentPosition); - - /** - * @param document -- the document model - * @param node -- the DOM node within the document - * @return a context for the document model and dom node or null if one cannot - * be determined - */ - IStructuredDocumentContext getContext(IDocument document, Node node); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContextFactory2.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContextFactory2.java deleted file mode 100644 index 6e777419d..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/IStructuredDocumentContextFactory2.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.structureddocument; - -import org.eclipse.jst.jsf.context.structureddocument.internal.impl.StructuredDocumentContextFactory; -import org.w3c.dom.Element; - -/** - * A factory method for constructing context objects related to - * SSE structured documents. - * - * May be sub-classed or implemented by clients - * - */ -public interface IStructuredDocumentContextFactory2 extends - IStructuredDocumentContextFactory { - - /** - * The default singleton instance of the factory - */ - public static final IStructuredDocumentContextFactory2 INSTANCE = - StructuredDocumentContextFactory.getInstance(); - - /** - * @param element -- org.w3c.Element - * @return a context for the element or if null if one cannot be determined. - */ - IStructuredDocumentContext getContext(Element element); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/internal/impl/DefaultStructuredDocumentContext.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/internal/impl/DefaultStructuredDocumentContext.java deleted file mode 100644 index f4526e78c..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/internal/impl/DefaultStructuredDocumentContext.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.structureddocument.internal.impl; - -import org.eclipse.jface.text.IDocument; -import org.eclipse.jst.jsf.context.structureddocument.AbstractStructuredDocumentContext; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; - -/*package*/ class DefaultStructuredDocumentContext extends AbstractStructuredDocumentContext -{ - private final IStructuredDocument _structuredDocument; - private final int _documentPosition; - - /*package*/ DefaultStructuredDocumentContext(IStructuredDocument structuredDocument, int documentPosition) - { - _structuredDocument = structuredDocument; - _documentPosition = documentPosition; - } - - public int getDocumentPosition() - { - return _documentPosition; - } - - public IDocument getStructuredDocument() - { - return _structuredDocument; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/internal/impl/StructuredDocumentContextFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/internal/impl/StructuredDocumentContextFactory.java deleted file mode 100644 index 89f24f622..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/internal/impl/StructuredDocumentContextFactory.java +++ /dev/null @@ -1,270 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.structureddocument.internal.impl; - -import java.util.Iterator; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextViewer; -import org.eclipse.jst.jsf.context.structureddocument.AbstractStructuredDocumentContextFactory; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory2; -import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.ui.internal.StructuredTextViewer; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -/** - * @author cbateman - * - */ -public class StructuredDocumentContextFactory extends AbstractStructuredDocumentContextFactory - implements IStructuredDocumentContextFactory, IStructuredDocumentContextFactory2 -{ - /* static attributes */ - private static StructuredDocumentContextFactory INSTANCE; - - /** - * @param supportedDelegateTypes - */ - public StructuredDocumentContextFactory(Class[] supportedDelegateTypes) - { - super(supportedDelegateTypes); - } - - /** - * @return an instance (possibly shared) of the this factory - */ - public synchronized static StructuredDocumentContextFactory getInstance() - { - if (INSTANCE == null) - { - INSTANCE = new StructuredDocumentContextFactory(); - } - - return INSTANCE; - } - - - /** - * Construct the factory - */ - protected StructuredDocumentContextFactory() - { - super(new Class[] {IStructuredDocumentContextFactory.class}); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory#getContext(org.eclipse.jface.text.ITextViewer, int) - */ - public final IStructuredDocumentContext getContext(ITextViewer textViewer, int documentPosition) - { - // first see if I know how to make one - IStructuredDocumentContext context = internalGetContext(textViewer, documentPosition); - - // if I don't know, ask my delegates - if (context == null) - { - context = delegateGetContext(textViewer, documentPosition); - } - - return context; - } - - private IStructuredDocumentContext internalGetContext(ITextViewer textViewer, int documentPosition) - { - if (textViewer instanceof StructuredTextViewer) - { - IDocument document = ((StructuredTextViewer)textViewer).getDocument(); - return internalGetContext(document, documentPosition); - } - - return null; - } - - private IStructuredDocumentContext internalGetContext(IDocument document, int documentPosition) - { - if (document instanceof IStructuredDocument) - { - return new DefaultStructuredDocumentContext((IStructuredDocument)document, documentPosition); - } - - return null; - } - - private IStructuredDocumentContext delegateGetContext(ITextViewer textViewer, int documentPosition) - { - synchronized(_delegates) - { - for (final Iterator it = _delegates.iterator(); it.hasNext();) - { - IStructuredDocumentContextFactory delegateFactory = (IStructuredDocumentContextFactory) ((IAdaptable) it.next()).getAdapter(IStructuredDocumentContextFactory.class); - IStructuredDocumentContext context = delegateFactory.getContext(textViewer, documentPosition); - - if (context != null) - { - return context; - } - } - - return null; - } - } - - /** - * @see org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory#getContext(org.eclipse.jface.text.IDocument, int) - */ - public IStructuredDocumentContext getContext(IDocument document, int documentPosition) { - // first see if I know how to make one - IStructuredDocumentContext context = internalGetContext(document, documentPosition); - - // if I don't know, ask my delegates - if (context == null) - { - context = delegateGetContext(document, documentPosition); - } - - return context; - } - - private IStructuredDocumentContext delegateGetContext(IDocument document, int documentPosition) - { - synchronized(_delegates) - { - for (final Iterator it = _delegates.iterator(); it.hasNext();) - { - IStructuredDocumentContextFactory delegateFactory = (IStructuredDocumentContextFactory) ((IAdaptable) it.next()).getAdapter(IStructuredDocumentContextFactory.class); - IStructuredDocumentContext context = delegateFactory.getContext(document, documentPosition); - - if (context != null) - { - return context; - } - } - - return null; - } - } - - public IStructuredDocumentContext getContext(IDocument document, Node node) - { - // first see if I know how to make one - IStructuredDocumentContext context = internalGetContext(document, node); - - // if I don't know, ask my delegates - if (context == null) - { - context = delegateGetContext(document, node); - } - - return context; - - } - - - - private IStructuredDocumentContext internalGetContext(IDocument document, Node node) - { - if (document instanceof IStructuredDocument) - { - final IStructuredDocument sDoc = (IStructuredDocument) document; - if (node instanceof IndexedRegion) - { - final int position = ((IndexedRegion)node).getStartOffset(); - return new DefaultStructuredDocumentContext(sDoc, position); - } - else if (node instanceof IDOMAttr) - { - IDOMAttr attr = (IDOMAttr) node; - final int position = attr.getValueRegionStartOffset(); - return new DefaultStructuredDocumentContext(sDoc, position); - } - } - - return null; - } - - private IStructuredDocumentContext delegateGetContext(IDocument document, Node node) - { - synchronized(_delegates) - { - for (final Iterator it = _delegates.iterator(); it.hasNext();) - { - IStructuredDocumentContextFactory delegateFactory = (IStructuredDocumentContextFactory) ((IAdaptable) it.next()).getAdapter(IStructuredDocumentContextFactory.class); - IStructuredDocumentContext context = delegateFactory.getContext(document, node); - - if (context != null) - { - return context; - } - } - - return null; - } - } - - public IStructuredDocumentContext getContext(Element element) - { - // first see if I know how to make one - IStructuredDocumentContext context = internalGetContext(element); - - // if I don't know, ask my delegates - if (context == null) - { - context = delegateGetContext(element); - } - - return context; - - } - - private IStructuredDocumentContext internalGetContext(Element element) { - if (element instanceof IDOMNode){ - final IDOMNode node = (IDOMNode)element; - final IStructuredDocument sDoc = node.getStructuredDocument(); - final int position = node.getStartOffset(); - - return new DefaultStructuredDocumentContext(sDoc, position); - } - - return null; - } - - private IStructuredDocumentContext delegateGetContext(Element element) { - synchronized(_delegates) - { - for (final Iterator it = _delegates.iterator(); it.hasNext();) - { - IStructuredDocumentContextFactory2 delegateFactory = (IStructuredDocumentContextFactory2) ((IAdaptable) it.next()).getAdapter(IStructuredDocumentContextFactory2.class); - if (delegateFactory != null) - { - IStructuredDocumentContext context = delegateFactory.getContext(element); - - if (context != null) - { - return context; - } - } - } - - return null; - } - } - - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/package-info.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/package-info.java deleted file mode 100644 index cc515346f..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/structureddocument/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - * - ********************************************************************************/ - -/** - * Model context for SSE structured documents. - */ -package org.eclipse.jst.jsf.context.structureddocument; diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ERuntimeSource.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ERuntimeSource.java deleted file mode 100644 index 902e20d89..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ERuntimeSource.java +++ /dev/null @@ -1,236 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.AbstractEnumerator; - -/** - * <!-- begin-user-doc --> - * Enumerates the possible sources of an instance symbol - * at runtime. In the default implementation these can - * be: from the built-in variables, from the managed bean - * facility, and those defined in tags. This information - * is provided to allow the VariableResolver to resolve - * conflicts when instance symbols come from more than one - * source. - * - * <p><b>Provisional API - subject to change</b></p> - * - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getERuntimeSource() - * @model - * @generated - */ -public final class ERuntimeSource extends AbstractEnumerator { - /** - * @generated NOT - */ - private static final long serialVersionUID = 1L; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The '<em><b>BUILT IN SYMBOL</b></em>' literal value. - * <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>BUILT IN SYMBOL</b></em>' literal object isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @see #BUILT_IN_SYMBOL_LITERAL - * @model - * @generated - * @ordered - */ - public static final int BUILT_IN_SYMBOL = 0; - - /** - * The '<em><b>MANAGED BEAN SYMBOL</b></em>' literal value. - * <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>MANAGED BEAN SYMBOL</b></em>' literal object isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @see #MANAGED_BEAN_SYMBOL_LITERAL - * @model - * @generated - * @ordered - */ - public static final int MANAGED_BEAN_SYMBOL = 1; - - /** - * The '<em><b>TAG INSTANTIATED SYMBOL</b></em>' literal value. - * <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>TAG INSTANTIATED SYMBOL</b></em>' literal object isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @see #TAG_INSTANTIATED_SYMBOL_LITERAL - * @model - * @generated - * @ordered - */ - public static final int TAG_INSTANTIATED_SYMBOL = 2; - - /** - * The '<em><b>OTHER</b></em>' literal value. - * <!-- begin-user-doc --> - * <p> - * If the meaning of '<em><b>OTHER</b></em>' literal object isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @see #OTHER_LITERAL - * @model - * @generated - * @ordered - */ - public static final int OTHER = 3; - - /** - * The '<em><b>BUILT IN SYMBOL</b></em>' literal object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #BUILT_IN_SYMBOL - * @generated - * @ordered - */ - public static final ERuntimeSource BUILT_IN_SYMBOL_LITERAL = new ERuntimeSource(BUILT_IN_SYMBOL, "BUILT_IN_SYMBOL", "BUILT_IN_SYMBOL"); //$NON-NLS-1$ //$NON-NLS-2$ - - /** - * The '<em><b>MANAGED BEAN SYMBOL</b></em>' literal object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #MANAGED_BEAN_SYMBOL - * @generated - * @ordered - */ - public static final ERuntimeSource MANAGED_BEAN_SYMBOL_LITERAL = new ERuntimeSource(MANAGED_BEAN_SYMBOL, "MANAGED_BEAN_SYMBOL", "MANAGED_BEAN_SYMBOL"); //$NON-NLS-1$ //$NON-NLS-2$ - - /** - * The '<em><b>TAG INSTANTIATED SYMBOL</b></em>' literal object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #TAG_INSTANTIATED_SYMBOL - * @generated - * @ordered - */ - public static final ERuntimeSource TAG_INSTANTIATED_SYMBOL_LITERAL = new ERuntimeSource(TAG_INSTANTIATED_SYMBOL, "TAG_INSTANTIATED_SYMBOL", "TAG_INSTANTIATED_SYMBOL"); //$NON-NLS-1$ //$NON-NLS-2$ - - /** - * The '<em><b>OTHER</b></em>' literal object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #OTHER - * @generated - * @ordered - */ - public static final ERuntimeSource OTHER_LITERAL = new ERuntimeSource(OTHER, "OTHER", "OTHER"); //$NON-NLS-1$ //$NON-NLS-2$ - - /** - * An array of all the '<em><b>ERuntime Source</b></em>' enumerators. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private static final ERuntimeSource[] VALUES_ARRAY = - new ERuntimeSource[] { - BUILT_IN_SYMBOL_LITERAL, - MANAGED_BEAN_SYMBOL_LITERAL, - TAG_INSTANTIATED_SYMBOL_LITERAL, - OTHER_LITERAL, - }; - - /** - * A public read-only list of all the '<em><b>ERuntime Source</b></em>' enumerators. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the '<em><b>ERuntime Source</b></em>' literal with the specified literal value. - * <!-- begin-user-doc --> - * @param literal - * @return the enumeration for a string literal representation - * <!-- end-user-doc --> - * @generated - */ - public static ERuntimeSource get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - ERuntimeSource result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>ERuntime Source</b></em>' literal with the specified name. - * <!-- begin-user-doc --> - * @param name - * @return the enumeration for the name of the literal value - * <!-- end-user-doc --> - * @generated - */ - public static ERuntimeSource getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - ERuntimeSource result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the '<em><b>ERuntime Source</b></em>' literal with the specified integer value. - * <!-- begin-user-doc --> - * @param value - * @return the enumeration for it's integral value - * <!-- end-user-doc --> - * @generated - */ - public static ERuntimeSource get(int value) { - switch (value) { - case BUILT_IN_SYMBOL: return BUILT_IN_SYMBOL_LITERAL; - case MANAGED_BEAN_SYMBOL: return MANAGED_BEAN_SYMBOL_LITERAL; - case TAG_INSTANTIATED_SYMBOL: return TAG_INSTANTIATED_SYMBOL_LITERAL; - case OTHER: return OTHER_LITERAL; - } - return null; - } - - /** - * Only this class can construct instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private ERuntimeSource(int value, String name, String literal) { - super(value, name, literal); - } - -} //ERuntimeSource diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanInstanceSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanInstanceSymbol.java deleted file mode 100644 index a1ddd3635..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanInstanceSymbol.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.emf.common.util.EList; - -/** - * <!-- begin-user-doc --> - * An instance of a java bean - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * @author cbateman - * @model - */ -public interface IBeanInstanceSymbol extends IInstanceSymbol, IDescribedInDetail { - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>Properties</b></em>' reference list. - * The list contents are of type {@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Properties</em>' reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Properties</em>' reference list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIBeanInstanceSymbol_Properties() - * @model type="org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol" changeable="false" volatile="true" - * @generated - */ - EList getProperties(); - - /** - * Returns the value of the '<em><b>Methods</b></em>' reference list. - * The list contents are of type {@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Methods</em>' reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Methods</em>' reference list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIBeanInstanceSymbol_Methods() - * @model type="org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol" changeable="false" volatile="true" - * @generated - */ - EList getMethods(); - - /** - * <!-- begin-user-doc --> - * This is a convenience method equivalent to to (IJavaTypeDescriptor2) getTypeDescriptor - * @return the type descriptor cast to a java descriptor - * <!-- end-user-doc --> - * @model kind="operation" - * @generated - */ - IJavaTypeDescriptor2 getJavaTypeDescriptor(); - - /** - * <!-- begin-user-doc --> - * Convenience method equivalent to setTypeDescriptor((IJavaTypeDescriptor2) typeDesc)s - * @param newTypeDescriptor - * <!-- end-user-doc --> - * @model - * @generated - */ - void setJavaTypeDescriptor(IJavaTypeDescriptor2 newTypeDescriptor); - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanMethodSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanMethodSymbol.java deleted file mode 100644 index 271a93613..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanMethodSymbol.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IBean Method Symbol</b></em>'. - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol#getOwner <em>Owner</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIBeanMethodSymbol() - * @model - * @generated - */ -public interface IBeanMethodSymbol extends IDescribedInDetail, IMethodSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>Owner</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Owner</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Owner</em>' reference. - * @see #setOwner(IJavaTypeDescriptor2) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIBeanMethodSymbol_Owner() - * @model - * @generated - */ - IJavaTypeDescriptor2 getOwner(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol#getOwner <em>Owner</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Owner</em>' reference. - * @see #getOwner() - * @generated - */ - void setOwner(IJavaTypeDescriptor2 value); - -} // IBeanMethodSymbol diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanPropertySymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanPropertySymbol.java deleted file mode 100644 index 3fb6f880a..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanPropertySymbol.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol; - -/** - * - * <!-- begin-user-doc --> - * A property of a bean - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * @author cbateman - * @model - */ -public interface IBeanPropertySymbol extends IPropertySymbol, IDescribedInDetail { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * @return the bean that owns this property - * @model - */ - IJavaTypeDescriptor2 getOwner(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol#getOwner <em>Owner</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Owner</em>' reference. - * @see #getOwner() - * @generated - */ - void setOwner(IJavaTypeDescriptor2 value); - - /** - * @return true if the bean has getter for this property - * @model - */ - boolean isReadable(); - - /** - * @return true if the bean has a setter fot this property - * @model - */ - boolean isWritable(); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedJavaTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedJavaTypeDescriptor.java deleted file mode 100644 index 7340267cf..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedJavaTypeDescriptor.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id$ - */ -package org.eclipse.jst.jsf.context.symbol; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IBounded Java Type Descriptor</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIBoundedJavaTypeDescriptor() - * @model - * @generated - */ -public interface IBoundedJavaTypeDescriptor extends IJavaTypeDescriptor2, IBoundedTypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - -} // IBoundedJavaTypeDescriptor
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedListTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedListTypeDescriptor.java deleted file mode 100644 index ebd153cfe..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedListTypeDescriptor.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id$ - */ -package org.eclipse.jst.jsf.context.symbol; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IBounded List Type Descriptor</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIBoundedListTypeDescriptor() - * @model - * @generated - */ -public interface IBoundedListTypeDescriptor extends IListTypeDescriptor, IBoundedTypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - -} // IBoundedListTypeDescriptor diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedMapTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedMapTypeDescriptor.java deleted file mode 100644 index f54c12ecb..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedMapTypeDescriptor.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id$ - */ -package org.eclipse.jst.jsf.context.symbol; - - -/** - * <!-- begin-user-doc --> - * Describes a IMapTypeDescriptor for which the possible keyed values are - * unbounded for some set of possible value types. For example, a managed - * bean that implements Map, is unconstrained for all values in Java 1.4 and - * for whatever the template value type is in Java5. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIBoundedMapTypeDescriptor() - * @model - * @generated - */ -public interface IBoundedMapTypeDescriptor extends IMapTypeDescriptor, IBoundedTypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - -} // IBoundedMapTypeDescriptor
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedTypeDescriptor.java deleted file mode 100644 index ea92d5a61..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedTypeDescriptor.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id$ - */ -package org.eclipse.jst.jsf.context.symbol; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IBounded Type Descriptor</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIBoundedTypeDescriptor() - * @model interface="true" abstract="true" - * @generated - */ -public interface IBoundedTypeDescriptor extends ITypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * <!-- begin-user-doc --> - * @param typeSignature - * @return true if this type can have unbounded property key for the - * indicated type. For example, a Java 1.4 Map could potentially have - * a value of any time for a particular key, so this method would always return - * true. However a Java5 Map<String, String> would only return true if - * typeSignature is-a String. - * <!-- end-user-doc --> - * @model - * @generated - */ - boolean isUnboundedForType(String typeSignature); - - /** - * <!-- begin-user-doc --> - * @param name - * @param typeSignature - * @return a symbol corresponding to the property of this type desc - * with name called 'name' of type 'typeSignature'. Must return null if - * isPropNameUnconstrainedForType returns false for 'typeSignature'. - * Generally should return something meaningful (even if just an - * object) when isPropNameUnconstrainedForType returns true. - * <!-- end-user-doc --> - * @model - * @generated - */ - ISymbol getUnboundedProperty(Object name, String typeSignature); - -} // IBoundedTypeDescriptor
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IComponentSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IComponentSymbol.java deleted file mode 100644 index 7cad1c9c8..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IComponentSymbol.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IComponent Symbol</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIComponentSymbol() - * @model - * @generated - */ -public interface IComponentSymbol extends IInstanceSymbol, IDescribedInDetail { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - -} // IComponentSymbol diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IDescribedInDetail.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IDescribedInDetail.java deleted file mode 100644 index 9fb281870..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IDescribedInDetail.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol; - - -/** - * Tags a symbol that has a detailed, user-readable description - * - * <p><b>Provisional API - subject to change</b></p> - * - * @author cbateman - * - */ -public interface IDescribedInDetail { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc -->s - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * @return the detailed description - * @model - */ - String getDetailedDescription(); - - /** - * @param detailedDescription - * @model - */ - void setDetailedDescription(String detailedDescription); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IInstanceSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IInstanceSymbol.java deleted file mode 100644 index d1e883dea..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IInstanceSymbol.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol; - -/** - * <!-- begin-user-doc --> - * A symbol that represents an instance of something, typically - * a variable. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * @author cbateman - * @model - */ -public interface IInstanceSymbol extends IObjectSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * @return the type descriptor for this instance - * @model - */ - ITypeDescriptor getTypeDescriptor(); - /** - * Returns the value of the '<em><b>Type Resolved</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type Resolved</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type Resolved</em>' attribute. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIInstanceSymbol_TypeResolved() - * @model changeable="false" volatile="true" - * @generated - */ - boolean isTypeResolved(); - - /** - * Returns the value of the '<em><b>Runtime Source</b></em>' attribute. - * The default value is <code>"TAG_INSTANTIATED_SYMBOL"</code>. - * The literals are from the enumeration {@link org.eclipse.jst.jsf.context.symbol.ERuntimeSource}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Runtime Source</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Runtime Source</em>' attribute. - * @see org.eclipse.jst.jsf.context.symbol.ERuntimeSource - * @see #setRuntimeSource(ERuntimeSource) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIInstanceSymbol_RuntimeSource() - * @model default="TAG_INSTANTIATED_SYMBOL" - * @generated - */ - ERuntimeSource getRuntimeSource(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IInstanceSymbol#getRuntimeSource <em>Runtime Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Runtime Source</em>' attribute. - * @see org.eclipse.jst.jsf.context.symbol.ERuntimeSource - * @see #getRuntimeSource() - * @generated - */ - void setRuntimeSource(ERuntimeSource value); - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaSymbol.java deleted file mode 100644 index fa167ada8..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaSymbol.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.jdt.core.IJavaElement; - -/** - * <!-- begin-user-doc --> - * Represents a symbol that has meaning within Java's context. This may - * be the name of a type, an instance, method etc. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * @author cbateman - * @model - */ -public interface IJavaSymbol extends ISymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * A IJavaElement may not exist for a symbol if it is synthetic at - * design time but will be bound to a Java symbol at runtime. An - * example is a managed bean instance in JSF. JDT can provide no - * design-time meta-data for the symbol because it won't have - * a Java representation until the containing JSP is compiled. - * - * @return JDT's java element for this symbol or null if one doesn't - * exist. - * @model - */ - IJavaElement getJavaElement(); - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IJavaSymbol#getJavaElement <em>Java Element</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Java Element</em>' attribute. - * @see #getJavaElement() - * @generated - */ - void setJavaElement(IJavaElement value); - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaTypeDescriptor2.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaTypeDescriptor2.java deleted file mode 100644 index 191928973..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaTypeDescriptor2.java +++ /dev/null @@ -1,144 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.jdt.core.IType; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IJava Type Descriptor2</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getType <em>Type</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getBeanProperties <em>Bean Properties</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getBeanMethods <em>Bean Methods</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getArrayCount <em>Array Count</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIJavaTypeDescriptor2() - * @model - * @generated - */ -public interface IJavaTypeDescriptor2 extends ITypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type</em>' attribute. - * @see #setType(IType) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIJavaTypeDescriptor2_Type() - * @model dataType="org.eclipse.jst.jsf.context.symbol.IType" - * @generated - */ - IType getType(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getType <em>Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Type</em>' attribute. - * @see #getType() - * @generated - */ - void setType(IType value); - - /** - * Returns the value of the '<em><b>Bean Properties</b></em>' reference list. - * The list contents are of type {@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Bean Properties</em>' reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Bean Properties</em>' reference list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIJavaTypeDescriptor2_BeanProperties() - * @model type="org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol" volatile="true" - * @generated - */ - EList getBeanProperties(); - - /** - * Returns the value of the '<em><b>Bean Methods</b></em>' reference list. - * The list contents are of type {@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Bean Methods</em>' reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Bean Methods</em>' reference list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIJavaTypeDescriptor2_BeanMethods() - * @model type="org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol" volatile="true" - * @generated - */ - EList getBeanMethods(); - - /** - * Returns the value of the '<em><b>Array Count</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Array Count</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Array Count</em>' attribute. - * @see #setArrayCount(int) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIJavaTypeDescriptor2_ArrayCount() - * @model - * @generated - */ - int getArrayCount(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getArrayCount <em>Array Count</em>}' attribute. - * <!-- begin-user-doc --> - * records the array nesting of the type. IType doesn't encapsulate - * array types. So if this type is an array then type will represent - * the base element and this value will be > 0. If not an array, then - * _arrayCount is always 0. - * <!-- end-user-doc --> - * @param value the new value of the '<em>Array Count</em>' attribute. - * @see #getArrayCount() - * @generated - */ - void setArrayCount(int value); - - /** - * <!-- begin-user-doc --> - * @param resolvedTypeSignature - * @return the resolved type or null. - * <!-- end-user-doc --> - * @model dataType="org.eclipse.jst.jsf.context.symbol.IType" - * @generated - */ - IType resolveType(String resolvedTypeSignature); - -} // IJavaTypeDescriptor2 diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IListTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IListTypeDescriptor.java deleted file mode 100644 index c4b458666..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IListTypeDescriptor.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id$ - */ -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.emf.common.util.EList; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IList Type Descriptor</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor#getListSource <em>List Source</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIListTypeDescriptor() - * @model - * @generated - */ -public interface IListTypeDescriptor extends ITypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>List Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>List Source</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>List Source</em>' attribute. - * @see #setListSource(EList) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIListTypeDescriptor_ListSource() - * @model many="false" - * @generated - */ - EList getListSource(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor#getListSource <em>List Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>List Source</em>' attribute. - * @see #getListSource() - * @generated - */ - void setListSource(EList value); - -} // IListTypeDescriptor diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMapTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMapTypeDescriptor.java deleted file mode 100644 index d991b7212..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMapTypeDescriptor.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - -import java.util.Map; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IMap Type Descriptor</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor#getMapSource <em>Map Source</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor#isImmutable <em>Immutable</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIMapTypeDescriptor() - * @model - * @generated - */ -public interface IMapTypeDescriptor extends ITypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>Map Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Map Source</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Map Source</em>' attribute. - * @see #setMapSource(Map) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIMapTypeDescriptor_MapSource() - * @model - * @generated - */ - Map getMapSource(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor#getMapSource <em>Map Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Map Source</em>' attribute. - * @see #getMapSource() - * @generated - */ - void setMapSource(Map value); - - /** - * Returns the value of the '<em><b>Immutable</b></em>' attribute. - * The default value is <code>"true"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Immutable</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Immutable</em>' attribute. - * @see #setImmutable(boolean) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIMapTypeDescriptor_Immutable() - * @model default="true" - * @generated - */ - boolean isImmutable(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor#isImmutable <em>Immutable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Immutable</em>' attribute. - * @see #isImmutable() - * @generated - */ - void setImmutable(boolean value); - -} // IMapTypeDescriptor diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMethodSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMethodSymbol.java deleted file mode 100644 index 45ee82cee..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMethodSymbol.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IMethod Symbol</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol#getSignature <em>Signature</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIMethodSymbol() - * @model - * @generated - */ -public interface IMethodSymbol extends ISymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Signature</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Signature</em>' attribute. - * @see #setSignature(String) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIMethodSymbol_Signature() - * @model - * @generated - */ - String getSignature(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol#getSignature <em>Signature</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Signature</em>' attribute. - * @see #getSignature() - * @generated - */ - void setSignature(String value); - -} // IMethodSymbol diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IObjectSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IObjectSymbol.java deleted file mode 100644 index 34fee432e..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IObjectSymbol.java +++ /dev/null @@ -1,161 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.emf.common.util.EList; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IObject Symbol</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#getTypeDescriptor <em>Type Descriptor</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#isReadable <em>Readable</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#isWritable <em>Writable</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIObjectSymbol() - * @model interface="true" abstract="true" - * @generated - */ -public interface IObjectSymbol extends ISymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>Type Descriptor</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type Descriptor</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type Descriptor</em>' reference. - * @see #setTypeDescriptor(ITypeDescriptor) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIObjectSymbol_TypeDescriptor() - * @model - * @generated - */ - ITypeDescriptor getTypeDescriptor(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#getTypeDescriptor <em>Type Descriptor</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Type Descriptor</em>' reference. - * @see #getTypeDescriptor() - * @generated - */ - void setTypeDescriptor(ITypeDescriptor value); - - /** - * Returns the value of the '<em><b>Readable</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Readable</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Readable</em>' attribute. - * @see #setReadable(boolean) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIObjectSymbol_Readable() - * @model - * @generated - */ - boolean isReadable(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#isReadable <em>Readable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Readable</em>' attribute. - * @see #isReadable() - * @generated - */ - void setReadable(boolean value); - - /** - * Returns the value of the '<em><b>Writable</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Writable</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Writable</em>' attribute. - * @see #setWritable(boolean) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIObjectSymbol_Writable() - * @model - * @generated - */ - boolean isWritable(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#isWritable <em>Writable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Writable</em>' attribute. - * @see #isWritable() - * @generated - */ - void setWritable(boolean value); - - /** - * <!-- begin-user-doc --> - * @param typeSignature - * @return true if this object can be coerced (is an instanceof) the type - * specified in the fully qualified typeSignature - * <!-- end-user-doc --> - * @model - * @generated - */ - boolean supportsCoercion(String typeSignature); - - /** - * <!-- begin-user-doc --> - * @param typeSignature - * @return a type descriptor supporting a class cast of this object to - * the request typeSignature, or null if such a cast is not supported. - * Returns non-null iff supportsCoercion(typeSignature) == false - * <!-- end-user-doc --> - * @model - * @generated - */ - ITypeDescriptor coerce(String typeSignature); - - /** - * <!-- begin-user-doc --> - * @param methodName - * @param methodArguments - * @param symbolName - * @return a symbol resulting from calling the call or null if can't be determined. - * Generally, the symbolName should be used for the getName() value of the returned - * symbol, although implementers are not bound to this if a more meaningful value - * can be calculated. - * <!-- end-user-doc --> - * @model methodArgumentsType="org.eclipse.jst.jsf.common.internal.types.ValueType" methodArgumentsDataType="org.eclipse.jst.jsf.context.symbol.ValueType" methodArgumentsMany="true" - * @generated - */ - ISymbol call(String methodName, EList methodArguments, String symbolName); - -} // IObjectSymbol diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IPropertySymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IPropertySymbol.java deleted file mode 100644 index ea757eed5..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IPropertySymbol.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>IProperty Symbol</b></em>'. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol#isIntermediate <em>Intermediate</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIPropertySymbol() - * @model - * @generated - */ -public interface IPropertySymbol extends IObjectSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>Intermediate</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Intermediate</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Intermediate</em>' attribute. - * @see #setIntermediate(boolean) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getIPropertySymbol_Intermediate() - * @model - * @generated - */ - boolean isIntermediate(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol#isIntermediate <em>Intermediate</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Intermediate</em>' attribute. - * @see #isIntermediate() - * @generated - */ - void setIntermediate(boolean value); - -} // IPropertySymbol diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ISymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ISymbol.java deleted file mode 100644 index 20a56c437..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ISymbol.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.emf.ecore.EObject; - -/** - * <!-- begin-user-doc --> - * An entity that represents a meaningful named value in some context. - * Typically these represent programming language variables, properties and methods. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * @author cbateman - * @model - */ -public interface ISymbol extends EObject { - /** - * Singleton for an empty array of ISymbols - */ - final ISymbol[] EMPTY_SYMBOL_ARRAY = new ISymbol[0]; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * @return the symbol's name - * @model - */ - String getName(); - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.ISymbol#getName <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Name</em>' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ITypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ITypeDescriptor.java deleted file mode 100644 index 4be180ff8..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ITypeDescriptor.java +++ /dev/null @@ -1,264 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IType; - -/** - * <!-- begin-user-doc --> - * A generic descriptor for symbol information - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * @author cbateman - * @model - */ -public interface ITypeDescriptor extends EObject { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Returns the value of the '<em><b>Properties</b></em>' reference list. - * The list contents are of type {@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Properties</em>' reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Properties</em>' reference list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_Properties() - * @model type="org.eclipse.jst.jsf.context.symbol.IPropertySymbol" volatile="true" - * @generated - */ - EList getProperties(); - - /** - * Returns the value of the '<em><b>Type Signature</b></em>' attribute. - * The default value is <code>""</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type Signature</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type Signature</em>' attribute. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_TypeSignature() - * @model default="" changeable="false" volatile="true" - * @generated - */ - String getTypeSignature(); - - /** - * Returns the value of the '<em><b>Super Type Signatures</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Super Type Signatures</em>' attribute list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Super Type Signatures</em>' attribute list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_SuperTypeSignatures() - * @model type="java.lang.String" volatile="true" - * @generated - */ - EList getSuperTypeSignatures(); - - /** - * Returns the value of the '<em><b>Interface Type Signatures</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Interface Type Signatures</em>' attribute list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Interface Type Signatures</em>' attribute list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_InterfaceTypeSignatures() - * @model type="java.lang.String" volatile="true" - * @generated - */ - EList getInterfaceTypeSignatures(); - - /** - * Returns the value of the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type Signature Delegate</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type Signature Delegate</em>' attribute. - * @see #setTypeSignatureDelegate(String) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_TypeSignatureDelegate() - * @model - * @generated - */ - String getTypeSignatureDelegate(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeSignatureDelegate <em>Type Signature Delegate</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Type Signature Delegate</em>' attribute. - * @see #getTypeSignatureDelegate() - * @generated - */ - void setTypeSignatureDelegate(String value); - - /** - * Returns the value of the '<em><b>Methods</b></em>' reference list. - * The list contents are of type {@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Methods</em>' reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Methods</em>' reference list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_Methods() - * @model type="org.eclipse.jst.jsf.context.symbol.IMethodSymbol" volatile="true" - * @generated - */ - EList getMethods(); - - /** - * Returns the value of the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type Parameter Signatures</em>' attribute list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type Parameter Signatures</em>' attribute list. - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_TypeParameterSignatures() - * @model type="java.lang.String" unique="false" transient="true" - * @generated - */ - EList getTypeParameterSignatures(); - - /** - * Returns the value of the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Jdt Context</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Jdt Context</em>' attribute. - * @see #setJdtContext(IJavaElement) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_JdtContext() - * @model dataType="org.eclipse.jst.jsf.context.symbol.IJavaElement" - * @generated - */ - IJavaElement getJdtContext(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getJdtContext <em>Jdt Context</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Jdt Context</em>' attribute. - * @see #getJdtContext() - * @generated - */ - void setJdtContext(IJavaElement value); - - /** - * Returns the value of the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Enum Type</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Enum Type</em>' attribute. - * @see #setEnumType(boolean) - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_EnumType() - * @model - * @generated - */ - boolean isEnumType(); - - /** - * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#isEnumType <em>Enum Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Enum Type</em>' attribute. - * @see #isEnumType() - * @generated - */ - void setEnumType(boolean value); - - /** - * <!-- begin-user-doc --> - * @param typeSignature - * @return true if the type descriptor's underlying type would resolve true == (type instanceof typeSignature) - * - * <!-- end-user-doc --> - * @model - * @generated - */ - boolean instanceOf(String typeSignature); - - /** - * <!-- begin-user-doc --> - * @return true iff this type is an array of something - * <!-- end-user-doc --> - * @model kind="operation" - * @generated - */ - boolean isArray(); - - /** - * <!-- begin-user-doc --> - * @return a symbol representing an element of this array. May - * throw an exception or return null if isArray() == false - * <!-- end-user-doc --> - * @model kind="operation" - * @generated - */ - IObjectSymbol getArrayElement(); - - /** - * <!-- begin-user-doc --> - * @param resolvedTypeSignature - * @return the IType for resolvedTypeSignature or null if can't be resolved - * <!-- end-user-doc --> - * @model dataType="org.eclipse.jst.jsf.context.symbol.IType" - * @generated - */ - IType resolveType(String resolvedTypeSignature); - - /** - * <!-- begin-user-doc --> - * @param methodName - * @param methodArgs - * @param symbolName - * @return a symbol or null if not handling - * <!-- end-user-doc --> - * @model methodArgsType="java.lang.String" methodArgsMany="true" - * @generated - */ - ISymbol calculateSyntheticCall(String methodName, EList methodArgs, String symbolName); - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/InitializedSymbolFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/InitializedSymbolFactory.java deleted file mode 100644 index 50a30a014..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/InitializedSymbolFactory.java +++ /dev/null @@ -1,241 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Matthias Fuessel -- extracted from https://bugs.eclipse.org/bugs/show_bug.cgi?id=215461 - * Cameron Bateman/Oracle - integrated. - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol; - -import java.util.Arrays; -import java.util.Collections; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.common.internal.types.ValueType; -import org.eclipse.jst.jsf.common.util.TypeUtil; - -/** - * Creates purpose-built symbols and descriptors fully initialized (unlike the - * EMF factory that simply creates empty instances. - * - * This class is for convenience only and should not do anything that clients - * could not do by hand (though with more work). - * - * Clients may use or subclass. - * - * @author cbateman - * - */ -public class InitializedSymbolFactory -{ - /** - * If fullyQualifiedClass can be resolved to an IType, then a bean instance - * symbol will be created. If the type cannot be resolved, then - * createUnknownInstanceSymbol is called with the type descriptor on the - * returned symbol forced to fullyQualifiedClass. - * - * @param project - * @param fullyQualifiedClass - * @param symbolName - * @param source - * @return a symbol - */ - public final ISymbol createBeanOrUnknownInstanceSymbol( - final IProject project, final String fullyQualifiedClass, - final String symbolName, final ERuntimeSource source) - { - final IJavaProject javaProject = JavaCore.create(project); - try - { - final IType type = javaProject.findType(fullyQualifiedClass); - - // TODO: this is a high-bred since it consists of a java instance - // but also has properties we can populate at designtime such as - // the maps. Need to add the second part - if (type != null) - { - final IJavaTypeDescriptor2 typeDesc = SymbolFactory.eINSTANCE - .createIJavaTypeDescriptor2(); - typeDesc.setType(type); - final IBeanInstanceSymbol facesContextVar = SymbolFactory.eINSTANCE - .createIBeanInstanceSymbol(); - facesContextVar.setTypeDescriptor(typeDesc); - facesContextVar.setName(symbolName); - facesContextVar.setRuntimeSource(source); - return facesContextVar; - } - } - catch (final JavaModelException jme) - { - // fall-through and fail with unresolved map - } - - final ISymbol symbol = createUnknownInstanceSymbol(symbolName, source); - ((IInstanceSymbol) symbol) - .getTypeDescriptor() - .setTypeSignatureDelegate( - Signature - .createTypeSignature(fullyQualifiedClass, true)); - - return symbol; - } - - /** - * @param symbolName - * @param source - * @return a symbol for a variable of unknown type - */ - public final IComponentSymbol createUnknownComponentSymbol( - final String symbolName, final ERuntimeSource source) - { - final IComponentSymbol symbol = SymbolFactory.eINSTANCE - .createIComponentSymbol(); - populateUnknownInstanceSymbol(symbol, symbolName, source); - return symbol; - } - - /** - * @param symbolName - * @param source - * @return the unknown instance symbol as an IInstanceSymbol - */ - public final IInstanceSymbol createUnknownInstanceSymbol( - final String symbolName, final ERuntimeSource source) - { - final IInstanceSymbol symbol = SymbolFactory.eINSTANCE - .createIInstanceSymbol(); - populateUnknownInstanceSymbol(symbol, symbolName, source); - return symbol; - } - - /** - * @param name - * may NOT be null. - * @param typeDesc - * may NOT be null. - * @param description - * may be null - * @return a component symbol using the java type descriptor - * @throws IllegalArgumentException - * if non-null argument is null - */ - public final IComponentSymbol createJavaComponentSymbol(final String name, - final IJavaTypeDescriptor2 typeDesc, final String description) - { - if (name == null || typeDesc == null) - { - throw new IllegalArgumentException( - "name and typeDesc must not be null"); //$NON-NLS-1$ - } - - final IComponentSymbol symbol = SymbolFactory.eINSTANCE - .createIComponentSymbol(); - symbol.setName(name); - symbol.setTypeDescriptor(typeDesc); - symbol.setRuntimeSource(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL); - return symbol; - } - - /** - * @param name - * @param valueType - * @param description - * @param javaProject - * @return an IComponentSymbol that uses valueType to derive the type - * of its type descriptor - */ - public final IComponentSymbol createJavaComponentSymbol(final String name, - final ValueType valueType, final String description, - final IJavaProject javaProject) - { - final IJavaTypeDescriptor2 typeDesc = createTypeDescriptorFromSignature( - valueType.getSignature(), javaProject); - return createJavaComponentSymbol(name, typeDesc, description); - } - - private void populateUnknownInstanceSymbol(final IInstanceSymbol symbol, - final String symbolName, final ERuntimeSource source) - { - final IMapTypeDescriptor typeDesc = SymbolFactory.eINSTANCE - .createIBoundedMapTypeDescriptor(); - // empty map source - typeDesc.setMapSource(Collections.emptyMap()); - symbol.setName(symbolName); - symbol.setTypeDescriptor(typeDesc); - symbol.setRuntimeSource(source); - } - - /** - * @param type - * @return the signature of the element type of a collection/array, - * <code>null</code>, if untyped Collection or no container type - * at all. - */ - public final String getElementSignatureFromContainerType(ValueType type) - { - if (type.isArray()) - { - // TODO full signature - String signature = type.getSignature(); - int arrayCount = Signature.getArrayCount(signature); - String elementSig = Signature.getElementType(signature); - return Signature.createArraySignature(elementSig, arrayCount - 1); - } - if (type.isInstanceOf(TypeConstants.TYPE_COLLECTION)) - { - final String[] typeArguments = type.getTypeArguments(); - if (typeArguments.length > 0) - { - return typeArguments[0]; - } - } - return null; - } - - /** - * @param signature - * @param javaProject - * @return a java type descriptor based on the fully qualified type - * specified by signature using javaProject as the lookup classpath. - * If the IType for signature cannot be found, the descriptor's - * typeSignatureDelegate will be used. - */ - public final IJavaTypeDescriptor2 createTypeDescriptorFromSignature( - final String signature, final IJavaProject javaProject) - { - final String elementType = Signature.getElementType(signature); - - IJavaTypeDescriptor2 desc = SymbolFactory.eINSTANCE - .createIJavaTypeDescriptor2(); - final int arrayCount = Signature.getArrayCount(signature); - if (arrayCount > 0) - { - desc.setArrayCount(arrayCount); - } - - IType type = TypeUtil.resolveType(javaProject, elementType); - if (type != null) - { - desc.setType(type); - } - else - { - desc.setTypeSignatureDelegate(Signature.getTypeErasure(signature)); - } - desc.getTypeParameterSignatures().addAll( - Arrays.asList(Signature.getTypeArguments(signature))); - return desc; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolFactory.java deleted file mode 100644 index 830b2965e..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolFactory.java +++ /dev/null @@ -1,177 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.emf.ecore.EFactory; - -/** - * <!-- begin-user-doc --> - * The <b>Factory</b> for the model. - * It provides a create method for each non-abstract class of the model. - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage - * @generated - */ -public interface SymbolFactory extends EFactory { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The singleton instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - SymbolFactory eINSTANCE = org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolFactoryImpl.init(); - - /** - * Returns a new object of class '<em>IBean Instance Symbol</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IBean Instance Symbol</em>'. - * @generated - */ - IBeanInstanceSymbol createIBeanInstanceSymbol(); - - /** - * Returns a new object of class '<em>IBean Property Symbol</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IBean Property Symbol</em>'. - * @generated - */ - IBeanPropertySymbol createIBeanPropertySymbol(); - - /** - * Returns a new object of class '<em>IInstance Symbol</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IInstance Symbol</em>'. - * @generated - */ - IInstanceSymbol createIInstanceSymbol(); - - /** - * Returns a new object of class '<em>IJava Symbol</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IJava Symbol</em>'. - * @generated - */ - IJavaSymbol createIJavaSymbol(); - - /** - * Returns a new object of class '<em>IJava Type Descriptor2</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IJava Type Descriptor2</em>'. - * @generated - */ - IJavaTypeDescriptor2 createIJavaTypeDescriptor2(); - - /** - * Returns a new object of class '<em>IBean Method Symbol</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IBean Method Symbol</em>'. - * @generated - */ - IBeanMethodSymbol createIBeanMethodSymbol(); - - /** - * Returns a new object of class '<em>IComponent Symbol</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IComponent Symbol</em>'. - * @generated - */ - IComponentSymbol createIComponentSymbol(); - - /** - * Returns a new object of class '<em>IProperty Symbol</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IProperty Symbol</em>'. - * @generated - */ - IPropertySymbol createIPropertySymbol(); - - /** - * Returns a new object of class '<em>IMap Type Descriptor</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IMap Type Descriptor</em>'. - * @generated - */ - IMapTypeDescriptor createIMapTypeDescriptor(); - - /** - * Returns a new object of class '<em>IMethod Symbol</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IMethod Symbol</em>'. - * @generated - */ - IMethodSymbol createIMethodSymbol(); - - /** - * Returns a new object of class '<em>IBounded Map Type Descriptor</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IBounded Map Type Descriptor</em>'. - * @generated - */ - IBoundedMapTypeDescriptor createIBoundedMapTypeDescriptor(); - - /** - * Returns a new object of class '<em>IBounded Java Type Descriptor</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IBounded Java Type Descriptor</em>'. - * @generated - */ - IBoundedJavaTypeDescriptor createIBoundedJavaTypeDescriptor(); - - /** - * Returns a new object of class '<em>IList Type Descriptor</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IList Type Descriptor</em>'. - * @generated - */ - IListTypeDescriptor createIListTypeDescriptor(); - - /** - * Returns a new object of class '<em>IBounded List Type Descriptor</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>IBounded List Type Descriptor</em>'. - * @generated - */ - IBoundedListTypeDescriptor createIBoundedListTypeDescriptor(); - - /** - * Returns the package supported by this factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the package supported by this factory. - * @generated - */ - SymbolPackage getSymbolPackage(); - -} //SymbolFactory diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolPackage.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolPackage.java deleted file mode 100644 index 8f799fc93..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolPackage.java +++ /dev/null @@ -1,2674 +0,0 @@ -/** - * Copyright 2006 Oracle - * - * $Id: SymbolPackage.java,v 1.10 2008/11/18 22:24:37 gkessler Exp $ - */ -package org.eclipse.jst.jsf.context.symbol; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * <!-- begin-user-doc --> - * The <b>Package</b> for the model. - * It contains accessors for the meta objects to represent - * <ul> - * <li>each class,</li> - * <li>each feature of each class,</li> - * <li>each enum,</li> - * <li>and each data type</li> - * </ul> - * - * <p><b>Provisional API - subject to change</b></p> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.SymbolFactory - * @model kind="package" - * @generated - */ -public interface SymbolPackage extends EPackage { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The package name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNAME = "symbol"; //$NON-NLS-1$ - - /** - * The package namespace URI. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNS_URI = "http:///org/eclipse/jst/jsf/context/symbol.ecore"; //$NON-NLS-1$ - - /** - * The package namespace name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNS_PREFIX = "org.eclipse.jst.jsf.context.symbol"; //$NON-NLS-1$ - - /** - * The singleton instance of the package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - SymbolPackage eINSTANCE = org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl.init(); - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.ISymbol <em>ISymbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.ISymbol - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getISymbol() - * @generated - */ - int ISYMBOL = 4; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ISYMBOL__NAME = 0; - - /** - * The number of structural features of the '<em>ISymbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ISYMBOL_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol <em>IObject Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.IObjectSymbol - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIObjectSymbol() - * @generated - */ - int IOBJECT_SYMBOL = 13; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IOBJECT_SYMBOL__NAME = ISYMBOL__NAME; - - /** - * The feature id for the '<em><b>Type Descriptor</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IOBJECT_SYMBOL__TYPE_DESCRIPTOR = ISYMBOL_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Readable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IOBJECT_SYMBOL__READABLE = ISYMBOL_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Writable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IOBJECT_SYMBOL__WRITABLE = ISYMBOL_FEATURE_COUNT + 2; - - /** - * The number of structural features of the '<em>IObject Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IOBJECT_SYMBOL_FEATURE_COUNT = ISYMBOL_FEATURE_COUNT + 3; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl <em>IInstance Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIInstanceSymbol() - * @generated - */ - int IINSTANCE_SYMBOL = 2; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IINSTANCE_SYMBOL__NAME = IOBJECT_SYMBOL__NAME; - - /** - * The feature id for the '<em><b>Type Descriptor</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IINSTANCE_SYMBOL__TYPE_DESCRIPTOR = IOBJECT_SYMBOL__TYPE_DESCRIPTOR; - - /** - * The feature id for the '<em><b>Readable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IINSTANCE_SYMBOL__READABLE = IOBJECT_SYMBOL__READABLE; - - /** - * The feature id for the '<em><b>Writable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IINSTANCE_SYMBOL__WRITABLE = IOBJECT_SYMBOL__WRITABLE; - - /** - * The feature id for the '<em><b>Type Resolved</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IINSTANCE_SYMBOL__TYPE_RESOLVED = IOBJECT_SYMBOL_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Runtime Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IINSTANCE_SYMBOL__RUNTIME_SOURCE = IOBJECT_SYMBOL_FEATURE_COUNT + 1; - - /** - * The number of structural features of the '<em>IInstance Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IINSTANCE_SYMBOL_FEATURE_COUNT = IOBJECT_SYMBOL_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanInstanceSymbolImpl <em>IBean Instance Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanInstanceSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanInstanceSymbol() - * @generated - */ - int IBEAN_INSTANCE_SYMBOL = 0; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL__NAME = IINSTANCE_SYMBOL__NAME; - - /** - * The feature id for the '<em><b>Type Descriptor</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL__TYPE_DESCRIPTOR = IINSTANCE_SYMBOL__TYPE_DESCRIPTOR; - - /** - * The feature id for the '<em><b>Readable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL__READABLE = IINSTANCE_SYMBOL__READABLE; - - /** - * The feature id for the '<em><b>Writable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL__WRITABLE = IINSTANCE_SYMBOL__WRITABLE; - - /** - * The feature id for the '<em><b>Type Resolved</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL__TYPE_RESOLVED = IINSTANCE_SYMBOL__TYPE_RESOLVED; - - /** - * The feature id for the '<em><b>Runtime Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL__RUNTIME_SOURCE = IINSTANCE_SYMBOL__RUNTIME_SOURCE; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL__PROPERTIES = IINSTANCE_SYMBOL_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL__METHODS = IINSTANCE_SYMBOL_FEATURE_COUNT + 1; - - /** - * The number of structural features of the '<em>IBean Instance Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_INSTANCE_SYMBOL_FEATURE_COUNT = IINSTANCE_SYMBOL_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl <em>IProperty Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIPropertySymbol() - * @generated - */ - int IPROPERTY_SYMBOL = 10; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IPROPERTY_SYMBOL__NAME = IOBJECT_SYMBOL__NAME; - - /** - * The feature id for the '<em><b>Type Descriptor</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IPROPERTY_SYMBOL__TYPE_DESCRIPTOR = IOBJECT_SYMBOL__TYPE_DESCRIPTOR; - - /** - * The feature id for the '<em><b>Readable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IPROPERTY_SYMBOL__READABLE = IOBJECT_SYMBOL__READABLE; - - /** - * The feature id for the '<em><b>Writable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IPROPERTY_SYMBOL__WRITABLE = IOBJECT_SYMBOL__WRITABLE; - - /** - * The feature id for the '<em><b>Intermediate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IPROPERTY_SYMBOL__INTERMEDIATE = IOBJECT_SYMBOL_FEATURE_COUNT + 0; - - /** - * The number of structural features of the '<em>IProperty Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IPROPERTY_SYMBOL_FEATURE_COUNT = IOBJECT_SYMBOL_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanPropertySymbolImpl <em>IBean Property Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanPropertySymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanPropertySymbol() - * @generated - */ - int IBEAN_PROPERTY_SYMBOL = 1; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_PROPERTY_SYMBOL__NAME = IPROPERTY_SYMBOL__NAME; - - /** - * The feature id for the '<em><b>Type Descriptor</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_PROPERTY_SYMBOL__TYPE_DESCRIPTOR = IPROPERTY_SYMBOL__TYPE_DESCRIPTOR; - - /** - * The feature id for the '<em><b>Readable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_PROPERTY_SYMBOL__READABLE = IPROPERTY_SYMBOL__READABLE; - - /** - * The feature id for the '<em><b>Writable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_PROPERTY_SYMBOL__WRITABLE = IPROPERTY_SYMBOL__WRITABLE; - - /** - * The feature id for the '<em><b>Intermediate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_PROPERTY_SYMBOL__INTERMEDIATE = IPROPERTY_SYMBOL__INTERMEDIATE; - - /** - * The feature id for the '<em><b>Owner</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_PROPERTY_SYMBOL__OWNER = IPROPERTY_SYMBOL_FEATURE_COUNT + 0; - - /** - * The number of structural features of the '<em>IBean Property Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_PROPERTY_SYMBOL_FEATURE_COUNT = IPROPERTY_SYMBOL_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaSymbolImpl <em>IJava Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaSymbol() - * @generated - */ - int IJAVA_SYMBOL = 3; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_SYMBOL__NAME = ISYMBOL__NAME; - - /** - * The feature id for the '<em><b>Java Element</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_SYMBOL__JAVA_ELEMENT = ISYMBOL_FEATURE_COUNT + 0; - - /** - * The number of structural features of the '<em>IJava Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_SYMBOL_FEATURE_COUNT = ISYMBOL_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl <em>IType Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getITypeDescriptor() - * @generated - */ - int ITYPE_DESCRIPTOR = 5; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__PROPERTIES = 0; - - /** - * The feature id for the '<em><b>Type Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__TYPE_SIGNATURE = 1; - - /** - * The feature id for the '<em><b>Super Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = 2; - - /** - * The feature id for the '<em><b>Interface Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = 3; - - /** - * The feature id for the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = 4; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__METHODS = 5; - - /** - * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = 6; - - /** - * The feature id for the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__JDT_CONTEXT = 7; - - /** - * The feature id for the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR__ENUM_TYPE = 8; - - /** - * The number of structural features of the '<em>IType Descriptor</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ITYPE_DESCRIPTOR_FEATURE_COUNT = 9; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.IDescribedInDetail <em>IDescribed In Detail</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.IDescribedInDetail - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIDescribedInDetail() - * @generated - */ - int IDESCRIBED_IN_DETAIL = 6; - - /** - * The number of structural features of the '<em>IDescribed In Detail</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IDESCRIBED_IN_DETAIL_FEATURE_COUNT = 0; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl <em>IJava Type Descriptor2</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaTypeDescriptor2() - * @generated - */ - int IJAVA_TYPE_DESCRIPTOR2 = 7; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__PROPERTIES = ITYPE_DESCRIPTOR__PROPERTIES; - - /** - * The feature id for the '<em><b>Type Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__TYPE_SIGNATURE = ITYPE_DESCRIPTOR__TYPE_SIGNATURE; - - /** - * The feature id for the '<em><b>Super Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__SUPER_TYPE_SIGNATURES = ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Interface Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__INTERFACE_TYPE_SIGNATURES = ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__TYPE_SIGNATURE_DELEGATE = ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__METHODS = ITYPE_DESCRIPTOR__METHODS; - - /** - * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__TYPE_PARAMETER_SIGNATURES = ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; - - /** - * The feature id for the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__JDT_CONTEXT = ITYPE_DESCRIPTOR__JDT_CONTEXT; - - /** - * The feature id for the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__ENUM_TYPE = ITYPE_DESCRIPTOR__ENUM_TYPE; - - /** - * The feature id for the '<em><b>Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__TYPE = ITYPE_DESCRIPTOR_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Bean Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES = ITYPE_DESCRIPTOR_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Bean Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS = ITYPE_DESCRIPTOR_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>Array Count</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT = ITYPE_DESCRIPTOR_FEATURE_COUNT + 3; - - /** - * The number of structural features of the '<em>IJava Type Descriptor2</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IJAVA_TYPE_DESCRIPTOR2_FEATURE_COUNT = ITYPE_DESCRIPTOR_FEATURE_COUNT + 4; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanMethodSymbolImpl <em>IBean Method Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanMethodSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanMethodSymbol() - * @generated - */ - int IBEAN_METHOD_SYMBOL = 8; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_METHOD_SYMBOL__NAME = IDESCRIBED_IN_DETAIL_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_METHOD_SYMBOL__SIGNATURE = IDESCRIBED_IN_DETAIL_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Owner</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_METHOD_SYMBOL__OWNER = IDESCRIBED_IN_DETAIL_FEATURE_COUNT + 2; - - /** - * The number of structural features of the '<em>IBean Method Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBEAN_METHOD_SYMBOL_FEATURE_COUNT = IDESCRIBED_IN_DETAIL_FEATURE_COUNT + 3; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IComponentSymbolImpl <em>IComponent Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IComponentSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIComponentSymbol() - * @generated - */ - int ICOMPONENT_SYMBOL = 9; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ICOMPONENT_SYMBOL__NAME = IINSTANCE_SYMBOL__NAME; - - /** - * The feature id for the '<em><b>Type Descriptor</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ICOMPONENT_SYMBOL__TYPE_DESCRIPTOR = IINSTANCE_SYMBOL__TYPE_DESCRIPTOR; - - /** - * The feature id for the '<em><b>Readable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ICOMPONENT_SYMBOL__READABLE = IINSTANCE_SYMBOL__READABLE; - - /** - * The feature id for the '<em><b>Writable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ICOMPONENT_SYMBOL__WRITABLE = IINSTANCE_SYMBOL__WRITABLE; - - /** - * The feature id for the '<em><b>Type Resolved</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ICOMPONENT_SYMBOL__TYPE_RESOLVED = IINSTANCE_SYMBOL__TYPE_RESOLVED; - - /** - * The feature id for the '<em><b>Runtime Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ICOMPONENT_SYMBOL__RUNTIME_SOURCE = IINSTANCE_SYMBOL__RUNTIME_SOURCE; - - /** - * The number of structural features of the '<em>IComponent Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ICOMPONENT_SYMBOL_FEATURE_COUNT = IINSTANCE_SYMBOL_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IMapTypeDescriptorImpl <em>IMap Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IMapTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIMapTypeDescriptor() - * @generated - */ - int IMAP_TYPE_DESCRIPTOR = 11; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__PROPERTIES = ITYPE_DESCRIPTOR__PROPERTIES; - - /** - * The feature id for the '<em><b>Type Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__TYPE_SIGNATURE = ITYPE_DESCRIPTOR__TYPE_SIGNATURE; - - /** - * The feature id for the '<em><b>Super Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Interface Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__METHODS = ITYPE_DESCRIPTOR__METHODS; - - /** - * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; - - /** - * The feature id for the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__JDT_CONTEXT = ITYPE_DESCRIPTOR__JDT_CONTEXT; - - /** - * The feature id for the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__ENUM_TYPE = ITYPE_DESCRIPTOR__ENUM_TYPE; - - /** - * The feature id for the '<em><b>Map Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__MAP_SOURCE = ITYPE_DESCRIPTOR_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Immutable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR__IMMUTABLE = ITYPE_DESCRIPTOR_FEATURE_COUNT + 1; - - /** - * The number of structural features of the '<em>IMap Type Descriptor</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMAP_TYPE_DESCRIPTOR_FEATURE_COUNT = ITYPE_DESCRIPTOR_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IMethodSymbolImpl <em>IMethod Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IMethodSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIMethodSymbol() - * @generated - */ - int IMETHOD_SYMBOL = 12; - - /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMETHOD_SYMBOL__NAME = ISYMBOL__NAME; - - /** - * The feature id for the '<em><b>Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMETHOD_SYMBOL__SIGNATURE = ISYMBOL_FEATURE_COUNT + 0; - - /** - * The number of structural features of the '<em>IMethod Symbol</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IMETHOD_SYMBOL_FEATURE_COUNT = ISYMBOL_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor <em>IBounded Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedTypeDescriptor() - * @generated - */ - int IBOUNDED_TYPE_DESCRIPTOR = 14; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__PROPERTIES = ITYPE_DESCRIPTOR__PROPERTIES; - - /** - * The feature id for the '<em><b>Type Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__TYPE_SIGNATURE = ITYPE_DESCRIPTOR__TYPE_SIGNATURE; - - /** - * The feature id for the '<em><b>Super Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Interface Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__METHODS = ITYPE_DESCRIPTOR__METHODS; - - /** - * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; - - /** - * The feature id for the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__JDT_CONTEXT = ITYPE_DESCRIPTOR__JDT_CONTEXT; - - /** - * The feature id for the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR__ENUM_TYPE = ITYPE_DESCRIPTOR__ENUM_TYPE; - - /** - * The number of structural features of the '<em>IBounded Type Descriptor</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_TYPE_DESCRIPTOR_FEATURE_COUNT = ITYPE_DESCRIPTOR_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedMapTypeDescriptorImpl <em>IBounded Map Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedMapTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedMapTypeDescriptor() - * @generated - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR = 15; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__PROPERTIES = IMAP_TYPE_DESCRIPTOR__PROPERTIES; - - /** - * The feature id for the '<em><b>Type Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__TYPE_SIGNATURE = IMAP_TYPE_DESCRIPTOR__TYPE_SIGNATURE; - - /** - * The feature id for the '<em><b>Super Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = IMAP_TYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Interface Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = IMAP_TYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = IMAP_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__METHODS = IMAP_TYPE_DESCRIPTOR__METHODS; - - /** - * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = IMAP_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; - - /** - * The feature id for the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__JDT_CONTEXT = IMAP_TYPE_DESCRIPTOR__JDT_CONTEXT; - - /** - * The feature id for the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__ENUM_TYPE = IMAP_TYPE_DESCRIPTOR__ENUM_TYPE; - - /** - * The feature id for the '<em><b>Map Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__MAP_SOURCE = IMAP_TYPE_DESCRIPTOR__MAP_SOURCE; - - /** - * The feature id for the '<em><b>Immutable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR__IMMUTABLE = IMAP_TYPE_DESCRIPTOR__IMMUTABLE; - - /** - * The number of structural features of the '<em>IBounded Map Type Descriptor</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_MAP_TYPE_DESCRIPTOR_FEATURE_COUNT = IMAP_TYPE_DESCRIPTOR_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedJavaTypeDescriptorImpl <em>IBounded Java Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedJavaTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedJavaTypeDescriptor() - * @generated - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR = 16; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__PROPERTIES = IJAVA_TYPE_DESCRIPTOR2__PROPERTIES; - - /** - * The feature id for the '<em><b>Type Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__TYPE_SIGNATURE = IJAVA_TYPE_DESCRIPTOR2__TYPE_SIGNATURE; - - /** - * The feature id for the '<em><b>Super Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = IJAVA_TYPE_DESCRIPTOR2__SUPER_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Interface Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = IJAVA_TYPE_DESCRIPTOR2__INTERFACE_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = IJAVA_TYPE_DESCRIPTOR2__TYPE_SIGNATURE_DELEGATE; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__METHODS = IJAVA_TYPE_DESCRIPTOR2__METHODS; - - /** - * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = IJAVA_TYPE_DESCRIPTOR2__TYPE_PARAMETER_SIGNATURES; - - /** - * The feature id for the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__JDT_CONTEXT = IJAVA_TYPE_DESCRIPTOR2__JDT_CONTEXT; - - /** - * The feature id for the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__ENUM_TYPE = IJAVA_TYPE_DESCRIPTOR2__ENUM_TYPE; - - /** - * The feature id for the '<em><b>Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__TYPE = IJAVA_TYPE_DESCRIPTOR2__TYPE; - - /** - * The feature id for the '<em><b>Bean Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__BEAN_PROPERTIES = IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES; - - /** - * The feature id for the '<em><b>Bean Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__BEAN_METHODS = IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS; - - /** - * The feature id for the '<em><b>Array Count</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR__ARRAY_COUNT = IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT; - - /** - * The number of structural features of the '<em>IBounded Java Type Descriptor</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_JAVA_TYPE_DESCRIPTOR_FEATURE_COUNT = IJAVA_TYPE_DESCRIPTOR2_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IListTypeDescriptorImpl <em>IList Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IListTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIListTypeDescriptor() - * @generated - */ - int ILIST_TYPE_DESCRIPTOR = 17; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__PROPERTIES = ITYPE_DESCRIPTOR__PROPERTIES; - - /** - * The feature id for the '<em><b>Type Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__TYPE_SIGNATURE = ITYPE_DESCRIPTOR__TYPE_SIGNATURE; - - /** - * The feature id for the '<em><b>Super Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Interface Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__METHODS = ITYPE_DESCRIPTOR__METHODS; - - /** - * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; - - /** - * The feature id for the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__JDT_CONTEXT = ITYPE_DESCRIPTOR__JDT_CONTEXT; - - /** - * The feature id for the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__ENUM_TYPE = ITYPE_DESCRIPTOR__ENUM_TYPE; - - /** - * The feature id for the '<em><b>List Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR__LIST_SOURCE = ITYPE_DESCRIPTOR_FEATURE_COUNT + 0; - - /** - * The number of structural features of the '<em>IList Type Descriptor</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ILIST_TYPE_DESCRIPTOR_FEATURE_COUNT = ITYPE_DESCRIPTOR_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedListTypeDescriptorImpl <em>IBounded List Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedListTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedListTypeDescriptor() - * @generated - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR = 18; - - /** - * The feature id for the '<em><b>Properties</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__PROPERTIES = ILIST_TYPE_DESCRIPTOR__PROPERTIES; - - /** - * The feature id for the '<em><b>Type Signature</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__TYPE_SIGNATURE = ILIST_TYPE_DESCRIPTOR__TYPE_SIGNATURE; - - /** - * The feature id for the '<em><b>Super Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = ILIST_TYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Interface Type Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = ILIST_TYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES; - - /** - * The feature id for the '<em><b>Type Signature Delegate</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = ILIST_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE; - - /** - * The feature id for the '<em><b>Methods</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__METHODS = ILIST_TYPE_DESCRIPTOR__METHODS; - - /** - * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = ILIST_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; - - /** - * The feature id for the '<em><b>Jdt Context</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__JDT_CONTEXT = ILIST_TYPE_DESCRIPTOR__JDT_CONTEXT; - - /** - * The feature id for the '<em><b>Enum Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__ENUM_TYPE = ILIST_TYPE_DESCRIPTOR__ENUM_TYPE; - - /** - * The feature id for the '<em><b>List Source</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR__LIST_SOURCE = ILIST_TYPE_DESCRIPTOR__LIST_SOURCE; - - /** - * The number of structural features of the '<em>IBounded List Type Descriptor</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int IBOUNDED_LIST_TYPE_DESCRIPTOR_FEATURE_COUNT = ILIST_TYPE_DESCRIPTOR_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.ERuntimeSource <em>ERuntime Source</em>}' enum. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.ERuntimeSource - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getERuntimeSource() - * @generated - */ - int ERUNTIME_SOURCE = 19; - - /** - * The meta object id for the '<em>IType</em>' data type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jdt.core.IType - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIType() - * @generated - */ - int ITYPE = 20; - - /** - * The meta object id for the '<em>IJava Element</em>' data type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jdt.core.IJavaElement - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaElement() - * @generated - */ - int IJAVA_ELEMENT = 21; - - /** - * The meta object id for the '<em>Value Type</em>' data type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.common.internal.types.ValueType - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getValueType() - * @generated - */ - int VALUE_TYPE = 22; - - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol <em>IBean Instance Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IBean Instance Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol - * @generated - */ - EClass getIBeanInstanceSymbol(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol#getProperties <em>Properties</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Properties</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol#getProperties() - * @see #getIBeanInstanceSymbol() - * @generated - */ - EReference getIBeanInstanceSymbol_Properties(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol#getMethods <em>Methods</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Methods</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol#getMethods() - * @see #getIBeanInstanceSymbol() - * @generated - */ - EReference getIBeanInstanceSymbol_Methods(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol <em>IBean Property Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IBean Property Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol - * @generated - */ - EClass getIBeanPropertySymbol(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol#getOwner <em>Owner</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Owner</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol#getOwner() - * @see #getIBeanPropertySymbol() - * @generated - */ - EReference getIBeanPropertySymbol_Owner(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IInstanceSymbol <em>IInstance Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IInstance Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IInstanceSymbol - * @generated - */ - EClass getIInstanceSymbol(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IInstanceSymbol#isTypeResolved <em>Type Resolved</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Type Resolved</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IInstanceSymbol#isTypeResolved() - * @see #getIInstanceSymbol() - * @generated - */ - EAttribute getIInstanceSymbol_TypeResolved(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IInstanceSymbol#getRuntimeSource <em>Runtime Source</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Runtime Source</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IInstanceSymbol#getRuntimeSource() - * @see #getIInstanceSymbol() - * @generated - */ - EAttribute getIInstanceSymbol_RuntimeSource(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IJavaSymbol <em>IJava Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IJava Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IJavaSymbol - * @generated - */ - EClass getIJavaSymbol(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IJavaSymbol#getJavaElement <em>Java Element</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Java Element</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IJavaSymbol#getJavaElement() - * @see #getIJavaSymbol() - * @generated - */ - EAttribute getIJavaSymbol_JavaElement(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.ISymbol <em>ISymbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>ISymbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ISymbol - * @generated - */ - EClass getISymbol(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.ISymbol#getName <em>Name</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Name</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ISymbol#getName() - * @see #getISymbol() - * @generated - */ - EAttribute getISymbol_Name(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor <em>IType Descriptor</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IType Descriptor</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor - * @generated - */ - EClass getITypeDescriptor(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getProperties <em>Properties</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Properties</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getProperties() - * @see #getITypeDescriptor() - * @generated - */ - EReference getITypeDescriptor_Properties(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeSignature <em>Type Signature</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Type Signature</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeSignature() - * @see #getITypeDescriptor() - * @generated - */ - EAttribute getITypeDescriptor_TypeSignature(); - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getSuperTypeSignatures <em>Super Type Signatures</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute list '<em>Super Type Signatures</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getSuperTypeSignatures() - * @see #getITypeDescriptor() - * @generated - */ - EAttribute getITypeDescriptor_SuperTypeSignatures(); - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getInterfaceTypeSignatures <em>Interface Type Signatures</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute list '<em>Interface Type Signatures</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getInterfaceTypeSignatures() - * @see #getITypeDescriptor() - * @generated - */ - EAttribute getITypeDescriptor_InterfaceTypeSignatures(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeSignatureDelegate <em>Type Signature Delegate</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Type Signature Delegate</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeSignatureDelegate() - * @see #getITypeDescriptor() - * @generated - */ - EAttribute getITypeDescriptor_TypeSignatureDelegate(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getMethods <em>Methods</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Methods</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getMethods() - * @see #getITypeDescriptor() - * @generated - */ - EReference getITypeDescriptor_Methods(); - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeParameterSignatures <em>Type Parameter Signatures</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute list '<em>Type Parameter Signatures</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeParameterSignatures() - * @see #getITypeDescriptor() - * @generated - */ - EAttribute getITypeDescriptor_TypeParameterSignatures(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getJdtContext <em>Jdt Context</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Jdt Context</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getJdtContext() - * @see #getITypeDescriptor() - * @generated - */ - EAttribute getITypeDescriptor_JdtContext(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#isEnumType <em>Enum Type</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Enum Type</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#isEnumType() - * @see #getITypeDescriptor() - * @generated - */ - EAttribute getITypeDescriptor_EnumType(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IDescribedInDetail <em>IDescribed In Detail</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IDescribed In Detail</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IDescribedInDetail - * @generated - */ - EClass getIDescribedInDetail(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2 <em>IJava Type Descriptor2</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IJava Type Descriptor2</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2 - * @generated - */ - EClass getIJavaTypeDescriptor2(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getType <em>Type</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Type</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getType() - * @see #getIJavaTypeDescriptor2() - * @generated - */ - EAttribute getIJavaTypeDescriptor2_Type(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getBeanProperties <em>Bean Properties</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Bean Properties</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getBeanProperties() - * @see #getIJavaTypeDescriptor2() - * @generated - */ - EReference getIJavaTypeDescriptor2_BeanProperties(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getBeanMethods <em>Bean Methods</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Bean Methods</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getBeanMethods() - * @see #getIJavaTypeDescriptor2() - * @generated - */ - EReference getIJavaTypeDescriptor2_BeanMethods(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getArrayCount <em>Array Count</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Array Count</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2#getArrayCount() - * @see #getIJavaTypeDescriptor2() - * @generated - */ - EAttribute getIJavaTypeDescriptor2_ArrayCount(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol <em>IBean Method Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IBean Method Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol - * @generated - */ - EClass getIBeanMethodSymbol(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol#getOwner <em>Owner</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Owner</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol#getOwner() - * @see #getIBeanMethodSymbol() - * @generated - */ - EReference getIBeanMethodSymbol_Owner(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IComponentSymbol <em>IComponent Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IComponent Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IComponentSymbol - * @generated - */ - EClass getIComponentSymbol(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol <em>IProperty Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IProperty Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IPropertySymbol - * @generated - */ - EClass getIPropertySymbol(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol#isIntermediate <em>Intermediate</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Intermediate</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IPropertySymbol#isIntermediate() - * @see #getIPropertySymbol() - * @generated - */ - EAttribute getIPropertySymbol_Intermediate(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor <em>IMap Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IMap Type Descriptor</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor - * @generated - */ - EClass getIMapTypeDescriptor(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor#getMapSource <em>Map Source</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Map Source</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor#getMapSource() - * @see #getIMapTypeDescriptor() - * @generated - */ - EAttribute getIMapTypeDescriptor_MapSource(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor#isImmutable <em>Immutable</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Immutable</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor#isImmutable() - * @see #getIMapTypeDescriptor() - * @generated - */ - EAttribute getIMapTypeDescriptor_Immutable(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol <em>IMethod Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IMethod Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IMethodSymbol - * @generated - */ - EClass getIMethodSymbol(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol#getSignature <em>Signature</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Signature</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IMethodSymbol#getSignature() - * @see #getIMethodSymbol() - * @generated - */ - EAttribute getIMethodSymbol_Signature(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol <em>IObject Symbol</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IObject Symbol</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IObjectSymbol - * @generated - */ - EClass getIObjectSymbol(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#getTypeDescriptor <em>Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Type Descriptor</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IObjectSymbol#getTypeDescriptor() - * @see #getIObjectSymbol() - * @generated - */ - EReference getIObjectSymbol_TypeDescriptor(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#isReadable <em>Readable</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Readable</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IObjectSymbol#isReadable() - * @see #getIObjectSymbol() - * @generated - */ - EAttribute getIObjectSymbol_Readable(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol#isWritable <em>Writable</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Writable</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IObjectSymbol#isWritable() - * @see #getIObjectSymbol() - * @generated - */ - EAttribute getIObjectSymbol_Writable(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor <em>IBounded Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IBounded Type Descriptor</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor - * @generated - */ - EClass getIBoundedTypeDescriptor(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor <em>IBounded Map Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IBounded Map Type Descriptor</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor - * @generated - */ - EClass getIBoundedMapTypeDescriptor(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor <em>IBounded Java Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IBounded Java Type Descriptor</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor - * @generated - */ - EClass getIBoundedJavaTypeDescriptor(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor <em>IList Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IList Type Descriptor</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor - * @generated - */ - EClass getIListTypeDescriptor(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor#getListSource <em>List Source</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>List Source</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor#getListSource() - * @see #getIListTypeDescriptor() - * @generated - */ - EAttribute getIListTypeDescriptor_ListSource(); - - /** - * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor <em>IBounded List Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>IBounded List Type Descriptor</em>'. - * @see org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor - * @generated - */ - EClass getIBoundedListTypeDescriptor(); - - /** - * Returns the meta object for enum '{@link org.eclipse.jst.jsf.context.symbol.ERuntimeSource <em>ERuntime Source</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for enum '<em>ERuntime Source</em>'. - * @see org.eclipse.jst.jsf.context.symbol.ERuntimeSource - * @generated - */ - EEnum getERuntimeSource(); - - /** - * Returns the meta object for data type '{@link org.eclipse.jdt.core.IType <em>IType</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for data type '<em>IType</em>'. - * @see org.eclipse.jdt.core.IType - * @model instanceClass="org.eclipse.jdt.core.IType" - * @generated - */ - EDataType getIType(); - - /** - * Returns the meta object for data type '{@link org.eclipse.jdt.core.IJavaElement <em>IJava Element</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for data type '<em>IJava Element</em>'. - * @see org.eclipse.jdt.core.IJavaElement - * @model instanceClass="org.eclipse.jdt.core.IJavaElement" - * @generated - */ - EDataType getIJavaElement(); - - /** - * Returns the meta object for data type '{@link org.eclipse.jst.jsf.common.internal.types.ValueType <em>Value Type</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for data type '<em>Value Type</em>'. - * @see org.eclipse.jst.jsf.common.internal.types.ValueType - * @model instanceClass="org.eclipse.jst.jsf.common.internal.types.ValueType" - * @generated - */ - EDataType getValueType(); - - /** - * Returns the factory that creates the instances of the model. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the factory that creates the instances of the model. - * @generated - */ - SymbolFactory getSymbolFactory(); - - /** - * <!-- begin-user-doc --> - * Defines literals for the meta objects that represent - * <ul> - * <li>each class,</li> - * <li>each feature of each class,</li> - * <li>each enum,</li> - * <li>and each data type</li> - * </ul> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - interface Literals { - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanInstanceSymbolImpl <em>IBean Instance Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanInstanceSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanInstanceSymbol() - * @generated - */ - EClass IBEAN_INSTANCE_SYMBOL = eINSTANCE.getIBeanInstanceSymbol(); - - /** - * The meta object literal for the '<em><b>Properties</b></em>' reference list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference IBEAN_INSTANCE_SYMBOL__PROPERTIES = eINSTANCE.getIBeanInstanceSymbol_Properties(); - - /** - * The meta object literal for the '<em><b>Methods</b></em>' reference list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference IBEAN_INSTANCE_SYMBOL__METHODS = eINSTANCE.getIBeanInstanceSymbol_Methods(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanPropertySymbolImpl <em>IBean Property Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanPropertySymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanPropertySymbol() - * @generated - */ - EClass IBEAN_PROPERTY_SYMBOL = eINSTANCE.getIBeanPropertySymbol(); - - /** - * The meta object literal for the '<em><b>Owner</b></em>' reference feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference IBEAN_PROPERTY_SYMBOL__OWNER = eINSTANCE.getIBeanPropertySymbol_Owner(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl <em>IInstance Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIInstanceSymbol() - * @generated - */ - EClass IINSTANCE_SYMBOL = eINSTANCE.getIInstanceSymbol(); - - /** - * The meta object literal for the '<em><b>Type Resolved</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IINSTANCE_SYMBOL__TYPE_RESOLVED = eINSTANCE.getIInstanceSymbol_TypeResolved(); - - /** - * The meta object literal for the '<em><b>Runtime Source</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IINSTANCE_SYMBOL__RUNTIME_SOURCE = eINSTANCE.getIInstanceSymbol_RuntimeSource(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaSymbolImpl <em>IJava Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaSymbol() - * @generated - */ - EClass IJAVA_SYMBOL = eINSTANCE.getIJavaSymbol(); - - /** - * The meta object literal for the '<em><b>Java Element</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IJAVA_SYMBOL__JAVA_ELEMENT = eINSTANCE.getIJavaSymbol_JavaElement(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.ISymbol <em>ISymbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.ISymbol - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getISymbol() - * @generated - */ - EClass ISYMBOL = eINSTANCE.getISymbol(); - - /** - * The meta object literal for the '<em><b>Name</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ISYMBOL__NAME = eINSTANCE.getISymbol_Name(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl <em>IType Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getITypeDescriptor() - * @generated - */ - EClass ITYPE_DESCRIPTOR = eINSTANCE.getITypeDescriptor(); - - /** - * The meta object literal for the '<em><b>Properties</b></em>' reference list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference ITYPE_DESCRIPTOR__PROPERTIES = eINSTANCE.getITypeDescriptor_Properties(); - - /** - * The meta object literal for the '<em><b>Type Signature</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ITYPE_DESCRIPTOR__TYPE_SIGNATURE = eINSTANCE.getITypeDescriptor_TypeSignature(); - - /** - * The meta object literal for the '<em><b>Super Type Signatures</b></em>' attribute list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = eINSTANCE.getITypeDescriptor_SuperTypeSignatures(); - - /** - * The meta object literal for the '<em><b>Interface Type Signatures</b></em>' attribute list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = eINSTANCE.getITypeDescriptor_InterfaceTypeSignatures(); - - /** - * The meta object literal for the '<em><b>Type Signature Delegate</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = eINSTANCE.getITypeDescriptor_TypeSignatureDelegate(); - - /** - * The meta object literal for the '<em><b>Methods</b></em>' reference list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference ITYPE_DESCRIPTOR__METHODS = eINSTANCE.getITypeDescriptor_Methods(); - - /** - * The meta object literal for the '<em><b>Type Parameter Signatures</b></em>' attribute list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = eINSTANCE.getITypeDescriptor_TypeParameterSignatures(); - - /** - * The meta object literal for the '<em><b>Jdt Context</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ITYPE_DESCRIPTOR__JDT_CONTEXT = eINSTANCE.getITypeDescriptor_JdtContext(); - - /** - * The meta object literal for the '<em><b>Enum Type</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ITYPE_DESCRIPTOR__ENUM_TYPE = eINSTANCE.getITypeDescriptor_EnumType(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.IDescribedInDetail <em>IDescribed In Detail</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.IDescribedInDetail - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIDescribedInDetail() - * @generated - */ - EClass IDESCRIBED_IN_DETAIL = eINSTANCE.getIDescribedInDetail(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl <em>IJava Type Descriptor2</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaTypeDescriptor2() - * @generated - */ - EClass IJAVA_TYPE_DESCRIPTOR2 = eINSTANCE.getIJavaTypeDescriptor2(); - - /** - * The meta object literal for the '<em><b>Type</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IJAVA_TYPE_DESCRIPTOR2__TYPE = eINSTANCE.getIJavaTypeDescriptor2_Type(); - - /** - * The meta object literal for the '<em><b>Bean Properties</b></em>' reference list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES = eINSTANCE.getIJavaTypeDescriptor2_BeanProperties(); - - /** - * The meta object literal for the '<em><b>Bean Methods</b></em>' reference list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS = eINSTANCE.getIJavaTypeDescriptor2_BeanMethods(); - - /** - * The meta object literal for the '<em><b>Array Count</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT = eINSTANCE.getIJavaTypeDescriptor2_ArrayCount(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanMethodSymbolImpl <em>IBean Method Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanMethodSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanMethodSymbol() - * @generated - */ - EClass IBEAN_METHOD_SYMBOL = eINSTANCE.getIBeanMethodSymbol(); - - /** - * The meta object literal for the '<em><b>Owner</b></em>' reference feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference IBEAN_METHOD_SYMBOL__OWNER = eINSTANCE.getIBeanMethodSymbol_Owner(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IComponentSymbolImpl <em>IComponent Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IComponentSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIComponentSymbol() - * @generated - */ - EClass ICOMPONENT_SYMBOL = eINSTANCE.getIComponentSymbol(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl <em>IProperty Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIPropertySymbol() - * @generated - */ - EClass IPROPERTY_SYMBOL = eINSTANCE.getIPropertySymbol(); - - /** - * The meta object literal for the '<em><b>Intermediate</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IPROPERTY_SYMBOL__INTERMEDIATE = eINSTANCE.getIPropertySymbol_Intermediate(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IMapTypeDescriptorImpl <em>IMap Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IMapTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIMapTypeDescriptor() - * @generated - */ - EClass IMAP_TYPE_DESCRIPTOR = eINSTANCE.getIMapTypeDescriptor(); - - /** - * The meta object literal for the '<em><b>Map Source</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IMAP_TYPE_DESCRIPTOR__MAP_SOURCE = eINSTANCE.getIMapTypeDescriptor_MapSource(); - - /** - * The meta object literal for the '<em><b>Immutable</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IMAP_TYPE_DESCRIPTOR__IMMUTABLE = eINSTANCE.getIMapTypeDescriptor_Immutable(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IMethodSymbolImpl <em>IMethod Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IMethodSymbolImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIMethodSymbol() - * @generated - */ - EClass IMETHOD_SYMBOL = eINSTANCE.getIMethodSymbol(); - - /** - * The meta object literal for the '<em><b>Signature</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IMETHOD_SYMBOL__SIGNATURE = eINSTANCE.getIMethodSymbol_Signature(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol <em>IObject Symbol</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.IObjectSymbol - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIObjectSymbol() - * @generated - */ - EClass IOBJECT_SYMBOL = eINSTANCE.getIObjectSymbol(); - - /** - * The meta object literal for the '<em><b>Type Descriptor</b></em>' reference feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference IOBJECT_SYMBOL__TYPE_DESCRIPTOR = eINSTANCE.getIObjectSymbol_TypeDescriptor(); - - /** - * The meta object literal for the '<em><b>Readable</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IOBJECT_SYMBOL__READABLE = eINSTANCE.getIObjectSymbol_Readable(); - - /** - * The meta object literal for the '<em><b>Writable</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute IOBJECT_SYMBOL__WRITABLE = eINSTANCE.getIObjectSymbol_Writable(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor <em>IBounded Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedTypeDescriptor() - * @generated - */ - EClass IBOUNDED_TYPE_DESCRIPTOR = eINSTANCE.getIBoundedTypeDescriptor(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedMapTypeDescriptorImpl <em>IBounded Map Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedMapTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedMapTypeDescriptor() - * @generated - */ - EClass IBOUNDED_MAP_TYPE_DESCRIPTOR = eINSTANCE.getIBoundedMapTypeDescriptor(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedJavaTypeDescriptorImpl <em>IBounded Java Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedJavaTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedJavaTypeDescriptor() - * @generated - */ - EClass IBOUNDED_JAVA_TYPE_DESCRIPTOR = eINSTANCE.getIBoundedJavaTypeDescriptor(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IListTypeDescriptorImpl <em>IList Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IListTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIListTypeDescriptor() - * @generated - */ - EClass ILIST_TYPE_DESCRIPTOR = eINSTANCE.getIListTypeDescriptor(); - - /** - * The meta object literal for the '<em><b>List Source</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute ILIST_TYPE_DESCRIPTOR__LIST_SOURCE = eINSTANCE.getIListTypeDescriptor_ListSource(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedListTypeDescriptorImpl <em>IBounded List Type Descriptor</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IBoundedListTypeDescriptorImpl - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedListTypeDescriptor() - * @generated - */ - EClass IBOUNDED_LIST_TYPE_DESCRIPTOR = eINSTANCE.getIBoundedListTypeDescriptor(); - - /** - * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.ERuntimeSource <em>ERuntime Source</em>}' enum. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.ERuntimeSource - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getERuntimeSource() - * @generated - */ - EEnum ERUNTIME_SOURCE = eINSTANCE.getERuntimeSource(); - - /** - * The meta object literal for the '<em>IType</em>' data type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jdt.core.IType - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIType() - * @generated - */ - EDataType ITYPE = eINSTANCE.getIType(); - - /** - * The meta object literal for the '<em>IJava Element</em>' data type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jdt.core.IJavaElement - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaElement() - * @generated - */ - EDataType IJAVA_ELEMENT = eINSTANCE.getIJavaElement(); - - /** - * The meta object literal for the '<em>Value Type</em>' data type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.common.internal.types.ValueType - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getValueType() - * @generated - */ - EDataType VALUE_TYPE = eINSTANCE.getValueType(); - - } - -} //SymbolPackage diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanInstanceSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanInstanceSymbolImpl.java deleted file mode 100644 index 4124126d6..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanInstanceSymbolImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.HashMap; - -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IBean Instance Symbol</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanInstanceSymbolImpl#getProperties <em>Properties</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanInstanceSymbolImpl#getMethods <em>Methods</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IBeanInstanceSymbolImpl extends IInstanceSymbolImpl implements IBeanInstanceSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * A detailed description (human readable) about this instance symbol - */ - protected String _detailedDescription = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBeanInstanceSymbolImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the EClass - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IBEAN_INSTANCE_SYMBOL; - } - - /** - * <!-- begin-user-doc --> - * @return the list of bean properties - * <!-- end-user-doc --> - * @generated NOT - */ - public EList getProperties() - { - return getJavaTypeDescriptor().getBeanProperties(); - } - - /** - * <!-- begin-user-doc --> - * @return the list of methods - * <!-- end-user-doc --> - * @generated NOT - */ - public EList getMethods() { - return getJavaTypeDescriptor().getBeanMethods(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public IJavaTypeDescriptor2 getJavaTypeDescriptor() { - return (IJavaTypeDescriptor2) getTypeDescriptor(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public void setJavaTypeDescriptor(IJavaTypeDescriptor2 newTypeDescriptor) { - setTypeDescriptor(newTypeDescriptor); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the object related to featureID - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IBEAN_INSTANCE_SYMBOL__PROPERTIES: - return getProperties(); - case SymbolPackage.IBEAN_INSTANCE_SYMBOL__METHODS: - return getMethods(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return whether the corresponding feature is set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IBEAN_INSTANCE_SYMBOL__PROPERTIES: - return !getProperties().isEmpty(); - case SymbolPackage.IBEAN_INSTANCE_SYMBOL__METHODS: - return !getMethods().isEmpty(); - } - return super.eIsSet(featureID); - } - - public String getDetailedDescription() - { - return _detailedDescription; - } - - public void setDetailedDescription(String detailedDescription) - { - this._detailedDescription = detailedDescription; - } - - /** - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl#isTypeResolved() - * @generated NOT - */ - // @Override - public boolean isTypeResolved() - { - return getJavaTypeDescriptor() != null; - } - - /** - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl#setTypeDescriptor(org.eclipse.jst.jsf.context.symbol.ITypeDescriptor) - * @generated NOT - */ - public void setTypeDescriptor(ITypeDescriptor newTypeDescriptor) - { - if (newTypeDescriptor instanceof IJavaTypeDescriptor2) - { - super.setTypeDescriptor(newTypeDescriptor); - } - else - { - throw new IllegalArgumentException("Bean instance symbol requires a IJavaTypeDescriptor2"); //$NON-NLS-1$ - } - } - - public boolean isReadable() - { - // beans always readable - return true; - } - - public boolean isWritable() - { - // beans not writable - return false; - } - - public void setReadable(boolean value) { - // do nothing - } - - public void setWritable(boolean value) { - // do nothing - } - - /* - * @generated NOT - */ - public ITypeDescriptor coerce(String typeSignature) - { - if (supportsCoercion(typeSignature)) - { - if (TypeConstants.TYPE_MAP.equals(typeSignature)) - { - IBoundedMapTypeDescriptor mapDesc = - SymbolFactory.eINSTANCE.createIBoundedMapTypeDescriptor(); - // bean maps are generally writable - mapDesc.setImmutable(true); - mapDesc.setMapSource(new HashMap()); // give it an empty map - return mapDesc; - } - else if (TypeConstants.TYPE_LIST.equals(typeSignature)) - { - IBoundedListTypeDescriptor listDesc = - SymbolFactory.eINSTANCE.createIBoundedListTypeDescriptor(); - - // bean maps are generally writable - listDesc.setListSource(new BasicEList()); // give it an empty list - return listDesc; - } - } - - return null; - } - - /** (non-Javadoc) - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#call(java.lang.String, org.eclipse.emf.common.util.EList, java.lang.String) - * - * @generated NOT - */ - public ISymbol call(String methodName, EList methodArguments, - String symbolName) - { - return Util.call(methodName, methodArguments, symbolName, getTypeDescriptor()); - } - -} //IBeanInstanceSymbolImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanMethodSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanMethodSymbolImpl.java deleted file mode 100644 index 03606b41b..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanMethodSymbolImpl.java +++ /dev/null @@ -1,378 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jdt.core.IMethod; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IBean Method Symbol</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanMethodSymbolImpl#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanMethodSymbolImpl#getSignature <em>Signature</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanMethodSymbolImpl#getOwner <em>Owner</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IBeanMethodSymbolImpl extends EObjectImpl implements IBeanMethodSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getSignature() <em>Signature</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSignature() - * @generated - * @ordered - */ - protected static final String SIGNATURE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSignature() <em>Signature</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSignature() - * @generated - * @ordered - */ - protected String signature = SIGNATURE_EDEFAULT; - - /** - * The cached value of the '{@link #getOwner() <em>Owner</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getOwner() - * @generated - * @ordered - */ - protected IJavaTypeDescriptor2 owner = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBeanMethodSymbolImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static eclass - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IBEAN_METHOD_SYMBOL; - } - - /** - * <!-- begin-user-doc --> - * @return the name of the method symbol - * <!-- end-user-doc --> - * @generated - */ - public String getName() { - return name; - } - - /** - * <!-- begin-user-doc --> - * @param newName - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IBEAN_METHOD_SYMBOL__NAME, oldName, name)); - } - - /** - * <!-- begin-user-doc --> - * @return the signature in JVM/JDT form - * <!-- end-user-doc --> - * @generated - */ - public String getSignature() { - return signature; - } - - /** - * <!-- begin-user-doc --> - * @param newSignature - * <!-- end-user-doc --> - * @generated - */ - public void setSignature(String newSignature) { - String oldSignature = signature; - signature = newSignature; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IBEAN_METHOD_SYMBOL__SIGNATURE, oldSignature, signature)); - } - - /** - * <!-- begin-user-doc --> - * @return the java type descriptor that owns this symbol - * <!-- end-user-doc --> - * @generated - */ - public IJavaTypeDescriptor2 getOwner() { - if (owner != null && owner.eIsProxy()) { - InternalEObject oldOwner = (InternalEObject)owner; - owner = (IJavaTypeDescriptor2)eResolveProxy(oldOwner); - if (owner != oldOwner) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, SymbolPackage.IBEAN_METHOD_SYMBOL__OWNER, oldOwner, owner)); - } - } - return owner; - } - - /** - * <!-- begin-user-doc --> - * @return the java type descriptor that derives this symbol - * <!-- end-user-doc --> - * @generated - */ - public IJavaTypeDescriptor2 basicGetOwner() { - return owner; - } - - /** - * <!-- begin-user-doc --> - * @param newOwner - * <!-- end-user-doc --> - * @generated - */ - public void setOwner(IJavaTypeDescriptor2 newOwner) { - IJavaTypeDescriptor2 oldOwner = owner; - owner = newOwner; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IBEAN_METHOD_SYMBOL__OWNER, oldOwner, owner)); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the feature object for featureID - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IBEAN_METHOD_SYMBOL__NAME: - return getName(); - case SymbolPackage.IBEAN_METHOD_SYMBOL__SIGNATURE: - return getSignature(); - case SymbolPackage.IBEAN_METHOD_SYMBOL__OWNER: - if (resolve) return getOwner(); - return basicGetOwner(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IBEAN_METHOD_SYMBOL__NAME: - setName((String)newValue); - return; - case SymbolPackage.IBEAN_METHOD_SYMBOL__SIGNATURE: - setSignature((String)newValue); - return; - case SymbolPackage.IBEAN_METHOD_SYMBOL__OWNER: - setOwner((IJavaTypeDescriptor2)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IBEAN_METHOD_SYMBOL__NAME: - setName(NAME_EDEFAULT); - return; - case SymbolPackage.IBEAN_METHOD_SYMBOL__SIGNATURE: - setSignature(SIGNATURE_EDEFAULT); - return; - case SymbolPackage.IBEAN_METHOD_SYMBOL__OWNER: - setOwner((IJavaTypeDescriptor2)null); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if the feature has been set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IBEAN_METHOD_SYMBOL__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case SymbolPackage.IBEAN_METHOD_SYMBOL__SIGNATURE: - return SIGNATURE_EDEFAULT == null ? signature != null : !SIGNATURE_EDEFAULT.equals(signature); - case SymbolPackage.IBEAN_METHOD_SYMBOL__OWNER: - return owner != null; - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param derivedFeatureID - * @param baseClass - * @return the feature id - * <!-- end-user-doc --> - * @generated - */ - public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { - if (baseClass == ISymbol.class) { - switch (derivedFeatureID) { - case SymbolPackage.IBEAN_METHOD_SYMBOL__NAME: return SymbolPackage.ISYMBOL__NAME; - default: return -1; - } - } - if (baseClass == IMethodSymbol.class) { - switch (derivedFeatureID) { - case SymbolPackage.IBEAN_METHOD_SYMBOL__SIGNATURE: return SymbolPackage.IMETHOD_SYMBOL__SIGNATURE; - default: return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } - - /** - * <!-- begin-user-doc --> - * @param baseFeatureID - * @param baseClass - * @return the feature id - * <!-- end-user-doc --> - * @generated - */ - public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { - if (baseClass == ISymbol.class) { - switch (baseFeatureID) { - case SymbolPackage.ISYMBOL__NAME: return SymbolPackage.IBEAN_METHOD_SYMBOL__NAME; - default: return -1; - } - } - if (baseClass == IMethodSymbol.class) { - switch (baseFeatureID) { - case SymbolPackage.IMETHOD_SYMBOL__SIGNATURE: return SymbolPackage.IBEAN_METHOD_SYMBOL__SIGNATURE; - default: return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } - - /** - * <!-- begin-user-doc --> - * @return the default string representation - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", signature: "); //$NON-NLS-1$ - result.append(signature); - result.append(')'); - return result.toString(); - } - - public String getDetailedDescription() { - StringBuffer descBuffer = new StringBuffer("<p><b>"); //$NON-NLS-1$ - descBuffer.append(Messages.getString("IBeanMethodSymbolImpl.DetailDesc")); //$NON-NLS-1$ - descBuffer.append("</b> "); //$NON-NLS-1$ - descBuffer.append(Signature.toString(signature, getName(), null, false, true)).append("</p>"); //$NON-NLS-1$ - IMethod method = JavaUtil.findCorrespondingMethod(this); - if (method != null) { - String javadoc = JavaUtil.getMethodJavadoc(method); - if (javadoc != null) { - descBuffer.append("<p>").append(javadoc).append("</p>"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - return descBuffer.toString(); - } - - public void setDetailedDescription(String detailedDescription) { - throw new UnsupportedOperationException("Detailed Description is derived on property symbols"); //$NON-NLS-1$ - } - - -} //IBeanMethodSymbolImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanPropertySymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanPropertySymbolImpl.java deleted file mode 100644 index be6a2aa1c..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanPropertySymbolImpl.java +++ /dev/null @@ -1,354 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.HashMap; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.common.util.JDTBeanProperty; -import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IBean Property Symbol</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanPropertySymbolImpl#getOwner <em>Owner</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IBeanPropertySymbolImpl extends IPropertySymbolImpl implements IBeanPropertySymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - - /** - * The cached value of the '{@link #getOwner() <em>Owner</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getOwner() - * @generated - * @ordered - */ - protected IJavaTypeDescriptor2 owner = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBeanPropertySymbolImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static class - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IBEAN_PROPERTY_SYMBOL; - } - - /** - * <!-- begin-user-doc --> - * @return the owner's type descriptor - * <!-- end-user-doc --> - * @generated - */ - public IJavaTypeDescriptor2 getOwner() { - if (owner != null && owner.eIsProxy()) { - InternalEObject oldOwner = (InternalEObject)owner; - owner = (IJavaTypeDescriptor2)eResolveProxy(oldOwner); - if (owner != oldOwner) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, SymbolPackage.IBEAN_PROPERTY_SYMBOL__OWNER, oldOwner, owner)); - } - } - return owner; - } - - /** - * <!-- begin-user-doc --> - * @return the java type descriptor for this instance - * <!-- end-user-doc --> - * @generated - */ - public IJavaTypeDescriptor2 basicGetOwner() { - return owner; - } - - /** - * <!-- begin-user-doc --> - * @param newOwner - * <!-- end-user-doc --> - * @generated - */ - public void setOwner(IJavaTypeDescriptor2 newOwner) { - IJavaTypeDescriptor2 oldOwner = owner; - owner = newOwner; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IBEAN_PROPERTY_SYMBOL__OWNER, oldOwner, owner)); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the value for the featureID - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IBEAN_PROPERTY_SYMBOL__OWNER: - if (resolve) return getOwner(); - return basicGetOwner(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IBEAN_PROPERTY_SYMBOL__OWNER: - setOwner((IJavaTypeDescriptor2)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IBEAN_PROPERTY_SYMBOL__OWNER: - setOwner((IJavaTypeDescriptor2)null); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if the feature is set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IBEAN_PROPERTY_SYMBOL__OWNER: - return owner != null; - } - return super.eIsSet(featureID); - } - - public String getDetailedDescription() - { - return createDetailedDescription(); - } - - public void setDetailedDescription(String detailedDescription) - { - throw new UnsupportedOperationException("Detailed Description is derived on property symbols"); //$NON-NLS-1$ - } - - /** - * @generated NOT - */ - public ITypeDescriptor coerce(final String typeSignature) - { - // ensure that we have an erased version - final String erasedTypeSignature = Signature.getTypeErasure(typeSignature); - - if (supportsCoercion(typeSignature)) - { - if (TypeConstants.TYPE_MAP.equals(erasedTypeSignature)) - { - IBoundedMapTypeDescriptor mapDesc = - SymbolFactory.eINSTANCE.createIBoundedMapTypeDescriptor(); - // bean maps are generally writable - mapDesc.setImmutable(true); - mapDesc.setMapSource(new HashMap()); // give it an empty map - return mapDesc; - } - else if (TypeConstants.TYPE_LIST.equals(erasedTypeSignature)) - { - IBoundedListTypeDescriptor listDesc = - SymbolFactory.eINSTANCE.createIBoundedListTypeDescriptor(); - listDesc.setJdtContext(deriveBestJdtContext()); - - // bean maps are generally writable - return listDesc; - } - } - - return null; - - } - - /** - * @return the derived jdt element - * @generated NOT - */ - private IJavaElement deriveBestJdtContext() - { - IJavaElement contextElement = null; - if (getTypeDescriptor() instanceof IJavaTypeDescriptor2) - { - contextElement = - ((IJavaTypeDescriptor2)getTypeDescriptor()).getType(); - } - - if (contextElement == null) - { - contextElement = getTypeDescriptor().getJdtContext(); - } - - return contextElement; - } - - /** (non-Javadoc) - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#call(java.lang.String, org.eclipse.emf.common.util.EList, java.lang.String) - * - * @generated NOT - */ - public ISymbol call(String methodName, EList methodArguments, - String symbolName) - { - return Util.call(methodName, methodArguments, symbolName, getTypeDescriptor()); - } - - -// private List convertArgsToSignatures(List methodArgs) -// { -// List args = new ArrayList(); -// -// for (final Iterator it = methodArgs.iterator(); it.hasNext();) -// { -// Object arg = it.next(); -// String className = arg.getClass().getName(); -// String resolvedName = Signature.createTypeSignature(className, true); -// args.add(resolvedName); -// } -// -// return args; -// } - - /** - * @generated NOT - */ - public boolean supportsCoercion(String typeSignature) { - // first check that our type descriptor even thinks it is - // an instanceof this type - if (getTypeDescriptor().instanceOf(typeSignature)) - { - // for java bean instances, we need to minimally support - // Map, List and Array to conform to the basic spec - // for JSF EL - if (TypeConstants.TYPE_MAP.equals(Signature.getTypeErasure(typeSignature))) - { - return true; - } - else if (TypeConstants.TYPE_LIST.equals(Signature.getTypeErasure(typeSignature))) - { - return true; - } - } - - // otherwise, not supported - return false; - } - - /** - * @return the detail description - * @generated NOT - */ - private String createDetailedDescription() - { - StringBuffer additionalInfo = new StringBuffer("<p><b>"); //$NON-NLS-1$ - ITypeDescriptor typeDescriptor_ = getTypeDescriptor(); - if (typeDescriptor_ != null) { - additionalInfo.append(Messages.getString("IBeanPropertySymbolImpl.Type")); //$NON-NLS-1$ - additionalInfo.append("</b>"); //$NON-NLS-1$ - additionalInfo.append(Signature.toString(typeDescriptor_.getTypeSignature())); - } - additionalInfo.append("</p>"); //$NON-NLS-1$ - additionalInfo.append("<p><b>"); //$NON-NLS-1$ - - additionalInfo.append(Messages.getString("IBeanPropertySymbolImpl.Access")); //$NON-NLS-1$ - additionalInfo.append("</b>"); //$NON-NLS-1$ - if (isReadable() && isWritable()) { - additionalInfo.append(Messages.getString("IBeanPropertySymbolImpl.read_write")); //$NON-NLS-1$ - } else if (isReadable()) { - additionalInfo.append(Messages.getString("IBeanPropertySymbolImpl.readonly")); //$NON-NLS-1$ - } else if (isWritable()) { - additionalInfo.append(Messages.getString("IBeanPropertySymbolImpl.writeonly")); //$NON-NLS-1$ - } else { - additionalInfo.append(Messages.getString("IBeanPropertySymbolImpl.none")); //$NON-NLS-1$ - } - additionalInfo.append("</p>"); //$NON-NLS-1$ - JDTBeanProperty property = JavaUtil.findCorrespondingJDTProperty(this); - if (property != null) { - String javaDoc = null; - if (property.getGetter() != null) { - javaDoc = JavaUtil.getMethodJavadoc(property.getGetter()); - } - if (javaDoc == null && property.getSetter() != null) { - javaDoc = JavaUtil.getMethodJavadoc(property.getSetter()); - } - if (javaDoc != null) { - additionalInfo.append("<p>").append(javaDoc).append("</p>"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - return additionalInfo.toString(); - } - -} //IBeanPropertySymbolImpl - diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedJavaTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedJavaTypeDescriptorImpl.java deleted file mode 100644 index af1f404e6..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedJavaTypeDescriptorImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: IBoundedJavaTypeDescriptorImpl.java,v 1.8 2007/10/01 04:29:44 cbateman Exp $ - */ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IBounded Java Type Descriptor</b></em>'. - * <!-- end-user-doc --> - * <p> - * </p> - * - * @generated - */ -public class IBoundedJavaTypeDescriptorImpl extends IJavaTypeDescriptor2Impl implements IBoundedJavaTypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBoundedJavaTypeDescriptorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IBOUNDED_JAVA_TYPE_DESCRIPTOR; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public boolean isUnboundedForType(String typeSignature) { - // TODO: for now, return true if the type is a resolved object - // need to add support for template checking (Java5) and - // decide what to do with unresolved (Q) type signatures - return typeSignature != null - && typeSignature.startsWith(Character.toString(Signature.C_RESOLVED)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public ISymbol getUnboundedProperty(Object name, String typeSignature) { - ISymbol retValue = null; - - if (isUnboundedForType(typeSignature)) - { - IPropertySymbol propSymbol = SymbolFactory.eINSTANCE.createIPropertySymbol(); - // TODO: there is a possible problem here for non-string keyed maps - propSymbol.setName(name.toString()); - propSymbol.setReadable(true); - IBoundedJavaTypeDescriptor typeDesc = - SymbolFactory.eINSTANCE.createIBoundedJavaTypeDescriptor(); - - typeDesc.setTypeSignatureDelegate(TypeConstants.TYPE_JAVAOBJECT); - propSymbol.setTypeDescriptor(typeDesc); - retValue = propSymbol; - } - - return retValue; - } - - public ISymbol calculateSyntheticCall(String methodName, EList methodArgs, - String symbolName) - { - return getUnboundedProperty(symbolName, TypeConstants.TYPE_JAVAOBJECT); - } -} //IBoundedJavaTypeDescriptorImpl
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedListTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedListTypeDescriptorImpl.java deleted file mode 100644 index e6cb34b8a..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedListTypeDescriptorImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: IBoundedListTypeDescriptorImpl.java,v 1.6 2007/10/01 04:29:44 cbateman Exp $ - */ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.jdt.core.IMethod; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.common.util.JDTBeanIntrospector; -import org.eclipse.jst.jsf.common.util.TypeUtil; -import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IBounded List Type Descriptor</b></em>'. - * <!-- end-user-doc --> - * <p> - * </p> - * - * @generated - */ -public class IBoundedListTypeDescriptorImpl extends IListTypeDescriptorImpl implements IBoundedListTypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBoundedListTypeDescriptorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IBOUNDED_LIST_TYPE_DESCRIPTOR; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public boolean isUnboundedForType(String typeSignature) - { - // type signature must be a boxed integer - // TODO: at this level, do we need to deal with coercion to - // other integer types? list.get() takes an integer... - return typeSignature != null && TypeConstants.TYPE_BOXED_INTEGER.equals(typeSignature); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public ISymbol getUnboundedProperty(Object name, String typeSignature) { - ISymbol retValue = null; - - if (isUnboundedForType(typeSignature) - && name instanceof Number) - { - // get integer value - int offset = ((Number)name).intValue(); - - // first see if we have it in our map source - // TODO: retValue = getFromMap(name.toString()); - - if (retValue == null) - { - IPropertySymbol propSymbol = SymbolFactory.eINSTANCE.createIPropertySymbol(); - // TODO: there is a possible problem here for non-string keyed maps - propSymbol.setName(name.toString()); - propSymbol.setReadable(true); - propSymbol.setTypeDescriptor(getBoundsTypeDescriptor(offset)); - retValue = propSymbol; - } - } - - return retValue; - } - - /** - * <!-- begin-user-doc --> - * @param methodName - * @param methodArguments - * @param symbolName - * @return a symbol representing the return value of the method - * <!-- end-user-doc --> - * @generated NOT - */ - public ISymbol call(String methodName, EList methodArguments, String symbolName) - { - ISymbol result = null; - final IType type = resolveType(getTypeSignature()); - - if (type != null) - { - final JDTBeanIntrospector introspector = - new JDTBeanIntrospector(type); - - final IMethod callMethod = - matchMethod(methodName, methodArguments, introspector.getAllMethods()); - - if (callMethod != null) - { - try - { - // resolve the method's return type; don't erase parameters - final String retTypeSignature = - TypeUtil.resolveTypeSignature - (type, callMethod.getReturnType(), false) ; - - final IPropertySymbol propSymbol = - SymbolFactory.eINSTANCE.createIPropertySymbol(); - - // TODO: there is a possible problem here for non-string keyed maps - propSymbol.setName(symbolName); - propSymbol.setReadable(true); - IJavaTypeDescriptor2 typeDesc = - SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2(); - - typeDesc.setArrayCount(Signature.getArrayCount(retTypeSignature)); - - // may be null - typeDesc.setType(resolveType(retTypeSignature)); - typeDesc.setTypeSignatureDelegate(retTypeSignature); - propSymbol.setTypeDescriptor(typeDesc); - result = propSymbol; - } - catch (JavaModelException e) - { - JSFCommonPlugin.log(e); - // fall-through and return null result - } - } - } - - return result; - } - - private IMethod matchMethod(String name, List methodArguments, IMethod[] allMethods) - { - final List argSigs = convertArgsToSignatures(methodArguments); - IMethod matchedMethod = null; - - for (int i = 0; i < allMethods.length; i++) - { - final IMethod method = allMethods[i]; - - // check for names and argument count match - if (method.getParameterTypes().length == argSigs.size() - && method.getElementName().equals(name)) - { - String[] methods = method.getParameterTypes(); - // need to verify argument matches - boolean isMatched = true; - CHECK_ARGUMENTS: for (int j = 0; j < methods.length; j++) - { - if (!methods[j].equals(argSigs.get(j))) - { - // not a match - isMatched = false; - break CHECK_ARGUMENTS; - } - } - - if (isMatched) - { - return method; - } - } - } - - return matchedMethod; - } - - private List convertArgsToSignatures(List methodArgs) - { - List args = new ArrayList(); - - for (final Iterator it = methodArgs.iterator(); it.hasNext();) - { - Object arg = it.next(); - String className = arg.getClass().getName(); - String resolvedName = Signature.createTypeSignature(className, true); - args.add(resolvedName); - } - - return args; - } - - /** - * @return the ITypeDescriptor for this List's element type (bound type). - * Defaults to java.lang.Object if no bounds or can't resolve bounds - * - * @generated NOT - */ - private ITypeDescriptor getBoundsTypeDescriptor(int offset) - { - IJavaTypeDescriptor2 typeDesc = null; - - List typeParameters = getTypeParameterSignatures(); - - // if no bounds at all, then default to bounded java object - if (typeParameters.size() == 0) - { - typeDesc = - SymbolFactory.eINSTANCE.createIBoundedJavaTypeDescriptor(); - - typeDesc.setTypeSignatureDelegate(TypeConstants.TYPE_JAVAOBJECT); - } - else - { - // TODO: there should only be exactly one on a list... - final String elementType = (String) typeParameters.get(0); - - typeDesc = - SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2(); - - typeDesc.setArrayCount(Signature.getArrayCount(elementType)); - - // may be null - typeDesc.setType(resolveType(elementType)); - typeDesc.setTypeSignatureDelegate(elementType); - } - - return typeDesc; - } -} //IBoundedListTypeDescriptorImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedMapTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedMapTypeDescriptorImpl.java deleted file mode 100644 index 198999511..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedMapTypeDescriptorImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: IBoundedMapTypeDescriptorImpl.java,v 1.7 2007/10/01 04:29:44 cbateman Exp $ - */ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.Iterator; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.common.internal.types.ValueType; -import org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IBounded Map Type Descriptor</b></em>'. - * <!-- end-user-doc --> - * <p> - * </p> - * - * @generated - */ -public class IBoundedMapTypeDescriptorImpl extends IMapTypeDescriptorImpl implements IBoundedMapTypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBoundedMapTypeDescriptorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IBOUNDED_MAP_TYPE_DESCRIPTOR; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public boolean isUnboundedForType(String typeSignature) { - // TODO: for now, return true if the type is a resolved object - // need to add support for template checking (Java5) and - // decide what to do with unresolved (Q) type signatures - return typeSignature != null - && typeSignature.startsWith(Character.toString(Signature.C_RESOLVED)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public ISymbol getUnboundedProperty(Object name, String typeSignature) { - ISymbol retValue = null; - - if (isUnboundedForType(typeSignature)) - { - // first see if we have it in our map source - retValue = getFromMap(name.toString()); - - if (retValue == null) - { - IPropertySymbol propSymbol = SymbolFactory.eINSTANCE.createIPropertySymbol(); - // TODO: there is a possible problem here for non-string keyed maps - propSymbol.setName(name.toString()); - propSymbol.setReadable(true); - IBoundedJavaTypeDescriptor typeDesc = - SymbolFactory.eINSTANCE.createIBoundedJavaTypeDescriptor(); - - typeDesc.setTypeSignatureDelegate(TypeConstants.TYPE_JAVAOBJECT); - propSymbol.setTypeDescriptor(typeDesc); - retValue = propSymbol; - } - } - - return retValue; - - } - - /** - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#calculateSyntheticCall(java.lang.String, org.eclipse.emf.common.util.EList, java.lang.String) - * @generated NOT - */ - public ISymbol calculateSyntheticCall(String methodName, EList methodArgs, - String symbolName) { - if ("get".equals(methodName) //$NON-NLS-1$ - && methodArgs.size() == 1) - { - return getUnboundedProperty(symbolName, ((ValueType) methodArgs.get(0)).getSignature()); - } - - // default is return null - return null; - } - - - /** - * @generated NOT - */ - private ISymbol getFromMap(final String name) - { - for (final Iterator it = getProperties().iterator(); it.hasNext();) - { - ISymbol symbol = (ISymbol) it.next(); - - if (symbol.getName().equals(name)) - { - return symbol; - } - } - - return null; - } - -} //IBoundedMapTypeDescriptorImpl
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IComponentSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IComponentSymbolImpl.java deleted file mode 100644 index 15a592ef9..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IComponentSymbolImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.jst.jsf.context.symbol.IComponentSymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IComponent Symbol</b></em>'. - * <!-- end-user-doc --> - * <p> - * </p> - * - * @generated - */ -public class IComponentSymbolImpl extends IInstanceSymbolImpl implements IComponentSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * A human readable description of this symbol - */ - protected String _detailedDescription = null; - - /** - * true if this component symbol is readable - */ - protected boolean _isReadable = READABLE_EDEFAULT; - - /** - * true if this component symbol is writable - */ - protected boolean _isWritable = WRITABLE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IComponentSymbolImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static class - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.ICOMPONENT_SYMBOL; - } - - public String getDetailedDescription() { - return _detailedDescription; - } - - public void setDetailedDescription(String detailedDescription) { - _detailedDescription = detailedDescription; - } - - /** - * @generated NOT - */ - public ITypeDescriptor coerce(String typeSignature) { - // TODO: - return getTypeDescriptor(); - } - - /** - * @generated NOT - */ - public boolean supportsCoercion(String typeSignature) { - // TODO: - if (getTypeDescriptor().instanceOf(typeSignature)) - { - return true; - } - return false; - } -} //IComponentSymbolImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IInstanceSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IInstanceSymbolImpl.java deleted file mode 100644 index bc868c512..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IInstanceSymbolImpl.java +++ /dev/null @@ -1,499 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.context.symbol.ERuntimeSource; -import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IInstance Symbol</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl#getTypeDescriptor <em>Type Descriptor</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl#isReadable <em>Readable</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl#isWritable <em>Writable</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl#isTypeResolved <em>Type Resolved</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IInstanceSymbolImpl#getRuntimeSource <em>Runtime Source</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IInstanceSymbolImpl extends EObjectImpl implements IInstanceSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getTypeDescriptor() <em>Type Descriptor</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeDescriptor() - * @generated - * @ordered - */ - protected ITypeDescriptor typeDescriptor = null; - - /** - * The default value of the '{@link #isReadable() <em>Readable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isReadable() - * @generated NOT - * @ordered - */ - protected static final boolean READABLE_EDEFAULT = true; - - /** - * The cached value of the '{@link #isReadable() <em>Readable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isReadable() - * @generated - * @ordered - */ - protected boolean readable = READABLE_EDEFAULT; - - /** - * The default value of the '{@link #isWritable() <em>Writable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isWritable() - * @generated - * @ordered - */ - protected static final boolean WRITABLE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isWritable() <em>Writable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isWritable() - * @generated - * @ordered - */ - protected boolean writable = WRITABLE_EDEFAULT; - - /** - * The default value of the '{@link #isTypeResolved() <em>Type Resolved</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isTypeResolved() - * @generated - * @ordered - */ - protected static final boolean TYPE_RESOLVED_EDEFAULT = false; - - /** - * The default value of the '{@link #getRuntimeSource() <em>Runtime Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getRuntimeSource() - * @generated - * @ordered - */ - protected static final ERuntimeSource RUNTIME_SOURCE_EDEFAULT = ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL; - - /** - * The cached value of the '{@link #getRuntimeSource() <em>Runtime Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getRuntimeSource() - * @generated - * @ordered - */ - protected ERuntimeSource runtimeSource = RUNTIME_SOURCE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IInstanceSymbolImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static class - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IINSTANCE_SYMBOL; - } - - /** - * <!-- begin-user-doc --> - * @return the symbol name - * <!-- end-user-doc --> - * @generated - */ - public String getName() { - return name; - } - - /** - * <!-- begin-user-doc --> - * @param newName - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IINSTANCE_SYMBOL__NAME, oldName, name)); - } - - /** - * <!-- begin-user-doc --> - * @return the type descriptor for this instance - * <!-- end-user-doc --> - * @generated - */ - public ITypeDescriptor getTypeDescriptor() { - if (typeDescriptor != null && typeDescriptor.eIsProxy()) { - InternalEObject oldTypeDescriptor = (InternalEObject)typeDescriptor; - typeDescriptor = (ITypeDescriptor)eResolveProxy(oldTypeDescriptor); - if (typeDescriptor != oldTypeDescriptor) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, SymbolPackage.IINSTANCE_SYMBOL__TYPE_DESCRIPTOR, oldTypeDescriptor, typeDescriptor)); - } - } - return typeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * @return the instance type - * <!-- end-user-doc --> - * @generated - */ - public ITypeDescriptor basicGetTypeDescriptor() { - return typeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * @param newTypeDescriptor - * <!-- end-user-doc --> - * @generated - */ - public void setTypeDescriptor(ITypeDescriptor newTypeDescriptor) { - ITypeDescriptor oldTypeDescriptor = typeDescriptor; - typeDescriptor = newTypeDescriptor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IINSTANCE_SYMBOL__TYPE_DESCRIPTOR, oldTypeDescriptor, typeDescriptor)); - } - - /** - * <!-- begin-user-doc --> - * @return true if instance symbol is readable - * <!-- end-user-doc --> - * @generated - */ - public boolean isReadable() { - return readable; - } - - /** - * <!-- begin-user-doc --> - * @param newReadable - * <!-- end-user-doc --> - * @generated - */ - public void setReadable(boolean newReadable) { - boolean oldReadable = readable; - readable = newReadable; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IINSTANCE_SYMBOL__READABLE, oldReadable, readable)); - } - - /** - * <!-- begin-user-doc --> - * @return true if instance is writable. - * - * Normally, instances should not be - * considered writable, since the VariableResolver has no setter, however - * this is included to allow for unforeseen cases that may require an - * instance symbol to appear to be writable - * <!-- end-user-doc --> - * @generated - */ - public boolean isWritable() { - return writable; - } - - /** - * <!-- begin-user-doc --> - * @param newWritable - * <!-- end-user-doc --> - * @generated - */ - public void setWritable(boolean newWritable) { - boolean oldWritable = writable; - writable = newWritable; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IINSTANCE_SYMBOL__WRITABLE, oldWritable, writable)); - } - - /** - * <!-- begin-user-doc --> - * @return true if the type descriptor has been resolved for this symbol - * <!-- end-user-doc --> - * @generated NOT - */ - public boolean isTypeResolved() - { - return getTypeDescriptor() != null; - } - - /** - * <!-- begin-user-doc --> - * @return return the symbol's runtime source - * <!-- end-user-doc --> - * @generated - */ - public ERuntimeSource getRuntimeSource() { - return runtimeSource; - } - - /** - * <!-- begin-user-doc --> - * @param newRuntimeSource - * <!-- end-user-doc --> - * @generated - */ - public void setRuntimeSource(ERuntimeSource newRuntimeSource) { - ERuntimeSource oldRuntimeSource = runtimeSource; - runtimeSource = newRuntimeSource == null ? RUNTIME_SOURCE_EDEFAULT : newRuntimeSource; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IINSTANCE_SYMBOL__RUNTIME_SOURCE, oldRuntimeSource, runtimeSource)); - } - - /** - * @generated NOT - */ - public boolean supportsCoercion(String typeSignature) - { - // first check that our type descriptor even thinks it is - // an instanceof this type - if (getTypeDescriptor().instanceOf(typeSignature)) - { - // for java bean instances, we need to minimally support - // Map, List and Array to conform to the basic spec - // for JSF EL - if (TypeConstants.TYPE_MAP.equals(typeSignature)) - { - return true; - } - else if (TypeConstants.TYPE_LIST.equals(typeSignature) - /*TODO: || isArray*/) - { - return true; - } - } - - // otherwise, not supported - return false; - } - - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public ITypeDescriptor coerce(String typeSignature) { - // TODO: - return getTypeDescriptor(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public ISymbol call(String methodName, EList methodArguments, String symbolName) { - return Util.call(methodName,methodArguments,symbolName,getTypeDescriptor()); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the value for the featureID - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IINSTANCE_SYMBOL__NAME: - return getName(); - case SymbolPackage.IINSTANCE_SYMBOL__TYPE_DESCRIPTOR: - if (resolve) return getTypeDescriptor(); - return basicGetTypeDescriptor(); - case SymbolPackage.IINSTANCE_SYMBOL__READABLE: - return isReadable() ? Boolean.TRUE : Boolean.FALSE; - case SymbolPackage.IINSTANCE_SYMBOL__WRITABLE: - return isWritable() ? Boolean.TRUE : Boolean.FALSE; - case SymbolPackage.IINSTANCE_SYMBOL__TYPE_RESOLVED: - return isTypeResolved() ? Boolean.TRUE : Boolean.FALSE; - case SymbolPackage.IINSTANCE_SYMBOL__RUNTIME_SOURCE: - return getRuntimeSource(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IINSTANCE_SYMBOL__NAME: - setName((String)newValue); - return; - case SymbolPackage.IINSTANCE_SYMBOL__TYPE_DESCRIPTOR: - setTypeDescriptor((ITypeDescriptor)newValue); - return; - case SymbolPackage.IINSTANCE_SYMBOL__READABLE: - setReadable(((Boolean)newValue).booleanValue()); - return; - case SymbolPackage.IINSTANCE_SYMBOL__WRITABLE: - setWritable(((Boolean)newValue).booleanValue()); - return; - case SymbolPackage.IINSTANCE_SYMBOL__RUNTIME_SOURCE: - setRuntimeSource((ERuntimeSource)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IINSTANCE_SYMBOL__NAME: - setName(NAME_EDEFAULT); - return; - case SymbolPackage.IINSTANCE_SYMBOL__TYPE_DESCRIPTOR: - setTypeDescriptor((ITypeDescriptor)null); - return; - case SymbolPackage.IINSTANCE_SYMBOL__READABLE: - setReadable(READABLE_EDEFAULT); - return; - case SymbolPackage.IINSTANCE_SYMBOL__WRITABLE: - setWritable(WRITABLE_EDEFAULT); - return; - case SymbolPackage.IINSTANCE_SYMBOL__RUNTIME_SOURCE: - setRuntimeSource(RUNTIME_SOURCE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if the feature has been set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IINSTANCE_SYMBOL__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case SymbolPackage.IINSTANCE_SYMBOL__TYPE_DESCRIPTOR: - return typeDescriptor != null; - case SymbolPackage.IINSTANCE_SYMBOL__READABLE: - return readable != READABLE_EDEFAULT; - case SymbolPackage.IINSTANCE_SYMBOL__WRITABLE: - return writable != WRITABLE_EDEFAULT; - case SymbolPackage.IINSTANCE_SYMBOL__TYPE_RESOLVED: - return isTypeResolved() != TYPE_RESOLVED_EDEFAULT; - case SymbolPackage.IINSTANCE_SYMBOL__RUNTIME_SOURCE: - return runtimeSource != RUNTIME_SOURCE_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * @return the string representation - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", readable: "); //$NON-NLS-1$ - result.append(readable); - result.append(", writable: "); //$NON-NLS-1$ - result.append(writable); - result.append(", runtimeSource: "); //$NON-NLS-1$ - result.append(runtimeSource); - result.append(')'); - return result.toString(); - } - -} //IInstanceSymbolImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaSymbolImpl.java deleted file mode 100644 index 32d8de6b8..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaSymbolImpl.java +++ /dev/null @@ -1,241 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jst.jsf.context.symbol.IJavaSymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IJava Symbol</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaSymbolImpl#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaSymbolImpl#getJavaElement <em>Java Element</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IJavaSymbolImpl extends EObjectImpl implements IJavaSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getJavaElement() <em>Java Element</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJavaElement() - * @generated - * @ordered - */ - protected static final IJavaElement JAVA_ELEMENT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getJavaElement() <em>Java Element</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJavaElement() - * @generated - * @ordered - */ - protected IJavaElement javaElement = JAVA_ELEMENT_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IJavaSymbolImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static eclass - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IJAVA_SYMBOL; - } - - /** - * <!-- begin-user-doc --> - * @return the symbol name - * <!-- end-user-doc --> - * @generated - */ - public String getName() { - return name; - } - - /** - * <!-- begin-user-doc --> - * @param newName - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IJAVA_SYMBOL__NAME, oldName, name)); - } - - /** - * <!-- begin-user-doc --> - * @return the IJavaElement associated with this symbol - * <!-- end-user-doc --> - * @generated - */ - public IJavaElement getJavaElement() { - return javaElement; - } - - /** - * <!-- begin-user-doc --> - * @param newJavaElement - * <!-- end-user-doc --> - * @generated - */ - public void setJavaElement(IJavaElement newJavaElement) { - IJavaElement oldJavaElement = javaElement; - javaElement = newJavaElement; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IJAVA_SYMBOL__JAVA_ELEMENT, oldJavaElement, javaElement)); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the feature - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IJAVA_SYMBOL__NAME: - return getName(); - case SymbolPackage.IJAVA_SYMBOL__JAVA_ELEMENT: - return getJavaElement(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IJAVA_SYMBOL__NAME: - setName((String)newValue); - return; - case SymbolPackage.IJAVA_SYMBOL__JAVA_ELEMENT: - setJavaElement((IJavaElement)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IJAVA_SYMBOL__NAME: - setName(NAME_EDEFAULT); - return; - case SymbolPackage.IJAVA_SYMBOL__JAVA_ELEMENT: - setJavaElement(JAVA_ELEMENT_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if featureID's feature has been set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IJAVA_SYMBOL__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case SymbolPackage.IJAVA_SYMBOL__JAVA_ELEMENT: - return JAVA_ELEMENT_EDEFAULT == null ? javaElement != null : !JAVA_ELEMENT_EDEFAULT.equals(javaElement); - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * @return the default string representation - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", javaElement: "); //$NON-NLS-1$ - result.append(javaElement); - result.append(')'); - return result.toString(); - } - -} //IJavaSymbolImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.java deleted file mode 100644 index 573f2280c..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.java +++ /dev/null @@ -1,679 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jdt.core.Flags; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IMethod; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.common.internal.types.TypeInfoCache; -import org.eclipse.jst.jsf.common.util.JDTBeanIntrospector; -import org.eclipse.jst.jsf.common.util.JDTBeanProperty; -import org.eclipse.jst.jsf.common.util.TypeUtil; -import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IObjectSymbol; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IJava Type Descriptor2</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl#getType <em>Type</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl#getBeanProperties <em>Bean Properties</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl#getBeanMethods <em>Bean Methods</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl#getArrayCount <em>Array Count</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IJavaTypeDescriptor2Impl extends ITypeDescriptorImpl implements IJavaTypeDescriptor2 { - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getType() <em>Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getType() - * @generated - * @ordered - */ - protected static final IType TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getType() <em>Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getType() - * @generated - * @ordered - */ - protected IType type = TYPE_EDEFAULT; - - /** - * The default value of the '{@link #getArrayCount() <em>Array Count</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getArrayCount() - * @generated - * @ordered - */ - protected static final int ARRAY_COUNT_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getArrayCount() <em>Array Count</em>}' attribute. - * <!-- begin-user-doc --> - * records the array nesting of the type. IType doesn't encapsulate - * array types. So if this type is an array then type will represent - * the base element and this value will be > 0. If not an array, then - * _arrayCount is always 0. - * <!-- end-user-doc --> - * @see #getArrayCount() - * @generated - * @ordered - */ - protected int arrayCount = ARRAY_COUNT_EDEFAULT; - - /** - * The default value of the '{@link #getJdtContext() <em>Jdt Context</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJdtContext() - * @generated - * @ordered - */ - @SuppressWarnings("hiding") - protected static final IJavaElement JDT_CONTEXT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getJdtContext() <em>Jdt Context</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJdtContext() - * @generated - * @ordered - */ - @SuppressWarnings("hiding") - protected IJavaElement jdtContext = JDT_CONTEXT_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IJavaTypeDescriptor2Impl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static class - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2; - } - - /** - * <!-- begin-user-doc --> - * @return the JDT type descriptor; if type is an array then this type - * represent's the array base type only - * <!-- end-user-doc --> - * @generated - */ - public IType getType() { - return type; - } - - /** - * <!-- begin-user-doc --> - * @param newType - * <!-- end-user-doc --> - * @generated - */ - public void setType(IType newType) { - IType oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE, oldType, type)); - } - - /** - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getInterfaceTypeSignatures() - * @generated NOT - */ - public EList getInterfaceTypeSignatures() - { - EList interfaces = new BasicEList(); - - IType type_ = getType(); - - if (type_ != null) - { - final TypeInfoCache typeInfoCache = TypeInfoCache.getInstance(); - IType[] interfaceTypes = typeInfoCache.getCachedInterfaceTypes(type_); - if (interfaceTypes == null) { - interfaceTypes = typeInfoCache.cacheInterfaceTypesFor(type_); - } - copySignatures(interfaces, interfaceTypes); - } - - return interfaces; - } - - /** - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getSuperTypeSignatures() - * @generated NOT - */ - public EList getSuperTypeSignatures() - { - EList interfaces = new BasicEList(); - - IType type_ = getType(); - - if (type_ != null) - { - final TypeInfoCache typeInfoCache = TypeInfoCache.getInstance(); - IType[] interfaceTypes = typeInfoCache.getCachedSupertypes(type_); - - if (interfaceTypes == null) - { - interfaceTypes = typeInfoCache.cacheSupertypesFor(type_); - } - copySignatures(interfaces, interfaceTypes); - } - - return interfaces; - } - - - private void copySignatures(List list, IType[] types) - { - if (types != null) - { - for (int i = 0; i < types.length; i++) - { - final IType type_ = types[i]; - final String signature = TypeUtil.getSignature(type_); - - if (signature != null) - { - list.add(signature); - } - } - } - } - - public EList getProperties() - { - return getBeanProperties(); - } - - - public EList getMethods() - { - return getBeanMethods(); - } - - /** - * <!-- begin-user-doc --> - * @return the bean props for this java type - * <!-- end-user-doc --> - * @generated NOT - */ - public EList getBeanProperties() - { - TypeInfoCache typeInfoCache = TypeInfoCache.getInstance(); - IBeanPropertySymbol[] properties = typeInfoCache.getCachedPropertySymbols(type); - Collection propertyColl; - if (properties == null) { - propertyColl = getPropertiesInternal(); - properties = (IBeanPropertySymbol[]) propertyColl.toArray(new IBeanPropertySymbol[propertyColl.size()]); - typeInfoCache.cachePropertySymbols(type, properties); - } - else - { - propertyColl = new ArrayList(properties.length); - Collections.addAll(propertyColl, (Object[])properties); - } - BasicEList list = new BasicEList(propertyColl); - return list; - } - - /** - * <!-- begin-user-doc --> - * @return the bean methods for this type - * <!-- end-user-doc --> - * @generated NOT - */ - public EList getBeanMethods() { - TypeInfoCache typeInfoCache = TypeInfoCache.getInstance(); - IBeanMethodSymbol[] methods = typeInfoCache.getCachedMethodSymbols(type); - Collection methodColl; - if (methods == null) - { - methodColl = getMethodsInternal(); - methods = (IBeanMethodSymbol[]) methodColl.toArray(new IBeanMethodSymbol[methodColl.size()]); - typeInfoCache.cacheMethodSymbols(type, methods); - } else { - methodColl = new ArrayList(methods.length); - Collections.addAll(methodColl, (Object[])methods); - } - BasicEList list = new BasicEList(methodColl); - return list; - } - - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public int getArrayCount() { - return arrayCount; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setArrayCount(int newArrayCount) { - int oldArrayCount = arrayCount; - arrayCount = newArrayCount; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT, oldArrayCount, arrayCount)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public IJavaElement getJdtContext() { - return jdtContext; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setJdtContext(IJavaElement newJdtContext) { - IJavaElement oldJdtContext = jdtContext; - jdtContext = newJdtContext; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__JDT_CONTEXT, oldJdtContext, jdtContext)); - } - - /** - * <!-- begin-user-doc --> - * - * Tries to load an IType for a fully resolved (i.e. starts with L not Q) - * type signature using the current jdtContext. - * - * @return the resolved IType or null if none could be resolved. - * - * <!-- end-user-doc --> - * @generated NOT - */ - public IType resolveType(String resolvedTypeSignature) - { - IType resolvedType = null; - - // we need to obtain an IJavaProject within which to resolve - // the type. - IJavaProject project = null; - - // first, see if we have an IType - if (getType() != null) - { - // optimize: if the type sig is my type sig, then return getType() - if (resolvedTypeSignature.equals(getTypeSignature())) - { - resolvedType = getType(); - } - else - { - project = getType().getJavaProject(); - - if (project != null) - { - resolvedType = TypeUtil.resolveType(project, resolvedTypeSignature); - } - } - } - - // if not, see if a jdtContext hint has been set - if (resolvedType == null && getJdtContext() != null) - { - resolvedType = super.resolveType(resolvedTypeSignature); - } - - return resolvedType; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - return getType(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: - return getBeanProperties(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: - return getBeanMethods(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: - return Integer.valueOf(getArrayCount()); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - setType((IType)newValue); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: - getBeanProperties().clear(); - getBeanProperties().addAll((Collection)newValue); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: - getBeanMethods().clear(); - getBeanMethods().addAll((Collection)newValue); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: - setArrayCount(((Integer)newValue).intValue()); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - setType(TYPE_EDEFAULT); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: - getBeanProperties().clear(); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: - getBeanMethods().clear(); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: - setArrayCount(ARRAY_COUNT_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: - return !getBeanProperties().isEmpty(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: - return !getBeanMethods().isEmpty(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: - return arrayCount != ARRAY_COUNT_EDEFAULT; - } - return super.eIsSet(featureID); - } - - public boolean isArray() - { - return getArrayCount() > 0; - } - - /** - * @generated NOT - */ - public IObjectSymbol getArrayElement() - { - if (isArray()) - { - final String typeSignature = getTypeSignature(); - final int arrayCount_ = Signature.getArrayCount(typeSignature); - final String baseType = Signature.getElementType(typeSignature); - final String elementTypeSignature = Signature.createArraySignature(baseType, arrayCount_-1); - - final IJavaTypeDescriptor2 elementTypeDesc = - SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2(); - final String fullyQualifiedElementType = TypeUtil.getFullyQualifiedName(baseType); - - IType elementType = null; - - try - { - IType myType = getType(); - if (myType != null) - { - elementType = getType().getJavaProject() - .findType(fullyQualifiedElementType); - } - } - catch (JavaModelException e) - { - // suppress - } - - if (elementType != null) - { - elementTypeDesc.setType(elementType); - } - else - { - elementTypeDesc.setTypeSignatureDelegate(elementTypeSignature); - } - - elementTypeDesc.setArrayCount(Signature.getArrayCount(elementTypeSignature)); - - IPropertySymbol newPropertySymbol = - SymbolFactory.eINSTANCE.createIPropertySymbol(); - newPropertySymbol.setTypeDescriptor(elementTypeDesc); - newPropertySymbol.setWritable(true); - newPropertySymbol.setReadable(true); - newPropertySymbol.setName(fullyQualifiedElementType); - return newPropertySymbol; - } - - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getTypeSignature() - * @generated NOT - */ - public String getTypeSignature() - { - if (getType() == null) - { - if (eIsSet(SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE_SIGNATURE_DELEGATE)) - { - return getTypeSignatureDelegate(); - } - - return null; - } - - // make sure to array type nesting if using IType - return Signature.createArraySignature( - TypeUtil.getSignature(getType()), getArrayCount()); - } - - private Collection getPropertiesInternal() - { - // if I'm an array then I have no bean properties - if (isArray()) - { - return Collections.EMPTY_LIST; - } - - final JDTBeanIntrospector introspector = - new JDTBeanIntrospector(getType()); - - final Map<String, JDTBeanProperty> properties = introspector.getProperties(); - - final Collection calculatedProps = new ArrayList(properties.size()); - - for (final Iterator<Map.Entry<String, JDTBeanProperty>> it = properties.entrySet().iterator(); it.hasNext();) - { - Map.Entry<String, JDTBeanProperty> entry = it.next(); - final String propertyName = entry.getKey(); - final JDTBeanProperty property = entry.getValue(); - - final IBeanPropertySymbol workingCopy = - SymbolFactory.eINSTANCE.createIBeanPropertySymbol(); - workingCopy.setName(propertyName); - workingCopy.setOwner(this); - - final IJavaTypeDescriptor2 workingCopyDesc = - SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2(); - workingCopy.setTypeDescriptor(workingCopyDesc); - workingCopy.setReadable(property.isReadable()); - workingCopy.setWritable(property.isWritable()); - - workingCopyDesc.setArrayCount(property.getArrayCount()); - workingCopyDesc.getTypeParameterSignatures().addAll(property.getTypeParameterSignatures()); - workingCopyDesc.setEnumType(property.isEnumType()); - - final IType newType = property.getType(); - final String signature = property.getTypeSignature(); - - if (newType != null) - { - workingCopyDesc.setType(newType); - } - else - { - workingCopyDesc.setTypeSignatureDelegate(signature); - } - - calculatedProps.add(workingCopy); - } - - return calculatedProps; - } - - private Collection getMethodsInternal() - { - JDTBeanIntrospector introspector = - new JDTBeanIntrospector(getType()); - - IMethod[] methods = introspector.getAllMethods(); - - List methodSymbols = new ArrayList(); - - for (int i = 0; i < methods.length; i++) - { - IMethod method = methods[i]; - - try - { - // to be a bean method, it must not a constructor, must be public - // and must not be static - if (!method.isConstructor() - && Flags.isPublic(method.getFlags()) - && !Flags.isStatic(method.getFlags())) - { - String methodName = method.getElementName(); - IBeanMethodSymbol workingCopy = SymbolFactory.eINSTANCE.createIBeanMethodSymbol(); - workingCopy.setName(methodName); - workingCopy.setOwner(this); - workingCopy.setSignature(TypeUtil. - resolveMethodSignature - (getType(), - method.getSignature())); - methodSymbols.add(workingCopy); - } - } - catch (JavaModelException jme) - { - // error reading meta-data. Skip to next one - JSFCommonPlugin.log(jme); - } - } - - return methodSymbols; - } - - - /** - * <!-- begin-user-doc --> - * @return the default string rep - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (type: "); //$NON-NLS-1$ - result.append(type); - result.append(", arrayCount: "); //$NON-NLS-1$ - result.append(arrayCount); - result.append(')'); - return result.toString(); - } - -} //IJavaTypeDescriptor2Impl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IListTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IListTypeDescriptorImpl.java deleted file mode 100644 index 7046cee25..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IListTypeDescriptorImpl.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: IListTypeDescriptorImpl.java,v 1.5 2007/10/01 04:29:44 cbateman Exp $ - */ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.ECollections; -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IList Type Descriptor</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IListTypeDescriptorImpl#getListSource <em>List Source</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IListTypeDescriptorImpl extends ITypeDescriptorImpl implements IListTypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getListSource() <em>List Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getListSource() - * @generated - * @ordered - */ - protected static final EList LIST_SOURCE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getListSource() <em>List Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getListSource() - * @generated - * @ordered - */ - protected EList listSource = LIST_SOURCE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IListTypeDescriptorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.ILIST_TYPE_DESCRIPTOR; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getListSource() { - return listSource; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setListSource(EList newListSource) { - EList oldListSource = listSource; - listSource = newListSource; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE, oldListSource, listSource)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE: - return getListSource(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE: - setListSource((EList)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE: - setListSource(LIST_SOURCE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE: - return LIST_SOURCE_EDEFAULT == null ? listSource != null : !LIST_SOURCE_EDEFAULT.equals(listSource); - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (listSource: "); //$NON-NLS-1$ - result.append(listSource); - result.append(')'); - return result.toString(); - } - - /* - * @generated NOT - */ - public EList getInterfaceTypeSignatures() { - return ECollections.EMPTY_ELIST; - } - - public EList getMethods() - { - // TODO: should this return the methods on a List? - return ECollections.EMPTY_ELIST; - } - - public EList getProperties() - { - // TODO: a list has no properties as such. What to do here? - return ECollections.EMPTY_ELIST; - } - - /** - * @generated NOT - */ - public EList getSuperTypeSignatures() { - return ECollections.EMPTY_ELIST; - } - - /** - * @generated NOT - */ - public String getTypeSignature() - { - return TypeConstants.TYPE_LIST; - } - -} //IListTypeDescriptorImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapSourceInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapSourceInfo.java deleted file mode 100644 index a5de57969..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapSourceInfo.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -/** - * Information about the map source used by the IMapTypeDescriptor - * - */ -public interface IMapSourceInfo -{ - - /** - * @param key - * @return true if the map source has changed since key was last set - */ - boolean hasChanged(final Object key); - - /** - * The key is used in the standard HashMap way. - * - * @param key - * @return the cached value for the key. - */ - Object getCachedValue(final Object key); - /** - * Add cached value for key. - * - * @param key - * @param value - */ - void putCachedValue(final Object key, final Object value); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapTypeDescriptorImpl.java deleted file mode 100644 index eb9990290..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapTypeDescriptorImpl.java +++ /dev/null @@ -1,464 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.StringTokenizer; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.ECollections; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IObjectSymbol; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IMap Type Descriptor</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IMapTypeDescriptorImpl#getMapSource <em>Map Source</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IMapTypeDescriptorImpl#isImmutable <em>Immutable</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IMapTypeDescriptorImpl extends ITypeDescriptorImpl implements IMapTypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getMapSource() <em>Map Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getMapSource() - * @generated - * @ordered - */ - protected static final Map MAP_SOURCE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getMapSource() <em>Map Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getMapSource() - * @generated - * @ordered - */ - protected Map mapSource = MAP_SOURCE_EDEFAULT; - - /** - * The default value of the '{@link #isImmutable() <em>Immutable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isImmutable() - * @generated - * @ordered - */ - protected static final boolean IMMUTABLE_EDEFAULT = true; - - private static final Object MAP_TYPE_DESCRIPTOR_PROP_KEY = new Object(); - - /** - * The cached value of the '{@link #isImmutable() <em>Immutable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isImmutable() - * @generated - * @ordered - */ - protected boolean immutable = IMMUTABLE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IMapTypeDescriptorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static eClass - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IMAP_TYPE_DESCRIPTOR; - } - - /** - * <!-- begin-user-doc --> - * @return the map source - * <!-- end-user-doc --> - * @generated - */ - public Map getMapSource() { - return mapSource; - } - - /** - * <!-- begin-user-doc --> - * @param newMapSource - * <!-- end-user-doc --> - * @generated - */ - public void setMapSource(Map newMapSource) { - Map oldMapSource = mapSource; - mapSource = newMapSource; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IMAP_TYPE_DESCRIPTOR__MAP_SOURCE, oldMapSource, mapSource)); - } - - /** - * <!-- begin-user-doc --> - * @return true if this map is immutable as defined in the java.util.Map - * interface. - * <!-- end-user-doc --> - * @generated - */ - public boolean isImmutable() { - return immutable; - } - - /** - * <!-- begin-user-doc --> - * @param newImmutable - * <!-- end-user-doc --> - * @generated - */ - public void setImmutable(boolean newImmutable) { - boolean oldImmutable = immutable; - immutable = newImmutable; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IMAP_TYPE_DESCRIPTOR__IMMUTABLE, oldImmutable, immutable)); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getTypeSignature() - * @generated NOT - */ - public String getTypeSignature() - { - // if the delegate has been set, use it - if (eIsSet(SymbolPackage.IMAP_TYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE)) - { - return getTypeSignatureDelegate(); - } - - // otherwise use Map - return TypeConstants.TYPE_MAP; - } - - public EList getInterfaceTypeSignatures() { - return ECollections.EMPTY_ELIST; - } - - public EList getSuperTypeSignatures() { - return ECollections.EMPTY_ELIST; - } - - /** - * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getProperties() - */ - public EList getProperties() - { - final BasicEList list = new BasicEList(); - final Map source = getMapSource(); - if (source instanceof IMapSourceInfo) - { - if (!((IMapSourceInfo) source).hasChanged(MAP_TYPE_DESCRIPTOR_PROP_KEY)) - { - EList cachedList = (EList) ((IMapSourceInfo)source).getCachedValue(MAP_TYPE_DESCRIPTOR_PROP_KEY); - - if (cachedList != null) - { - return cachedList; - } - } - } - final Map segmentMap = processSegments(source); - list.addAll(segmentMap.values()); - - if (source instanceof IMapSourceInfo) - { - ((IMapSourceInfo)source).putCachedValue(MAP_TYPE_DESCRIPTOR_PROP_KEY, list); - } - return list; - } - - public EList getMethods() - { - // TODO: should this return the methods on a Map? - return ECollections.EMPTY_ELIST; - } - - /** - * @generated NOT - */ - public IObjectSymbol getArrayElement() - { - return null; - } - - /** - * @generated NOT - */ - public boolean isArray() - { - // a map is never an array - return false; - } - - private Map processSegments(final Map source) - { - final Map segmentMap = new HashMap(); - final Set<Map.Entry<String, Object>> entrySet = source.entrySet(); - for (final Map.Entry<String, Object> entry : entrySet) - { - - final String key = entry.getKey(); - final String segments[] = fastTokenSplit(key); - if (segments.length == 0) - { - continue; - } - IPropertySymbol property = (IPropertySymbol) segmentMap - .get(segments[0]); - - if (property == null) - { - final Object propValue = entry.getValue(); - property = SymbolFactory.eINSTANCE.createIPropertySymbol(); - property.setName(segments[0]); - ITypeDescriptor typeDesc = null; - - // TODO: need wrapper object to rationalize - if (propValue != null) - { - if (propValue instanceof IType) - { - typeDesc = SymbolFactory.eINSTANCE - .createIJavaTypeDescriptor2(); - ((IJavaTypeDescriptor2) typeDesc) - .setType((IType) propValue); - } else if (propValue instanceof IInstanceSymbol) - { - typeDesc = ((IInstanceSymbol) propValue) - .getTypeDescriptor(); - } else if (propValue instanceof IPropertySymbol) - { - typeDesc = ((IPropertySymbol) propValue) - .getTypeDescriptor(); - } else - { - final String className = propValue.getClass().getName(); - final String typeSignature = Signature - .createTypeSignature(className, true); - typeDesc = SymbolFactory.eINSTANCE - .createIMapTypeDescriptor(); - ((IMapTypeDescriptor) typeDesc) - .setMapSource(new HashMap()); - ((IMapTypeDescriptor) typeDesc) - .setTypeSignatureDelegate(typeSignature); - // inherit this descriptor's mutability - ((IMapTypeDescriptor) typeDesc) - .setImmutable(isImmutable()); - property.setIntermediate(true); // set the property as - // intermediate until we - // find out different - } - - property.setTypeDescriptor(typeDesc); - property.setReadable(true); - // is only writable if map is not immutable - property.setWritable(!isImmutable()); - } - - segmentMap.put(segments[0], property); - } - - final ITypeDescriptor typeDesc = property.getTypeDescriptor(); - - if (typeDesc instanceof IMapTypeDescriptor) - { - if (segments.length == 1) - { - // TODO: not always allowed - // ((IMapTypeDescriptor)typeDesc).getMapSource().put(null, - // source.get(key)); - // property is more than simply intermediate - property.setIntermediate(false); - } else - { - ((IMapTypeDescriptor) typeDesc).getMapSource().put( - key.substring(key.indexOf('.') + 1), - entry.getValue()); - } - } - } - - return segmentMap; - } - - /** - * Based on measurements, this beats Pattern.split by 15-30% even with - * a pre-compiled pattern. - * - * @param splitValue - * @return the array of strings split by the '.' token - */ - private static String[] fastTokenSplit(final String splitValue) - { - if (splitValue == null || splitValue.length() == 0) - { - return new String[0]; - } - if (splitValue.indexOf('.') > -1) - { - return tokenizerSplit(splitValue); - } - return new String[] {splitValue}; - } - - private static String[] tokenizerSplit(final String splitValue) - { - StringTokenizer stringTokenizer = new StringTokenizer(splitValue, "."); //$NON-NLS-1$ - // initialize to a large size, since we're just going to truncate - // it once at the end and want to reduce the chance of resize during - // the loop. - final List<String> splitValues = new ArrayList<String>(32); - - while (stringTokenizer.hasMoreTokens()) - { - splitValues.add(stringTokenizer.nextToken()); - } - - return splitValues.toArray(new String[0]); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the object for the feature id - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__MAP_SOURCE: - return getMapSource(); - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__IMMUTABLE: - return isImmutable() ? Boolean.TRUE : Boolean.FALSE; - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__MAP_SOURCE: - setMapSource((Map)newValue); - return; - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__IMMUTABLE: - setImmutable(((Boolean)newValue).booleanValue()); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__MAP_SOURCE: - setMapSource(MAP_SOURCE_EDEFAULT); - return; - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__IMMUTABLE: - setImmutable(IMMUTABLE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if is set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__MAP_SOURCE: - return MAP_SOURCE_EDEFAULT == null ? mapSource != null : !MAP_SOURCE_EDEFAULT.equals(mapSource); - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__IMMUTABLE: - return immutable != IMMUTABLE_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * @return the string representation - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (mapSource: "); //$NON-NLS-1$ - result.append(mapSource); - result.append(", immutable: "); //$NON-NLS-1$ - result.append(immutable); - result.append(')'); - return result.toString(); - } - -} //IMapTypeDescriptorImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMethodSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMethodSymbolImpl.java deleted file mode 100644 index 2e9a75ed6..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMethodSymbolImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.jsf.context.symbol.IMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IMethod Symbol</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IMethodSymbolImpl#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IMethodSymbolImpl#getSignature <em>Signature</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IMethodSymbolImpl extends EObjectImpl implements IMethodSymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getSignature() <em>Signature</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSignature() - * @generated - * @ordered - */ - protected static final String SIGNATURE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSignature() <em>Signature</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSignature() - * @generated - * @ordered - */ - protected String signature = SIGNATURE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IMethodSymbolImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static eclass - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IMETHOD_SYMBOL; - } - - /** - * <!-- begin-user-doc --> - * @return the method name - * <!-- end-user-doc --> - * @generated - */ - public String getName() { - return name; - } - - /** - * <!-- begin-user-doc --> - * @param newName - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IMETHOD_SYMBOL__NAME, oldName, name)); - } - - /** - * <!-- begin-user-doc --> - * @return the method signature in JVM/JDT form - * <!-- end-user-doc --> - * @generated - */ - public String getSignature() { - return signature; - } - - /** - * <!-- begin-user-doc --> - * @param newSignature - * <!-- end-user-doc --> - * @generated - */ - public void setSignature(String newSignature) { - String oldSignature = signature; - signature = newSignature; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IMETHOD_SYMBOL__SIGNATURE, oldSignature, signature)); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the property as a feature object - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IMETHOD_SYMBOL__NAME: - return getName(); - case SymbolPackage.IMETHOD_SYMBOL__SIGNATURE: - return getSignature(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IMETHOD_SYMBOL__NAME: - setName((String)newValue); - return; - case SymbolPackage.IMETHOD_SYMBOL__SIGNATURE: - setSignature((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IMETHOD_SYMBOL__NAME: - setName(NAME_EDEFAULT); - return; - case SymbolPackage.IMETHOD_SYMBOL__SIGNATURE: - setSignature(SIGNATURE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if the feature has been set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IMETHOD_SYMBOL__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case SymbolPackage.IMETHOD_SYMBOL__SIGNATURE: - return SIGNATURE_EDEFAULT == null ? signature != null : !SIGNATURE_EDEFAULT.equals(signature); - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * @return the raw string representation - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", signature: "); //$NON-NLS-1$ - result.append(signature); - result.append(')'); - return result.toString(); - } - -} //IMethodSymbolImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IPropertySymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IPropertySymbolImpl.java deleted file mode 100644 index 64d314e7e..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IPropertySymbolImpl.java +++ /dev/null @@ -1,469 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IProperty Symbol</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#getTypeDescriptor <em>Type Descriptor</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#isReadable <em>Readable</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#isWritable <em>Writable</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#isIntermediate <em>Intermediate</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class IPropertySymbolImpl extends EObjectImpl implements IPropertySymbol { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getTypeDescriptor() <em>Type Descriptor</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeDescriptor() - * @generated - * @ordered - */ - protected ITypeDescriptor typeDescriptor = null; - - - /** - * Set to true if this property symbol is readable - */ - protected boolean isReadable = READABLE_EDEFAULT; - - /** - * Set to true if this property symbol is writable - */ - protected boolean isWritable = WRITABLE_EDEFAULT; - - /** - * The default value of the '{@link #isReadable() <em>Readable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isReadable() - * @generated - * @ordered - */ - protected static final boolean READABLE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isReadable() <em>Readable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isReadable() - * @generated - * @ordered - */ - protected boolean readable = READABLE_EDEFAULT; - - /** - * The default value of the '{@link #isWritable() <em>Writable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isWritable() - * @generated - * @ordered - */ - protected static final boolean WRITABLE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isWritable() <em>Writable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isWritable() - * @generated - * @ordered - */ - protected boolean writable = WRITABLE_EDEFAULT; - - /** - * The default value of the '{@link #isIntermediate() <em>Intermediate</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isIntermediate() - * @generated - * @ordered - */ - protected static final boolean INTERMEDIATE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isIntermediate() <em>Intermediate</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isIntermediate() - * @generated - * @ordered - */ - protected boolean intermediate = INTERMEDIATE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IPropertySymbolImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static eClass - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.IPROPERTY_SYMBOL; - } - - /** - * <!-- begin-user-doc --> - * @return return the property name - * <!-- end-user-doc --> - * @generated - */ - public String getName() { - return name; - } - - /** - * <!-- begin-user-doc --> - * @param newName the new name of the property - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IPROPERTY_SYMBOL__NAME, oldName, name)); - } - - /** - * <!-- begin-user-doc --> - * @return the property's type descriptor ?? can be null ?? - * <!-- end-user-doc --> - * @generated - */ - public ITypeDescriptor getTypeDescriptor() { - if (typeDescriptor != null && typeDescriptor.eIsProxy()) { - InternalEObject oldTypeDescriptor = (InternalEObject)typeDescriptor; - typeDescriptor = (ITypeDescriptor)eResolveProxy(oldTypeDescriptor); - if (typeDescriptor != oldTypeDescriptor) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, SymbolPackage.IPROPERTY_SYMBOL__TYPE_DESCRIPTOR, oldTypeDescriptor, typeDescriptor)); - } - } - return typeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * @return the type descriptor - * <!-- end-user-doc --> - * @generated - */ - public ITypeDescriptor basicGetTypeDescriptor() { - return typeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * @param newTypeDescriptor - * <!-- end-user-doc --> - * @generated - */ - public void setTypeDescriptor(ITypeDescriptor newTypeDescriptor) { - ITypeDescriptor oldTypeDescriptor = typeDescriptor; - typeDescriptor = newTypeDescriptor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IPROPERTY_SYMBOL__TYPE_DESCRIPTOR, oldTypeDescriptor, typeDescriptor)); - } - - /** - * <!-- begin-user-doc --> - * @return true if property is readable - * <!-- end-user-doc --> - * @generated - */ - public boolean isReadable() { - return readable; - } - - /** - * <!-- begin-user-doc --> - * @param newReadable - * <!-- end-user-doc --> - * @generated - */ - public void setReadable(boolean newReadable) { - boolean oldReadable = readable; - readable = newReadable; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IPROPERTY_SYMBOL__READABLE, oldReadable, readable)); - } - - /** - * <!-- begin-user-doc --> - * @return true if property is writable - * <!-- end-user-doc --> - * @generated - */ - public boolean isWritable() { - return writable; - } - - /** - * <!-- begin-user-doc --> - * @param newWritable - * <!-- end-user-doc --> - * @generated - */ - public void setWritable(boolean newWritable) { - boolean oldWritable = writable; - writable = newWritable; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IPROPERTY_SYMBOL__WRITABLE, oldWritable, writable)); - } - - /** - * <!-- begin-user-doc --> - * @return true if this property is intermediate and has no value of it's own - * besides as a path to it's own properties. This is used to support the - * situation in JSF where a map-based property can have dots in it (i.e. - * a loadBundle key my.property) and so creates a (discouraged) ambiguous - * situation where a property like #{x.y.z) really corresponds to a key - * "y.z" in a property file pointed to by "x" instead of there being an - * actual y property on x that has value in and of itself (in this case - * "#{x.y}" is invalid even though "#{x.y.z}" is valid). - * <!-- end-user-doc --> - * @generated - */ - public boolean isIntermediate() { - return intermediate; - } - - /** - * <!-- begin-user-doc --> - * @param newIntermediate - * <!-- end-user-doc --> - * @generated - */ - public void setIntermediate(boolean newIntermediate) { - boolean oldIntermediate = intermediate; - intermediate = newIntermediate; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IPROPERTY_SYMBOL__INTERMEDIATE, oldIntermediate, intermediate)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public boolean supportsCoercion(String typeSignature) { - // TODO: for now, not supported on generic properties - return false; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public ITypeDescriptor coerce(String typeSignature) - { - // TODO: for now, no generic property type coercion - return getTypeDescriptor(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ISymbol call(String methodName, EList methodArguments, String symbolName) { - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the eObject for the featureID - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IPROPERTY_SYMBOL__NAME: - return getName(); - case SymbolPackage.IPROPERTY_SYMBOL__TYPE_DESCRIPTOR: - if (resolve) return getTypeDescriptor(); - return basicGetTypeDescriptor(); - case SymbolPackage.IPROPERTY_SYMBOL__READABLE: - return isReadable() ? Boolean.TRUE : Boolean.FALSE; - case SymbolPackage.IPROPERTY_SYMBOL__WRITABLE: - return isWritable() ? Boolean.TRUE : Boolean.FALSE; - case SymbolPackage.IPROPERTY_SYMBOL__INTERMEDIATE: - return isIntermediate() ? Boolean.TRUE : Boolean.FALSE; - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID -- set the feature - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IPROPERTY_SYMBOL__NAME: - setName((String)newValue); - return; - case SymbolPackage.IPROPERTY_SYMBOL__TYPE_DESCRIPTOR: - setTypeDescriptor((ITypeDescriptor)newValue); - return; - case SymbolPackage.IPROPERTY_SYMBOL__READABLE: - setReadable(((Boolean)newValue).booleanValue()); - return; - case SymbolPackage.IPROPERTY_SYMBOL__WRITABLE: - setWritable(((Boolean)newValue).booleanValue()); - return; - case SymbolPackage.IPROPERTY_SYMBOL__INTERMEDIATE: - setIntermediate(((Boolean)newValue).booleanValue()); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID -- unset the feature - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IPROPERTY_SYMBOL__NAME: - setName(NAME_EDEFAULT); - return; - case SymbolPackage.IPROPERTY_SYMBOL__TYPE_DESCRIPTOR: - setTypeDescriptor((ITypeDescriptor)null); - return; - case SymbolPackage.IPROPERTY_SYMBOL__READABLE: - setReadable(READABLE_EDEFAULT); - return; - case SymbolPackage.IPROPERTY_SYMBOL__WRITABLE: - setWritable(WRITABLE_EDEFAULT); - return; - case SymbolPackage.IPROPERTY_SYMBOL__INTERMEDIATE: - setIntermediate(INTERMEDIATE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if is set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IPROPERTY_SYMBOL__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case SymbolPackage.IPROPERTY_SYMBOL__TYPE_DESCRIPTOR: - return typeDescriptor != null; - case SymbolPackage.IPROPERTY_SYMBOL__READABLE: - return readable != READABLE_EDEFAULT; - case SymbolPackage.IPROPERTY_SYMBOL__WRITABLE: - return writable != WRITABLE_EDEFAULT; - case SymbolPackage.IPROPERTY_SYMBOL__INTERMEDIATE: - return intermediate != INTERMEDIATE_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * @return the string representation - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", readable: "); //$NON-NLS-1$ - result.append(readable); - result.append(", writable: "); //$NON-NLS-1$ - result.append(writable); - result.append(", intermediate: "); //$NON-NLS-1$ - result.append(intermediate); - result.append(')'); - return result.toString(); - } - -} //IPropertySymbolImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/ITypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/ITypeDescriptorImpl.java deleted file mode 100644 index b23a30329..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/ITypeDescriptorImpl.java +++ /dev/null @@ -1,521 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.Collection; -import java.util.Iterator; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EDataTypeEList; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.util.TypeUtil; -import org.eclipse.jst.jsf.context.symbol.IObjectSymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>IType Descriptor</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getProperties <em>Properties</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getTypeSignature <em>Type Signature</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getSuperTypeSignatures <em>Super Type Signatures</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getInterfaceTypeSignatures <em>Interface Type Signatures</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getTypeSignatureDelegate <em>Type Signature Delegate</em>}</li> - * <li>{@link org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#getMethods <em>Methods</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDescriptor { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getTypeSignature() <em>Type Signature</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeSignature() - * @generated - * @ordered - */ - protected static final String TYPE_SIGNATURE_EDEFAULT = ""; //$NON-NLS-1$ - - /** - * The default value of the '{@link #getTypeSignatureDelegate() <em>Type Signature Delegate</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeSignatureDelegate() - * @generated - * @ordered - */ - protected static final String TYPE_SIGNATURE_DELEGATE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getTypeSignatureDelegate() <em>Type Signature Delegate</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeSignatureDelegate() - * @generated - * @ordered - */ - protected String typeSignatureDelegate = TYPE_SIGNATURE_DELEGATE_EDEFAULT; - - /** - * The cached value of the '{@link #getTypeParameterSignatures() <em>Type Parameter Signatures</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeParameterSignatures() - * @generated - * @ordered - */ - protected EList typeParameterSignatures; - - /** - * The default value of the '{@link #getJdtContext() <em>Jdt Context</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJdtContext() - * @generated - * @ordered - */ - protected static final IJavaElement JDT_CONTEXT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getJdtContext() <em>Jdt Context</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJdtContext() - * @generated - * @ordered - */ - protected IJavaElement jdtContext = JDT_CONTEXT_EDEFAULT; - - /** - * The default value of the '{@link #isEnumType() <em>Enum Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isEnumType() - * @generated - * @ordered - */ - protected static final boolean ENUM_TYPE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isEnumType() <em>Enum Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isEnumType() - * @generated - * @ordered - */ - protected boolean enumType = ENUM_TYPE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected ITypeDescriptorImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @return the static class - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return SymbolPackage.Literals.ITYPE_DESCRIPTOR; - } - - /** - * <!-- begin-user-doc --> - * @return get properties for this type - * <!-- end-user-doc --> - * @generated NOT - */ - public abstract EList getProperties(); - - /** - * <!-- begin-user-doc --> - * @return the type signature in JVM/JDT signature form - * <!-- end-user-doc --> - * @generated NOT - */ - public abstract String getTypeSignature(); - - /** - * <!-- begin-user-doc --> - * @return the list of super types - * <!-- end-user-doc --> - * @generated NOT - */ - public abstract EList getSuperTypeSignatures(); - - /** - * <!-- begin-user-doc --> - * @return the list of implemented interfaces - * <!-- end-user-doc --> - * @generated NOT - */ - public abstract EList getInterfaceTypeSignatures(); - - /** - * <!-- begin-user-doc --> - * @return the type signature delegate. The descriptor may choose to use - * this delegate it if it is set and it cannot derive this information - * from other properties - * <!-- end-user-doc --> - * @generated - */ - public String getTypeSignatureDelegate() { - return typeSignatureDelegate; - } - - /** - * <!-- begin-user-doc --> - * @param newTypeSignatureDelegate - * <!-- end-user-doc --> - * @generated - */ - public void setTypeSignatureDelegate(String newTypeSignatureDelegate) { - String oldTypeSignatureDelegate = typeSignatureDelegate; - typeSignatureDelegate = newTypeSignatureDelegate; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE, oldTypeSignatureDelegate, typeSignatureDelegate)); - } - - /** - * <!-- begin-user-doc --> - * @return the methods for this type or empty list if none exist - * <!-- end-user-doc --> - * @generated NOT - */ - public abstract EList getMethods(); - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList getTypeParameterSignatures() { - if (typeParameterSignatures == null) { - typeParameterSignatures = new EDataTypeEList(String.class, this, SymbolPackage.ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES); - } - return typeParameterSignatures; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public IJavaElement getJdtContext() { - return jdtContext; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setJdtContext(IJavaElement newJdtContext) { - IJavaElement oldJdtContext = jdtContext; - jdtContext = newJdtContext; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.ITYPE_DESCRIPTOR__JDT_CONTEXT, oldJdtContext, jdtContext)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isEnumType() { - return enumType; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setEnumType(boolean newEnumType) { - boolean oldEnumType = enumType; - enumType = newEnumType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.ITYPE_DESCRIPTOR__ENUM_TYPE, oldEnumType, enumType)); - } - - /** - * <!-- begin-user-doc --> - * Note about generics: - * - * This call mimics the runtime instanceOf to the degree possible. - * Therefore, any type parameters (<...>) in typeSignature will be - * deleted using Signature.getTypeErasure() since this data won't be - * available at runtime. - * <!-- end-user-doc --> - * @generated NOT - */ - public boolean instanceOf(final String typeSignature) - { - final String typeErasedSignature = Signature.getTypeErasure(typeSignature); - - if (Signature.getTypeErasure(getTypeSignature()) != null - && Signature.getTypeErasure(getTypeSignature()).equals(typeErasedSignature)) - { - return true; - } - - for (final Iterator it = getSuperTypeSignatures().iterator(); it.hasNext();) - { - final String superType = (String) it.next(); - - if (Signature.getTypeErasure(superType).equals(typeErasedSignature)) - { - return true; - } - } - - for (final Iterator it = getInterfaceTypeSignatures().iterator(); it.hasNext();) - { - final String superType = (String) it.next(); - - if (Signature.getTypeErasure(superType).equals(typeErasedSignature)) - { - return true; - } - } - - return false; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public boolean isArray() - { - return Signature.getArrayCount(getTypeSignature()) > 0; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public IObjectSymbol getArrayElement() - { - if (isArray()) - { - // sub-class of ITypeDescriptor must implement this if they which to provide - // array element support - throw new UnsupportedOperationException("Base type descriptor does not support this function"); //$NON-NLS-1$ - } - - // shouldn't be called if not an array - return null; - } - - /** - /** - * <!-- begin-user-doc --> - * - * Tries to load an IType for a fully resolved (i.e. starts with L not Q) - * type signature using the current jdtContext. - * - * @return the resolved IType or null if none could be resolved. - * - * <!-- end-user-doc --> - * @generated NOT - */ - public IType resolveType(String resolvedTypeSignature) - { - // we need to obtain an IJavaProject within which to resolve - // the type. - IJavaProject project = null; - - // see if a jdtContext hint has been set - if (getJdtContext() != null) - { - project = getJdtContext().getJavaProject(); - } - - if (project != null) - { - return TypeUtil.resolveType(project, resolvedTypeSignature); - } - - return null; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public ISymbol calculateSyntheticCall(String methodName, EList methodArgs, String symbolName) { - // sub-classes need only implement if they have something meaningful - // the want to do here - // by default return null to indicate this type descriptor doesn't - // wish to handle calls - return null; - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return get the feature - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.ITYPE_DESCRIPTOR__PROPERTIES: - return getProperties(); - case SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE: - return getTypeSignature(); - case SymbolPackage.ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES: - return getSuperTypeSignatures(); - case SymbolPackage.ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES: - return getInterfaceTypeSignatures(); - case SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE: - return getTypeSignatureDelegate(); - case SymbolPackage.ITYPE_DESCRIPTOR__METHODS: - return getMethods(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.ITYPE_DESCRIPTOR__PROPERTIES: - getProperties().clear(); - getProperties().addAll((Collection)newValue); - return; - case SymbolPackage.ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES: - getSuperTypeSignatures().clear(); - getSuperTypeSignatures().addAll((Collection)newValue); - return; - case SymbolPackage.ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES: - getInterfaceTypeSignatures().clear(); - getInterfaceTypeSignatures().addAll((Collection)newValue); - return; - case SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE: - setTypeSignatureDelegate((String)newValue); - return; - case SymbolPackage.ITYPE_DESCRIPTOR__METHODS: - getMethods().clear(); - getMethods().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.ITYPE_DESCRIPTOR__PROPERTIES: - getProperties().clear(); - return; - case SymbolPackage.ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES: - getSuperTypeSignatures().clear(); - return; - case SymbolPackage.ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES: - getInterfaceTypeSignatures().clear(); - return; - case SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE: - setTypeSignatureDelegate(TYPE_SIGNATURE_DELEGATE_EDEFAULT); - return; - case SymbolPackage.ITYPE_DESCRIPTOR__METHODS: - getMethods().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if feature has been set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.ITYPE_DESCRIPTOR__PROPERTIES: - return !getProperties().isEmpty(); - case SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE: - return TYPE_SIGNATURE_EDEFAULT == null ? getTypeSignature() != null : !TYPE_SIGNATURE_EDEFAULT.equals(getTypeSignature()); - case SymbolPackage.ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES: - return !getSuperTypeSignatures().isEmpty(); - case SymbolPackage.ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES: - return !getInterfaceTypeSignatures().isEmpty(); - case SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE: - return TYPE_SIGNATURE_DELEGATE_EDEFAULT == null ? typeSignatureDelegate != null : !TYPE_SIGNATURE_DELEGATE_EDEFAULT.equals(typeSignatureDelegate); - case SymbolPackage.ITYPE_DESCRIPTOR__METHODS: - return !getMethods().isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * @return the debug string format of the type signature - * <!-- end-user-doc --> - * @generated - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (typeSignatureDelegate: "); //$NON-NLS-1$ - result.append(typeSignatureDelegate); - result.append(')'); - return result.toString(); - } -} //ITypeDescriptorImpl - diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/JavaUtil.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/JavaUtil.java deleted file mode 100644 index d6353752c..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/JavaUtil.java +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2007 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.io.IOException; -import java.io.Reader; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.jdt.core.IMethod; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.ui.JavadocContentAccess; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.common.util.JDTBeanIntrospector; -import org.eclipse.jst.jsf.common.util.JDTBeanProperty; -import org.eclipse.jst.jsf.common.util.TypeUtil; -import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; - -/** - * Utility class for accessing jdt elements for jsf el symbols - */ -public class JavaUtil { - - private JavaUtil() { - // utility class - } - - /** - * @param method - * @return the javadoc text for the given method. Will return null if no javadoc is found - */ - public static String getMethodJavadoc(final IMethod method) { - try { - final Reader contentReader = JavadocContentAccess.getHTMLContentReader(method, true, true); - if (contentReader != null) { - return read(contentReader); - } - } catch (final JavaModelException e) { - JSFCommonPlugin.log(IStatus.WARNING, "error reading javadoc for method '" + method.getElementName() + "'.", e); //$NON-NLS-1$ //$NON-NLS-2$ - } - return null; - } - - private static String read(final Reader rd) { - final StringBuffer buffer= new StringBuffer(); - final char[] readBuffer= new char[2048]; - - try { - int n= rd.read(readBuffer); - while (n > 0) { - buffer.append(readBuffer, 0, n); - n= rd.read(readBuffer); - } - return buffer.toString(); - } catch (final IOException x) { - // should not happen, but otherwise simply ignore - } - - return null; - } - - /** - * @param symbol - the method symbol to look for - * @return the IMethod for the given method symbol. Will return <code>null</code>, if none is found. - */ - public static IMethod findCorrespondingMethod(final IBeanMethodSymbol symbol) { - final IType type = symbol.getOwner().getType(); - final JDTBeanIntrospector introspector = new JDTBeanIntrospector(type); - final IMethod[] methods = introspector.getAllMethods(); - for (final IMethod method : methods) { - if (method.getElementName().equals(symbol.getName())) { - try { - final String currentMethodsSignature = TypeUtil.resolveMethodSignature(method.getDeclaringType(), - method.getSignature()); - if (currentMethodsSignature.equals(symbol.getSignature())) { - return method; - } - } catch (final JavaModelException e) { - JSFCommonPlugin.log(IStatus.WARNING, "error determining for method '" //$NON-NLS-1$ - + method.getElementName() + "'.", e); //$NON-NLS-1$ - } - } - } - return null; - } - - /** - * @param propertySymbol - the property symbol to look for - * @return a JDTBeanProperty for the given property symbol - */ - public static JDTBeanProperty findCorrespondingJDTProperty(final IBeanPropertySymbol propertySymbol) { - final JDTBeanIntrospector introspector = new JDTBeanIntrospector(propertySymbol.getOwner().getType()); - return introspector.getProperties().get(propertySymbol.getName()); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Messages.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Messages.java deleted file mode 100644 index f731e4b5b..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Messages.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/*package*/ class Messages -{ - private static final String BUNDLE_NAME = "org.eclipse.jst.jsf.context.symbol.internal.impl.messages"; //$NON-NLS-1$ - - private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle - .getBundle(BUNDLE_NAME); - - private Messages() - { - // no external instantiation - } - - public static String getString(String key) - { - try - { - return RESOURCE_BUNDLE.getString(key); - } - catch (MissingResourceException e) - { - return '!' + key + '!'; - } - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolFactoryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolFactoryImpl.java deleted file mode 100644 index 75c59b868..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolFactoryImpl.java +++ /dev/null @@ -1,426 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IType; -import org.eclipse.jst.jsf.common.internal.types.ValueType; -import org.eclipse.jst.jsf.context.symbol.ERuntimeSource; -import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IComponentSymbol; -import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Factory</b>. - * <!-- end-user-doc --> - * @generated - */ -public class SymbolFactoryImpl extends EFactoryImpl implements SymbolFactory { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> - * @return the SymbolFactory - * <!-- end-user-doc --> - * @generated - */ - public static SymbolFactory init() { - try { - SymbolFactory theSymbolFactory = (SymbolFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/eclipse/jst/jsf/context/symbol.ecore"); //$NON-NLS-1$ - if (theSymbolFactory != null) { - return theSymbolFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new SymbolFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public SymbolFactoryImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * @param eClass - * @return the model instace for the model class - * <!-- end-user-doc --> - * @generated - */ - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case SymbolPackage.IBEAN_INSTANCE_SYMBOL: return createIBeanInstanceSymbol(); - case SymbolPackage.IBEAN_PROPERTY_SYMBOL: return createIBeanPropertySymbol(); - case SymbolPackage.IINSTANCE_SYMBOL: return createIInstanceSymbol(); - case SymbolPackage.IJAVA_SYMBOL: return createIJavaSymbol(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2: return createIJavaTypeDescriptor2(); - case SymbolPackage.IBEAN_METHOD_SYMBOL: return createIBeanMethodSymbol(); - case SymbolPackage.ICOMPONENT_SYMBOL: return createIComponentSymbol(); - case SymbolPackage.IPROPERTY_SYMBOL: return createIPropertySymbol(); - case SymbolPackage.IMAP_TYPE_DESCRIPTOR: return createIMapTypeDescriptor(); - case SymbolPackage.IMETHOD_SYMBOL: return createIMethodSymbol(); - case SymbolPackage.IBOUNDED_MAP_TYPE_DESCRIPTOR: return createIBoundedMapTypeDescriptor(); - case SymbolPackage.IBOUNDED_JAVA_TYPE_DESCRIPTOR: return createIBoundedJavaTypeDescriptor(); - case SymbolPackage.ILIST_TYPE_DESCRIPTOR: return createIListTypeDescriptor(); - case SymbolPackage.IBOUNDED_LIST_TYPE_DESCRIPTOR: return createIBoundedListTypeDescriptor(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param initialValue - * @return an object constructed from the initialValue string - * <!-- end-user-doc --> - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case SymbolPackage.ERUNTIME_SOURCE: - return createERuntimeSourceFromString(eDataType, initialValue); - case SymbolPackage.ITYPE: - return createITypeFromString(eDataType, initialValue); - case SymbolPackage.IJAVA_ELEMENT: - return createIJavaElementFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param instanceValue - * @return the string equivelent of eDataType for the instance - * <!-- end-user-doc --> - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case SymbolPackage.ERUNTIME_SOURCE: - return convertERuntimeSourceToString(eDataType, instanceValue); - case SymbolPackage.ITYPE: - return convertITypeToString(eDataType, instanceValue); - case SymbolPackage.IJAVA_ELEMENT: - return convertIJavaElementToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * <!-- begin-user-doc --> - * @return a new bean instance symbol - * <!-- end-user-doc --> - * @generated - */ - public IBeanInstanceSymbol createIBeanInstanceSymbol() { - IBeanInstanceSymbolImpl iBeanInstanceSymbol = new IBeanInstanceSymbolImpl(); - return iBeanInstanceSymbol; - } - - /** - * <!-- begin-user-doc --> - * @return a new bean property symbol - * <!-- end-user-doc --> - * @generated - */ - public IBeanPropertySymbol createIBeanPropertySymbol() { - IBeanPropertySymbolImpl iBeanPropertySymbol = new IBeanPropertySymbolImpl(); - return iBeanPropertySymbol; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public IInstanceSymbol createIInstanceSymbol() { - IInstanceSymbolImpl iInstanceSymbol = new IInstanceSymbolImpl(); - return iInstanceSymbol; - } - - /** - * <!-- begin-user-doc --> - * @return a new java symbol - * <!-- end-user-doc --> - * @generated - */ - public IJavaSymbol createIJavaSymbol() { - IJavaSymbolImpl iJavaSymbol = new IJavaSymbolImpl(); - return iJavaSymbol; - } - - /** - * <!-- begin-user-doc --> - * @return a new java type descriptor - * <!-- end-user-doc --> - * @generated - */ - public IJavaTypeDescriptor2 createIJavaTypeDescriptor2() { - IJavaTypeDescriptor2Impl iJavaTypeDescriptor2 = new IJavaTypeDescriptor2Impl(); - return iJavaTypeDescriptor2; - } - - /** - * <!-- begin-user-doc --> - * @return a new bean method symbol - * <!-- end-user-doc --> - * @generated - */ - public IBeanMethodSymbol createIBeanMethodSymbol() { - IBeanMethodSymbolImpl iBeanMethodSymbol = new IBeanMethodSymbolImpl(); - return iBeanMethodSymbol; - } - - /** - * <!-- begin-user-doc --> - * @return a new component derived symbol - * <!-- end-user-doc --> - * @generated - */ - public IComponentSymbol createIComponentSymbol() { - IComponentSymbolImpl iComponentSymbol = new IComponentSymbolImpl(); - return iComponentSymbol; - } - - /** - * <!-- begin-user-doc --> - * @return a new property symbol - * <!-- end-user-doc --> - * @generated - */ - public IPropertySymbol createIPropertySymbol() { - IPropertySymbolImpl iPropertySymbol = new IPropertySymbolImpl(); - return iPropertySymbol; - } - - /** - * <!-- begin-user-doc --> - * @return create map type descriptor - * <!-- end-user-doc --> - * @generated - */ - public IMapTypeDescriptor createIMapTypeDescriptor() { - IMapTypeDescriptorImpl iMapTypeDescriptor = new IMapTypeDescriptorImpl(); - return iMapTypeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * @return the method symbol - * <!-- end-user-doc --> - * @generated - */ - public IMethodSymbol createIMethodSymbol() { - IMethodSymbolImpl iMethodSymbol = new IMethodSymbolImpl(); - return iMethodSymbol; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public IBoundedMapTypeDescriptor createIBoundedMapTypeDescriptor() { - IBoundedMapTypeDescriptorImpl iBoundedMapTypeDescriptor = new IBoundedMapTypeDescriptorImpl(); - return iBoundedMapTypeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public IBoundedJavaTypeDescriptor createIBoundedJavaTypeDescriptor() { - IBoundedJavaTypeDescriptorImpl iBoundedJavaTypeDescriptor = new IBoundedJavaTypeDescriptorImpl(); - return iBoundedJavaTypeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public IListTypeDescriptor createIListTypeDescriptor() { - IListTypeDescriptorImpl iListTypeDescriptor = new IListTypeDescriptorImpl(); - return iListTypeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public IBoundedListTypeDescriptor createIBoundedListTypeDescriptor() { - IBoundedListTypeDescriptorImpl iBoundedListTypeDescriptor = new IBoundedListTypeDescriptorImpl(); - return iBoundedListTypeDescriptor; - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param initialValue - * @return - * <!-- end-user-doc --> - * @generated - */ - public ERuntimeSource createERuntimeSourceFromString(EDataType eDataType, String initialValue) { - ERuntimeSource result = ERuntimeSource.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - return result; - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param instanceValue - * @return the converted runtime source - * <!-- end-user-doc --> - * @generated - */ - public String convertERuntimeSourceToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param initialValue - * @return - * <!-- end-user-doc --> - * @generated - */ - public IType createITypeFromString(EDataType eDataType, String initialValue) { - return (IType)super.createFromString(eDataType, initialValue); - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param instanceValue - * @return the converted string - * <!-- end-user-doc --> - * @generated - */ - public String convertITypeToString(EDataType eDataType, Object instanceValue) { - return super.convertToString(eDataType, instanceValue); - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param initialValue - * @return return the java element - * <!-- end-user-doc --> - * @generated - */ - public IJavaElement createIJavaElementFromString(EDataType eDataType, String initialValue) { - return (IJavaElement)super.createFromString(eDataType, initialValue); - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param instanceValue - * @return the converted string - * <!-- end-user-doc --> - * @generated - */ - public String convertIJavaElementToString(EDataType eDataType, Object instanceValue) { - return super.convertToString(eDataType, instanceValue); - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param initialValue - * @return the value type for the data type - * <!-- end-user-doc --> - * @generated - */ - public ValueType createValueTypeFromString(EDataType eDataType, String initialValue) { - return (ValueType)super.createFromString(eDataType, initialValue); - } - - /** - * <!-- begin-user-doc --> - * @param eDataType - * @param instanceValue - * @return the string for the value type - * <!-- end-user-doc --> - * @generated - */ - public String convertValueTypeToString(EDataType eDataType, Object instanceValue) { - return super.convertToString(eDataType, instanceValue); - } - - /** - * <!-- begin-user-doc --> - * @return the symbol package - * <!-- end-user-doc --> - * @generated - */ - public SymbolPackage getSymbolPackage() { - return (SymbolPackage)getEPackage(); - } - - /** - * <!-- begin-user-doc --> - * @return get the symbol package - * <!-- end-user-doc --> - * @deprecated - * @generated - */ - public static SymbolPackage getPackage() { - return SymbolPackage.eINSTANCE; - } - -} //SymbolFactoryImpl - diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolPackageImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolPackageImpl.java deleted file mode 100644 index bcb6cca44..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolPackageImpl.java +++ /dev/null @@ -1,1032 +0,0 @@ -/** - * Copyright 2006 Oracle - * - * $Id: SymbolPackageImpl.java,v 1.8 2008/11/18 22:24:43 gkessler Exp $ - */ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IType; - -import org.eclipse.jst.jsf.common.internal.types.ValueType; - -import org.eclipse.jst.jsf.context.symbol.ERuntimeSource; -import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IComponentSymbol; -import org.eclipse.jst.jsf.context.symbol.IDescribedInDetail; -import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IObjectSymbol; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Package</b>. - * <!-- end-user-doc --> - * @generated - */ -public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iBeanInstanceSymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iBeanPropertySymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iInstanceSymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iJavaSymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iSymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iTypeDescriptorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iDescribedInDetailEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iJavaTypeDescriptor2EClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iBeanMethodSymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iComponentSymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iPropertySymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iMapTypeDescriptorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iMethodSymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iObjectSymbolEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iBoundedTypeDescriptorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iBoundedMapTypeDescriptorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iBoundedJavaTypeDescriptorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iListTypeDescriptorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass iBoundedListTypeDescriptorEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EEnum eRuntimeSourceEEnum = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EDataType iTypeEDataType = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EDataType iJavaElementEDataType = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EDataType valueTypeEDataType = null; - - /** - * Creates an instance of the model <b>Package</b>, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - * <p>Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#eNS_URI - * @see #init() - * @generated - */ - private SymbolPackageImpl() { - super(eNS_URI, SymbolFactory.eINSTANCE); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the <b>Package</b> for this - * model, and for any others upon which it depends. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - * <p>Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - * <p>Invocation of this method will not affect any packages that have - * already been initialized. - * <!-- begin-user-doc --> - * @return the symbols package - * <!-- end-user-doc --> - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static SymbolPackage init() { - if (isInited) return (SymbolPackage)EPackage.Registry.INSTANCE.getEPackage(SymbolPackage.eNS_URI); - - // Obtain or create and register package - SymbolPackageImpl theSymbolPackage = (SymbolPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof SymbolPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new SymbolPackageImpl()); - - isInited = true; - - // Create package meta-data objects - theSymbolPackage.createPackageContents(); - - // Initialize created meta-data - theSymbolPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theSymbolPackage.freeze(); - - return theSymbolPackage; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIBeanInstanceSymbol() { - return iBeanInstanceSymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIBeanInstanceSymbol_Properties() { - return (EReference)iBeanInstanceSymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIBeanInstanceSymbol_Methods() { - return (EReference)iBeanInstanceSymbolEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIBeanPropertySymbol() { - return iBeanPropertySymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIBeanPropertySymbol_Owner() { - return (EReference)iBeanPropertySymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIInstanceSymbol() { - return iInstanceSymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIInstanceSymbol_TypeResolved() { - return (EAttribute)iInstanceSymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIInstanceSymbol_RuntimeSource() { - return (EAttribute)iInstanceSymbolEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIJavaSymbol() { - return iJavaSymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIJavaSymbol_JavaElement() { - return (EAttribute)iJavaSymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getISymbol() { - return iSymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getISymbol_Name() { - return (EAttribute)iSymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getITypeDescriptor() { - return iTypeDescriptorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getITypeDescriptor_Properties() { - return (EReference)iTypeDescriptorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getITypeDescriptor_TypeSignature() { - return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getITypeDescriptor_SuperTypeSignatures() { - return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getITypeDescriptor_InterfaceTypeSignatures() { - return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getITypeDescriptor_TypeSignatureDelegate() { - return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(4); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getITypeDescriptor_Methods() { - return (EReference)iTypeDescriptorEClass.getEStructuralFeatures().get(5); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getITypeDescriptor_TypeParameterSignatures() { - return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(6); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getITypeDescriptor_JdtContext() { - return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(7); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getITypeDescriptor_EnumType() { - return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(8); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIDescribedInDetail() { - return iDescribedInDetailEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIJavaTypeDescriptor2() { - return iJavaTypeDescriptor2EClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIJavaTypeDescriptor2_Type() { - return (EAttribute)iJavaTypeDescriptor2EClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIJavaTypeDescriptor2_BeanProperties() { - return (EReference)iJavaTypeDescriptor2EClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIJavaTypeDescriptor2_BeanMethods() { - return (EReference)iJavaTypeDescriptor2EClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIJavaTypeDescriptor2_ArrayCount() { - return (EAttribute)iJavaTypeDescriptor2EClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIBeanMethodSymbol() { - return iBeanMethodSymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIBeanMethodSymbol_Owner() { - return (EReference)iBeanMethodSymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIComponentSymbol() { - return iComponentSymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIPropertySymbol() { - return iPropertySymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIPropertySymbol_Intermediate() { - return (EAttribute)iPropertySymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIMapTypeDescriptor() { - return iMapTypeDescriptorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIMapTypeDescriptor_MapSource() { - return (EAttribute)iMapTypeDescriptorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIMapTypeDescriptor_Immutable() { - return (EAttribute)iMapTypeDescriptorEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIMethodSymbol() { - return iMethodSymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIMethodSymbol_Signature() { - return (EAttribute)iMethodSymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIObjectSymbol() { - return iObjectSymbolEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getIObjectSymbol_TypeDescriptor() { - return (EReference)iObjectSymbolEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIObjectSymbol_Readable() { - return (EAttribute)iObjectSymbolEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIObjectSymbol_Writable() { - return (EAttribute)iObjectSymbolEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIBoundedTypeDescriptor() { - return iBoundedTypeDescriptorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIBoundedMapTypeDescriptor() { - return iBoundedMapTypeDescriptorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIBoundedJavaTypeDescriptor() { - return iBoundedJavaTypeDescriptorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIListTypeDescriptor() { - return iListTypeDescriptorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getIListTypeDescriptor_ListSource() { - return (EAttribute)iListTypeDescriptorEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getIBoundedListTypeDescriptor() { - return iBoundedListTypeDescriptorEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EEnum getERuntimeSource() { - return eRuntimeSourceEEnum; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EDataType getIType() { - return iTypeEDataType; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EDataType getIJavaElement() { - return iJavaElementEDataType; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EDataType getValueType() { - return valueTypeEDataType; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public SymbolFactory getSymbolFactory() { - return (SymbolFactory)getEFactoryInstance(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - iBeanInstanceSymbolEClass = createEClass(IBEAN_INSTANCE_SYMBOL); - createEReference(iBeanInstanceSymbolEClass, IBEAN_INSTANCE_SYMBOL__PROPERTIES); - createEReference(iBeanInstanceSymbolEClass, IBEAN_INSTANCE_SYMBOL__METHODS); - - iBeanPropertySymbolEClass = createEClass(IBEAN_PROPERTY_SYMBOL); - createEReference(iBeanPropertySymbolEClass, IBEAN_PROPERTY_SYMBOL__OWNER); - - iInstanceSymbolEClass = createEClass(IINSTANCE_SYMBOL); - createEAttribute(iInstanceSymbolEClass, IINSTANCE_SYMBOL__TYPE_RESOLVED); - createEAttribute(iInstanceSymbolEClass, IINSTANCE_SYMBOL__RUNTIME_SOURCE); - - iJavaSymbolEClass = createEClass(IJAVA_SYMBOL); - createEAttribute(iJavaSymbolEClass, IJAVA_SYMBOL__JAVA_ELEMENT); - - iSymbolEClass = createEClass(ISYMBOL); - createEAttribute(iSymbolEClass, ISYMBOL__NAME); - - iTypeDescriptorEClass = createEClass(ITYPE_DESCRIPTOR); - createEReference(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__PROPERTIES); - createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__TYPE_SIGNATURE); - createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES); - createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES); - createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE); - createEReference(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__METHODS); - createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES); - createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__JDT_CONTEXT); - createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__ENUM_TYPE); - - iDescribedInDetailEClass = createEClass(IDESCRIBED_IN_DETAIL); - - iJavaTypeDescriptor2EClass = createEClass(IJAVA_TYPE_DESCRIPTOR2); - createEAttribute(iJavaTypeDescriptor2EClass, IJAVA_TYPE_DESCRIPTOR2__TYPE); - createEReference(iJavaTypeDescriptor2EClass, IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES); - createEReference(iJavaTypeDescriptor2EClass, IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS); - createEAttribute(iJavaTypeDescriptor2EClass, IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT); - - iBeanMethodSymbolEClass = createEClass(IBEAN_METHOD_SYMBOL); - createEReference(iBeanMethodSymbolEClass, IBEAN_METHOD_SYMBOL__OWNER); - - iComponentSymbolEClass = createEClass(ICOMPONENT_SYMBOL); - - iPropertySymbolEClass = createEClass(IPROPERTY_SYMBOL); - createEAttribute(iPropertySymbolEClass, IPROPERTY_SYMBOL__INTERMEDIATE); - - iMapTypeDescriptorEClass = createEClass(IMAP_TYPE_DESCRIPTOR); - createEAttribute(iMapTypeDescriptorEClass, IMAP_TYPE_DESCRIPTOR__MAP_SOURCE); - createEAttribute(iMapTypeDescriptorEClass, IMAP_TYPE_DESCRIPTOR__IMMUTABLE); - - iMethodSymbolEClass = createEClass(IMETHOD_SYMBOL); - createEAttribute(iMethodSymbolEClass, IMETHOD_SYMBOL__SIGNATURE); - - iObjectSymbolEClass = createEClass(IOBJECT_SYMBOL); - createEReference(iObjectSymbolEClass, IOBJECT_SYMBOL__TYPE_DESCRIPTOR); - createEAttribute(iObjectSymbolEClass, IOBJECT_SYMBOL__READABLE); - createEAttribute(iObjectSymbolEClass, IOBJECT_SYMBOL__WRITABLE); - - iBoundedTypeDescriptorEClass = createEClass(IBOUNDED_TYPE_DESCRIPTOR); - - iBoundedMapTypeDescriptorEClass = createEClass(IBOUNDED_MAP_TYPE_DESCRIPTOR); - - iBoundedJavaTypeDescriptorEClass = createEClass(IBOUNDED_JAVA_TYPE_DESCRIPTOR); - - iListTypeDescriptorEClass = createEClass(ILIST_TYPE_DESCRIPTOR); - createEAttribute(iListTypeDescriptorEClass, ILIST_TYPE_DESCRIPTOR__LIST_SOURCE); - - iBoundedListTypeDescriptorEClass = createEClass(IBOUNDED_LIST_TYPE_DESCRIPTOR); - - // Create enums - eRuntimeSourceEEnum = createEEnum(ERUNTIME_SOURCE); - - // Create data types - iTypeEDataType = createEDataType(ITYPE); - iJavaElementEDataType = createEDataType(IJAVA_ELEMENT); - valueTypeEDataType = createEDataType(VALUE_TYPE); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Add supertypes to classes - iBeanInstanceSymbolEClass.getESuperTypes().add(this.getIInstanceSymbol()); - iBeanInstanceSymbolEClass.getESuperTypes().add(this.getIDescribedInDetail()); - iBeanPropertySymbolEClass.getESuperTypes().add(this.getIPropertySymbol()); - iBeanPropertySymbolEClass.getESuperTypes().add(this.getIDescribedInDetail()); - iInstanceSymbolEClass.getESuperTypes().add(this.getIObjectSymbol()); - iJavaSymbolEClass.getESuperTypes().add(this.getISymbol()); - iJavaTypeDescriptor2EClass.getESuperTypes().add(this.getITypeDescriptor()); - iBeanMethodSymbolEClass.getESuperTypes().add(this.getIDescribedInDetail()); - iBeanMethodSymbolEClass.getESuperTypes().add(this.getIMethodSymbol()); - iComponentSymbolEClass.getESuperTypes().add(this.getIInstanceSymbol()); - iComponentSymbolEClass.getESuperTypes().add(this.getIDescribedInDetail()); - iPropertySymbolEClass.getESuperTypes().add(this.getIObjectSymbol()); - iMapTypeDescriptorEClass.getESuperTypes().add(this.getITypeDescriptor()); - iMethodSymbolEClass.getESuperTypes().add(this.getISymbol()); - iObjectSymbolEClass.getESuperTypes().add(this.getISymbol()); - iBoundedTypeDescriptorEClass.getESuperTypes().add(this.getITypeDescriptor()); - iBoundedMapTypeDescriptorEClass.getESuperTypes().add(this.getIMapTypeDescriptor()); - iBoundedMapTypeDescriptorEClass.getESuperTypes().add(this.getIBoundedTypeDescriptor()); - iBoundedJavaTypeDescriptorEClass.getESuperTypes().add(this.getIJavaTypeDescriptor2()); - iBoundedJavaTypeDescriptorEClass.getESuperTypes().add(this.getIBoundedTypeDescriptor()); - iListTypeDescriptorEClass.getESuperTypes().add(this.getITypeDescriptor()); - iBoundedListTypeDescriptorEClass.getESuperTypes().add(this.getIListTypeDescriptor()); - iBoundedListTypeDescriptorEClass.getESuperTypes().add(this.getIBoundedTypeDescriptor()); - - // Initialize classes and features; add operations and parameters - initEClass(iBeanInstanceSymbolEClass, IBeanInstanceSymbol.class, "IBeanInstanceSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEReference(getIBeanInstanceSymbol_Properties(), this.getIBeanPropertySymbol(), null, "properties", null, 0, -1, IBeanInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getIBeanInstanceSymbol_Methods(), this.getIBeanMethodSymbol(), null, "methods", null, 0, -1, IBeanInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - addEOperation(iBeanInstanceSymbolEClass, this.getIJavaTypeDescriptor2(), "getJavaTypeDescriptor", 0, 1); //$NON-NLS-1$ - - EOperation op = addEOperation(iBeanInstanceSymbolEClass, null, "setJavaTypeDescriptor"); //$NON-NLS-1$ - addEParameter(op, this.getIJavaTypeDescriptor2(), "newTypeDescriptor", 0, 1); //$NON-NLS-1$ - - initEClass(iBeanPropertySymbolEClass, IBeanPropertySymbol.class, "IBeanPropertySymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEReference(getIBeanPropertySymbol_Owner(), this.getIJavaTypeDescriptor2(), null, "owner", null, 0, 1, IBeanPropertySymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(iInstanceSymbolEClass, IInstanceSymbol.class, "IInstanceSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getIInstanceSymbol_TypeResolved(), ecorePackage.getEBoolean(), "typeResolved", null, 0, 1, IInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getIInstanceSymbol_RuntimeSource(), this.getERuntimeSource(), "runtimeSource", "TAG_INSTANTIATED_SYMBOL", 0, 1, IInstanceSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - - initEClass(iJavaSymbolEClass, IJavaSymbol.class, "IJavaSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getIJavaSymbol_JavaElement(), this.getIJavaElement(), "javaElement", null, 0, 1, IJavaSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(iSymbolEClass, ISymbol.class, "ISymbol", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getISymbol_Name(), ecorePackage.getEString(), "name", null, 0, 1, ISymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(iTypeDescriptorEClass, ITypeDescriptor.class, "ITypeDescriptor", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEReference(getITypeDescriptor_Properties(), this.getIPropertySymbol(), null, "properties", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getITypeDescriptor_TypeSignature(), ecorePackage.getEString(), "typeSignature", "", 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - initEAttribute(getITypeDescriptor_SuperTypeSignatures(), ecorePackage.getEString(), "superTypeSignatures", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getITypeDescriptor_InterfaceTypeSignatures(), ecorePackage.getEString(), "interfaceTypeSignatures", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getITypeDescriptor_TypeSignatureDelegate(), ecorePackage.getEString(), "typeSignatureDelegate", null, 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getITypeDescriptor_Methods(), this.getIMethodSymbol(), null, "methods", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getITypeDescriptor_TypeParameterSignatures(), ecorePackage.getEString(), "typeParameterSignatures", null, 0, -1, ITypeDescriptor.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getITypeDescriptor_JdtContext(), this.getIJavaElement(), "jdtContext", null, 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getITypeDescriptor_EnumType(), ecorePackage.getEBoolean(), "enumType", null, 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - op = addEOperation(iTypeDescriptorEClass, ecorePackage.getEBoolean(), "instanceOf", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - - addEOperation(iTypeDescriptorEClass, ecorePackage.getEBoolean(), "isArray", 0, 1); //$NON-NLS-1$ - - addEOperation(iTypeDescriptorEClass, this.getIObjectSymbol(), "getArrayElement", 0, 1); //$NON-NLS-1$ - - op = addEOperation(iTypeDescriptorEClass, this.getIType(), "resolveType", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "resolvedTypeSignature", 0, 1); //$NON-NLS-1$ - - op = addEOperation(iTypeDescriptorEClass, this.getISymbol(), "calculateSyntheticCall", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "methodName", 0, 1); //$NON-NLS-1$ - addEParameter(op, this.getValueType(), "methodArgs", 0, -1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "symbolName", 0, 1); //$NON-NLS-1$ - - initEClass(iDescribedInDetailEClass, IDescribedInDetail.class, "IDescribedInDetail", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - - initEClass(iJavaTypeDescriptor2EClass, IJavaTypeDescriptor2.class, "IJavaTypeDescriptor2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getIJavaTypeDescriptor2_Type(), this.getIType(), "type", null, 0, 1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getIJavaTypeDescriptor2_BeanProperties(), this.getIBeanPropertySymbol(), null, "beanProperties", null, 0, -1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getIJavaTypeDescriptor2_BeanMethods(), this.getIBeanPropertySymbol(), null, "beanMethods", null, 0, -1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getIJavaTypeDescriptor2_ArrayCount(), ecorePackage.getEInt(), "arrayCount", null, 0, 1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(iBeanMethodSymbolEClass, IBeanMethodSymbol.class, "IBeanMethodSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEReference(getIBeanMethodSymbol_Owner(), this.getIJavaTypeDescriptor2(), null, "owner", null, 0, 1, IBeanMethodSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(iComponentSymbolEClass, IComponentSymbol.class, "IComponentSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - - initEClass(iPropertySymbolEClass, IPropertySymbol.class, "IPropertySymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getIPropertySymbol_Intermediate(), ecorePackage.getEBoolean(), "intermediate", null, 0, 1, IPropertySymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(iMapTypeDescriptorEClass, IMapTypeDescriptor.class, "IMapTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getIMapTypeDescriptor_MapSource(), ecorePackage.getEMap(), "mapSource", null, 0, 1, IMapTypeDescriptor.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getIMapTypeDescriptor_Immutable(), ecorePackage.getEBoolean(), "immutable", "true", 0, 1, IMapTypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - - initEClass(iMethodSymbolEClass, IMethodSymbol.class, "IMethodSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getIMethodSymbol_Signature(), ecorePackage.getEString(), "signature", null, 0, 1, IMethodSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(iObjectSymbolEClass, IObjectSymbol.class, "IObjectSymbol", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEReference(getIObjectSymbol_TypeDescriptor(), this.getITypeDescriptor(), null, "typeDescriptor", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getIObjectSymbol_Readable(), ecorePackage.getEBoolean(), "readable", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getIObjectSymbol_Writable(), ecorePackage.getEBoolean(), "writable", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - op = addEOperation(iObjectSymbolEClass, ecorePackage.getEBoolean(), "supportsCoercion", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - - op = addEOperation(iObjectSymbolEClass, this.getITypeDescriptor(), "coerce", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - - op = addEOperation(iObjectSymbolEClass, this.getISymbol(), "call", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "methodName", 0, 1); //$NON-NLS-1$ - addEParameter(op, this.getValueType(), "methodArguments", 0, -1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "symbolName", 0, 1); //$NON-NLS-1$ - - initEClass(iBoundedTypeDescriptorEClass, IBoundedTypeDescriptor.class, "IBoundedTypeDescriptor", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - - op = addEOperation(iBoundedTypeDescriptorEClass, ecorePackage.getEBoolean(), "isUnboundedForType", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - - op = addEOperation(iBoundedTypeDescriptorEClass, this.getISymbol(), "getUnboundedProperty", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEJavaObject(), "name", 0, 1); //$NON-NLS-1$ - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - - initEClass(iBoundedMapTypeDescriptorEClass, IBoundedMapTypeDescriptor.class, "IBoundedMapTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - - initEClass(iBoundedJavaTypeDescriptorEClass, IBoundedJavaTypeDescriptor.class, "IBoundedJavaTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - - initEClass(iListTypeDescriptorEClass, IListTypeDescriptor.class, "IListTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getIListTypeDescriptor_ListSource(), ecorePackage.getEEList(), "listSource", null, 0, 1, IListTypeDescriptor.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - - initEClass(iBoundedListTypeDescriptorEClass, IBoundedListTypeDescriptor.class, "IBoundedListTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - - // Initialize enums and add enum literals - initEEnum(eRuntimeSourceEEnum, ERuntimeSource.class, "ERuntimeSource"); //$NON-NLS-1$ - addEEnumLiteral(eRuntimeSourceEEnum, ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); - addEEnumLiteral(eRuntimeSourceEEnum, ERuntimeSource.MANAGED_BEAN_SYMBOL_LITERAL); - addEEnumLiteral(eRuntimeSourceEEnum, ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL); - addEEnumLiteral(eRuntimeSourceEEnum, ERuntimeSource.OTHER_LITERAL); - - // Initialize data types - initEDataType(iTypeEDataType, IType.class, "IType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEDataType(iJavaElementEDataType, IJavaElement.class, "IJavaElement", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEDataType(valueTypeEDataType, ValueType.class, "ValueType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - - // Create resource - createResource(eNS_URI); - } - -} //SymbolPackageImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Util.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Util.java deleted file mode 100644 index 0c2f288e3..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Util.java +++ /dev/null @@ -1,191 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.impl; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.jdt.core.IMethod; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.Signature; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.common.internal.types.TypeConstants; -import org.eclipse.jst.jsf.common.internal.types.ValueType; -import org.eclipse.jst.jsf.common.util.JDTBeanIntrospector; -import org.eclipse.jst.jsf.common.util.TypeUtil; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolFactory; - -final class Util -{ - static ISymbol call(String methodName, EList methodArguments, - String symbolName, ITypeDescriptor typeDesc) - { - // first, see if the type descriptor wants to handle the call - ISymbol result = typeDesc.calculateSyntheticCall(methodName, methodArguments, symbolName); - - final IType type= typeDesc.resolveType(typeDesc.getTypeSignature()); - - // if the type is resolved and the typeDesc didn't already handle - // the call then do this the hard way... - if (type != null && result == null) - { - final JDTBeanIntrospector introspector = - new JDTBeanIntrospector(type); - - final IMethod callMethod = - Util.matchMethod(methodName, methodArguments, introspector.getAllMethods(),typeDesc.getTypeParameterSignatures()); - - if (callMethod != null) - { - try - { - // resolve the method's return type; don't erase parameters - String retTypeSignature = callMethod.getReturnType(); - - // if we have a type variable, try to parameter match it - if (Signature.getTypeSignatureKind(retTypeSignature) == Signature.TYPE_VARIABLE_SIGNATURE) - { - retTypeSignature = TypeUtil.matchTypeParameterToArgument - (type - , retTypeSignature, typeDesc.getTypeParameterSignatures()); - - if (retTypeSignature == null) - { - retTypeSignature = TypeConstants.TYPE_JAVAOBJECT; - } - } - // otherwise, try and resolve it in type - else - { - retTypeSignature = TypeUtil.resolveTypeSignature - (type, callMethod.getReturnType(), false); - } - - final IPropertySymbol propSymbol = - SymbolFactory.eINSTANCE.createIPropertySymbol(); - - // TODO: there is a possible problem here for non-string keyed maps - propSymbol.setName(symbolName); - propSymbol.setReadable(true); - - { - IJavaTypeDescriptor2 newTypeDesc = null; - - if (retTypeSignature.equals(TypeConstants.TYPE_JAVAOBJECT)) - { - newTypeDesc = SymbolFactory.eINSTANCE.createIBoundedJavaTypeDescriptor(); - } - else - { - newTypeDesc = SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2(); - } - - newTypeDesc.setArrayCount(Signature.getArrayCount(retTypeSignature)); - - // may be null - newTypeDesc.setType(typeDesc.resolveType(retTypeSignature)); - newTypeDesc.setTypeSignatureDelegate(retTypeSignature); - propSymbol.setTypeDescriptor(newTypeDesc); - } - - result = propSymbol; - } - catch (JavaModelException e) - { - JSFCommonPlugin.log(e); - // fall-through and return null result - } - } - } - - return result; - } - - static IMethod matchMethod(String methodName, List methodArguments, IMethod[] allMethods, List typeParameterSignatures) - { -// final List argSigs = convertArgsToSignatures(methodArguments); - IMethod matchedMethod = null; - - for (int i = 0; i < allMethods.length; i++) - { - final IMethod method = allMethods[i]; - - // check for names and argument count match - if (method.getParameterTypes().length == methodArguments.size() - && method.getElementName().equals(methodName)) - { - List<String> methods = resolveMethodParameters(method, typeParameterSignatures); - - // need to verify argument matches - boolean isMatched = true; - CHECK_ARGUMENTS: for (int j = 0; j < methods.size(); j++) - { - final ValueType valueType = (ValueType) methodArguments.get(j); - - // if the parameters match, or if the method expects an object - // and we have a class - // TODO: there are some cases not supported here like: - // - method name overloading - // - autoboxing primitives - // - certain kinds of parameterized args - if (!methods.get(j).equals(valueType.getSignature()) - && !(methods.get(j).equals(TypeConstants.TYPE_JAVAOBJECT) - && Signature.getTypeSignatureKind(valueType.getSignature())==Signature.CLASS_TYPE_SIGNATURE)) - { - // not a match - isMatched = false; - break CHECK_ARGUMENTS; - } - } - - if (isMatched) - { - return method; - } - } - } - - return matchedMethod; - } - - static List<String> resolveMethodParameters(IMethod method, List typeParametersSignatures) - { - List<String> resolved = new ArrayList<String>(); - String[] parameterTypes = method.getParameterTypes(); - for (String parameter : parameterTypes) - { - parameter = TypeUtil.resolveTypeSignature(method.getDeclaringType() - , parameter, false); - - if (Signature.getTypeSignatureKind(parameter) == Signature.TYPE_VARIABLE_SIGNATURE) - { - parameter = TypeUtil.matchTypeParameterToArgument - (method.getDeclaringType(), parameter, typeParametersSignatures); - } - - if (parameter == null) - { - parameter = TypeConstants.TYPE_JAVAOBJECT; - } - - resolved.add(parameter); - } - - return resolved; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/messages.properties b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/messages.properties deleted file mode 100644 index c8ed3b496..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/messages.properties +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################### -# Copyright (c) 2001, 2008 Oracle Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Oracle Corporation - initial API and implementation -############################################################################### -IBeanMethodSymbolImpl.DetailDesc=Signature: -IBeanPropertySymbolImpl.Access=Access: -IBeanPropertySymbolImpl.hiding=hiding -IBeanPropertySymbolImpl.none=none -IBeanPropertySymbolImpl.read_write=read/write -IBeanPropertySymbolImpl.readonly=read-only -IBeanPropertySymbolImpl.Type=Type: -IBeanPropertySymbolImpl.writeonly=write-only diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java deleted file mode 100644 index ee8e4b9ad..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java +++ /dev/null @@ -1,219 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; -import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider; -import org.eclipse.swt.graphics.Image; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol} object. - * <!-- begin-user-doc --> - * @extends IContentProposalProvider - * <!-- end-user-doc --> - * @generated - */ -public class IBeanInstanceSymbolItemProvider - extends IInstanceSymbolItemProvider - implements - IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IContentProposalProvider -{ - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IBeanInstanceSymbolItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addPropertiesPropertyDescriptor(object); - addMethodsPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Properties feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addPropertiesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IBeanInstanceSymbol_properties_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IBeanInstanceSymbol_properties_feature", "_UI_IBeanInstanceSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IBEAN_INSTANCE_SYMBOL__PROPERTIES, - false, - false, - false, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Methods feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addMethodsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IBeanInstanceSymbol_methods_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IBeanInstanceSymbol_methods_feature", "_UI_IBeanInstanceSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IBEAN_INSTANCE_SYMBOL__METHODS, - false, - false, - false, - null, - null, - null)); - } - - /** - * This returns IBeanInstanceSymbol.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image associated with object or null if not found - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanInstanceSymbol")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text label associated with object or null if not found - * <!-- end-user-doc --> - * @generated NOT - */ - public String getText(Object object) { - String label = ((IBeanInstanceSymbol)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_IBeanInstanceSymbol_type") : //$NON-NLS-1$ - label; - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - - /** - * @param target_ - * @param proposalFactory - * @return a completion proposal for target at offset - */ - public ICompletionProposal[] getProposals(Object target_, - IProposalCreationFactory proposalFactory) - { - IBeanInstanceSymbol symbol = (IBeanInstanceSymbol) target_; - - final String replacementText = symbol.getName(); - final String displayText = getText(symbol); - final String additionalText = symbol.getDetailedDescription(); - final Image displayImage = - ExtendedImageRegistry.getInstance().getImage(getImage(symbol)); - - return new ICompletionProposal[] - { - proposalFactory.createProposal(replacementText, - displayText, - additionalText, - displayImage, - target_) - }; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java deleted file mode 100644 index ed4eaae3a..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java +++ /dev/null @@ -1,254 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; -import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider; -import org.eclipse.swt.graphics.Image; - - - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol} object. - * <!-- begin-user-doc --> - * @extends IContentProposalProvider - * <!-- end-user-doc --> - * @generated - */ -public class IBeanMethodSymbolItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource, - IContentProposalProvider { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IBeanMethodSymbolItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the list of property descriptors - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addNamePropertyDescriptor(object); - addSignaturePropertyDescriptor(object); - addOwnerPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Name feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ISYMBOL__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Signature feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addSignaturePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IMethodSymbol_signature_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IMethodSymbol_signature_feature", "_UI_IMethodSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IMETHOD_SYMBOL__SIGNATURE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Owner feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addOwnerPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IBeanMethodSymbol_owner_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IBeanMethodSymbol_owner_feature", "_UI_IBeanMethodSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IBEAN_METHOD_SYMBOL__OWNER, - true, - false, - false, - null, - null, - null)); - } - - /** - * This returns IBeanMethodSymbol.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image associated with object or null if no found - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanMethodSymbol")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text label associated with label or null if not found - * <!-- end-user-doc --> - * @generated NOT - */ - public String getText(Object object) { - String label = ((IBeanMethodSymbol)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_IBeanMethodSymbol_type") : //$NON-NLS-1$ - label; - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IBeanMethodSymbol.class)) { - case SymbolPackage.IBEAN_METHOD_SYMBOL__NAME: - case SymbolPackage.IBEAN_METHOD_SYMBOL__SIGNATURE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - - public ICompletionProposal[] getProposals(Object target_, - IProposalCreationFactory proposalFactory) - { - IBeanMethodSymbol symbol = (IBeanMethodSymbol) target_; - - final String replacementText = symbol.getName(); - final String displayText = getText(target_); - final String additionalText = symbol.getDetailedDescription(); - final Image displayImage = - ExtendedImageRegistry.getInstance().getImage(getImage(symbol)); - - return new ICompletionProposal[] - { - proposalFactory.createProposal(replacementText, - displayText, - additionalText, - displayImage, - target_) - }; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanPropertySymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanPropertySymbolItemProvider.java deleted file mode 100644 index cc2714420..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanPropertySymbolItemProvider.java +++ /dev/null @@ -1,196 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; -import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol} object. - * <!-- begin-user-doc --> - * @extends IContentProposalProvider - * <!-- end-user-doc --> - * @generated - */ -public class IBeanPropertySymbolItemProvider - extends IPropertySymbolItemProvider - implements - IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IContentProposalProvider -{ - private static final String PROPERTY_SYMBOL_WO = "full/obj16/IBeanPropertySymbol_wo"; //$NON-NLS-1$ - private static final String PROPERTY_SYMBOL_RO = "full/obj16/IBeanPropertySymbol_ro"; //$NON-NLS-1$ - private static final String PROPERTY_SYMBOL_RW = "full/obj16/IBeanPropertySymbol_rw"; //$NON-NLS-1$ - private static final String PROPERTY_SYMBOL_WO_INDEXABLE = "full/obj16/IBeanPropertySymbol_wo_indexable"; //$NON-NLS-1$ - private static final String PROPERTY_SYMBOL_RO_INDEXABLE = "full/obj16/IBeanPropertySymbol_ro_indexable"; //$NON-NLS-1$ - private static final String PROPERTY_SYMBOL_RW_INDEXABLE = "full/obj16/IBeanPropertySymbol_rw_indexable"; //$NON-NLS-1$ - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * @extends IContentProposalProvider - * <!-- end-user-doc --> - * @generated - */ - public IBeanPropertySymbolItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the list of property descriptors - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addOwnerPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Owner feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addOwnerPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IBeanPropertySymbol_owner_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IBeanPropertySymbol_owner_feature", "_UI_IBeanPropertySymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IBEAN_PROPERTY_SYMBOL__OWNER, - true, - false, - false, - null, - null, - null)); - } - - /** - * This returns IBeanPropertySymbol.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image associated with object or null if not found - * <!-- end-user-doc --> - * @generated NOT - */ - public Object getImage(Object object) { - IBeanPropertySymbol propertySymbol = (IBeanPropertySymbol) object; - String imageFile = null; - ITypeDescriptor typeDescriptor = propertySymbol.getTypeDescriptor(); - if (typeDescriptor != null && (typeDescriptor.isArray() || typeDescriptor.instanceOf("Ljava.util.List;") || typeDescriptor.instanceOf("Ljava.util.Map;"))) { //$NON-NLS-1$ //$NON-NLS-2$ - // property is somehow "indexable" by int/String: - if (propertySymbol.isReadable() && propertySymbol.isWritable()) { - imageFile = PROPERTY_SYMBOL_RW_INDEXABLE; - } else if (propertySymbol.isReadable()) { - imageFile = PROPERTY_SYMBOL_RO_INDEXABLE; - } else if (propertySymbol.isWritable()) { - imageFile = PROPERTY_SYMBOL_WO_INDEXABLE; - } - } else { - if (propertySymbol.isReadable() && propertySymbol.isWritable()) { - imageFile = PROPERTY_SYMBOL_RW; - } else if (propertySymbol.isReadable()) { - imageFile = PROPERTY_SYMBOL_RO; - } else if (propertySymbol.isWritable()) { - imageFile = PROPERTY_SYMBOL_WO; - } - } - return imageFile == null? null : overlayImage(object, getResourceLocator().getImage(imageFile)); - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text label associated with object - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IBeanPropertySymbol)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_IBeanPropertySymbol_type") : //$NON-NLS-1$ - getString("_UI_IBeanPropertySymbol_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedJavaTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedJavaTypeDescriptorItemProvider.java deleted file mode 100644 index 1c85e05dc..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedJavaTypeDescriptorItemProvider.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: IBoundedJavaTypeDescriptorItemProvider.java,v 1.7 2007/10/01 04:29:43 cbateman Exp $ - */ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class IBoundedJavaTypeDescriptorItemProvider - extends IJavaTypeDescriptor2ItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IBoundedJavaTypeDescriptorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns IBoundedJavaTypeDescriptor.gif. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBoundedJavaTypeDescriptor")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IBoundedJavaTypeDescriptor)object).getTypeSignature(); - return label == null || label.length() == 0 ? - getString("_UI_IBoundedJavaTypeDescriptor_type") : //$NON-NLS-1$ - getString("_UI_IBoundedJavaTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedListTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedListTypeDescriptorItemProvider.java deleted file mode 100644 index 4bee1ad98..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedListTypeDescriptorItemProvider.java +++ /dev/null @@ -1,136 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.ResourceLocator; - -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; - -import org.eclipse.jst.jsf.common.JSFCommonPlugin; - -import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class IBoundedListTypeDescriptorItemProvider - extends IListTypeDescriptorItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param adapterFactory - * @generated - */ - public IBoundedListTypeDescriptorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns IBoundedListTypeDescriptor.gif. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBoundedListTypeDescriptor")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IBoundedListTypeDescriptor)object).getTypeSignature(); - return label == null || label.length() == 0 ? - getString("_UI_IBoundedListTypeDescriptor_type") : //$NON-NLS-1$ - getString("_UI_IBoundedListTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedMapTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedMapTypeDescriptorItemProvider.java deleted file mode 100644 index 02b1a2409..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedMapTypeDescriptorItemProvider.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: IBoundedMapTypeDescriptorItemProvider.java,v 1.7 2007/10/01 04:29:43 cbateman Exp $ - */ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class IBoundedMapTypeDescriptorItemProvider - extends IMapTypeDescriptorItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IBoundedMapTypeDescriptorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns IBoundedMapTypeDescriptor.gif. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBoundedMapTypeDescriptor")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IBoundedMapTypeDescriptor)object).getTypeSignature(); - return label == null || label.length() == 0 ? - getString("_UI_IBoundedMapTypeDescriptor_type") : //$NON-NLS-1$ - getString("_UI_IBoundedMapTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java deleted file mode 100644 index 96b04f747..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java +++ /dev/null @@ -1,169 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IComponentSymbol; -import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider; -import org.eclipse.swt.graphics.Image; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IComponentSymbol} object. - * <!-- begin-user-doc --> - * @extends IContentProposalProvider - * <!-- end-user-doc --> - * @generated - */ -public class IComponentSymbolItemProvider - extends IInstanceSymbolItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource, - IContentProposalProvider -{ - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IComponentSymbolItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the property descriptor list - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This returns IComponentSymbol.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image associated with object or null if not found - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IComponentSymbol")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text label for object or null if not found - * <!-- end-user-doc --> - * @generated NOT - */ - public String getText(Object object) { - String label = ((IComponentSymbol)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_IComponentSymbol_type") : //$NON-NLS-1$ - label; - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - - public ICompletionProposal[] getProposals(Object target_, - IProposalCreationFactory proposalFactory) - { - IComponentSymbol symbol = (IComponentSymbol) target_; - - final String replacementText = symbol.getName(); - final String displayText = getText(symbol); - final String additionalText = symbol.getDetailedDescription(); - final Image displayImage = - ExtendedImageRegistry.getInstance().getImage(getImage(symbol)); - - return new ICompletionProposal[] - { - proposalFactory.createProposal(replacementText, - displayText, - additionalText, - displayImage, - target_) - }; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java deleted file mode 100644 index 155bfb186..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java +++ /dev/null @@ -1,329 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; -import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider; -import org.eclipse.swt.graphics.Image; - - - - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IInstanceSymbol} object. - * <!-- begin-user-doc --> - * @extends IContentProposalProvider - * <!-- end-user-doc --> - * @generated - */ -public class IInstanceSymbolItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource, - IContentProposalProvider { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IInstanceSymbolItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the EMF property descriptors - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addNamePropertyDescriptor(object); - addTypeDescriptorPropertyDescriptor(object); - addReadablePropertyDescriptor(object); - addWritablePropertyDescriptor(object); - addTypeResolvedPropertyDescriptor(object); - addRuntimeSourcePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Name feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ISYMBOL__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Type Descriptor feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addTypeDescriptorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IObjectSymbol_typeDescriptor_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_typeDescriptor_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IOBJECT_SYMBOL__TYPE_DESCRIPTOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Readable feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addReadablePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IObjectSymbol_readable_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_readable_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IOBJECT_SYMBOL__READABLE, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Writable feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addWritablePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IObjectSymbol_writable_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_writable_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IOBJECT_SYMBOL__WRITABLE, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Type Resolved feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addTypeResolvedPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IInstanceSymbol_typeResolved_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IInstanceSymbol_typeResolved_feature", "_UI_IInstanceSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IINSTANCE_SYMBOL__TYPE_RESOLVED, - false, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Runtime Source feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addRuntimeSourcePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IInstanceSymbol_runtimeSource_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IInstanceSymbol_runtimeSource_feature", "_UI_IInstanceSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IINSTANCE_SYMBOL__RUNTIME_SOURCE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns IInstanceSymbol.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image adaption for object - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IInstanceSymbol")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text representation of object - * <!-- end-user-doc --> - * @generated NOT - */ - public String getText(Object object) { - String label = ((IInstanceSymbol)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_IInstanceSymbol_type") : //$NON-NLS-1$ - label; - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IInstanceSymbol.class)) { - case SymbolPackage.IINSTANCE_SYMBOL__NAME: - case SymbolPackage.IINSTANCE_SYMBOL__READABLE: - case SymbolPackage.IINSTANCE_SYMBOL__WRITABLE: - case SymbolPackage.IINSTANCE_SYMBOL__TYPE_RESOLVED: - case SymbolPackage.IINSTANCE_SYMBOL__RUNTIME_SOURCE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - - public ICompletionProposal[] getProposals(Object target_, - IProposalCreationFactory proposalFactory) - { - IInstanceSymbol symbol = (IInstanceSymbol) target_; - - final String replacementText = symbol.getName(); - final String displayText = getText(symbol); - //final String additionalText = symbol.getDetailedDescription(); - final Image displayImage = - ExtendedImageRegistry.getInstance().getImage(getImage(symbol)); - - return new ICompletionProposal[] - { - proposalFactory.createProposal(replacementText, - displayText, - null, - displayImage, - target_) - }; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaSymbolItemProvider.java deleted file mode 100644 index 021cd5bed..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaSymbolItemProvider.java +++ /dev/null @@ -1,204 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IJavaSymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - - - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IJavaSymbol} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class IJavaSymbolItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IJavaSymbolItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the list of property descriptors - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addNamePropertyDescriptor(object); - addJavaElementPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Name feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ISYMBOL__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Java Element feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addJavaElementPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IJavaSymbol_javaElement_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IJavaSymbol_javaElement_feature", "_UI_IJavaSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IJAVA_SYMBOL__JAVA_ELEMENT, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns IJavaSymbol.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image associated with object or null if not found - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IJavaSymbol")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text label associated with object or null if no found - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IJavaSymbol)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_IJavaSymbol_type") : //$NON-NLS-1$ - getString("_UI_IJavaSymbol_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IJavaSymbol.class)) { - case SymbolPackage.IJAVA_SYMBOL__NAME: - case SymbolPackage.IJAVA_SYMBOL__JAVA_ELEMENT: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaTypeDescriptor2ItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaTypeDescriptor2ItemProvider.java deleted file mode 100644 index 201abe48d..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaTypeDescriptor2ItemProvider.java +++ /dev/null @@ -1,250 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class IJavaTypeDescriptor2ItemProvider - extends ITypeDescriptorItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IJavaTypeDescriptor2ItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the emf property descriptors - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addTypePropertyDescriptor(object); - addBeanPropertiesPropertyDescriptor(object); - addBeanMethodsPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Type feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IJavaTypeDescriptor2_type_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_type_feature", "_UI_IJavaTypeDescriptor2_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2__TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Bean Properties feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addBeanPropertiesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IJavaTypeDescriptor2_beanProperties_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_beanProperties_feature", "_UI_IJavaTypeDescriptor2_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES, - true, - false, - false, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Bean Methods feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addBeanMethodsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IJavaTypeDescriptor2_beanMethods_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_beanMethods_feature", "_UI_IJavaTypeDescriptor2_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS, - true, - false, - false, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Array Count feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param object - * @generated - */ - protected void addArrayCountPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IJavaTypeDescriptor2_arrayCount_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_arrayCount_feature", "_UI_IJavaTypeDescriptor2_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } - - - /** - * This returns IJavaTypeDescriptor2.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image adaption for object - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IJavaTypeDescriptor2")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text representation of object - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IJavaTypeDescriptor2)object).getTypeSignature(); - return label == null || label.length() == 0 ? - getString("_UI_IJavaTypeDescriptor2_type") : //$NON-NLS-1$ - getString("_UI_IJavaTypeDescriptor2_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IJavaTypeDescriptor2.class)) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IListTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IListTypeDescriptorItemProvider.java deleted file mode 100644 index 76d3eb3ed..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IListTypeDescriptorItemProvider.java +++ /dev/null @@ -1,170 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.ResourceLocator; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import org.eclipse.jst.jsf.common.JSFCommonPlugin; - -import org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class IListTypeDescriptorItemProvider - extends ITypeDescriptorItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IListTypeDescriptorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addListSourcePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the List Source feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addListSourcePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IListTypeDescriptor_listSource_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IListTypeDescriptor_listSource_feature", "_UI_IListTypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns IListTypeDescriptor.gif. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IListTypeDescriptor")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IListTypeDescriptor)object).getTypeSignature(); - return label == null || label.length() == 0 ? - getString("_UI_IListTypeDescriptor_type") : //$NON-NLS-1$ - getString("_UI_IListTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IListTypeDescriptor.class)) { - case SymbolPackage.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMapTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMapTypeDescriptorItemProvider.java deleted file mode 100644 index 165629ca9..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMapTypeDescriptorItemProvider.java +++ /dev/null @@ -1,204 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class IMapTypeDescriptorItemProvider - extends ITypeDescriptorItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IMapTypeDescriptorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the prop descriptor - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addMapSourcePropertyDescriptor(object); - addImmutablePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Map Source feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addMapSourcePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IMapTypeDescriptor_mapSource_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IMapTypeDescriptor_mapSource_feature", "_UI_IMapTypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IMAP_TYPE_DESCRIPTOR__MAP_SOURCE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Immutable feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addImmutablePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IMapTypeDescriptor_immutable_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IMapTypeDescriptor_immutable_feature", "_UI_IMapTypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IMAP_TYPE_DESCRIPTOR__IMMUTABLE, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns IMapTypeDescriptor.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image adaptation of the object - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IMapTypeDescriptor")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text rep of the object - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IMapTypeDescriptor)object).getTypeSignature(); - return label == null || label.length() == 0 ? - getString("_UI_IMapTypeDescriptor_type") : //$NON-NLS-1$ - getString("_UI_IMapTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IMapTypeDescriptor.class)) { - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__MAP_SOURCE: - case SymbolPackage.IMAP_TYPE_DESCRIPTOR__IMMUTABLE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} - diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMethodSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMethodSymbolItemProvider.java deleted file mode 100644 index 0d2902168..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMethodSymbolItemProvider.java +++ /dev/null @@ -1,201 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class IMethodSymbolItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IMethodSymbolItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the property sheet descriptors - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addNamePropertyDescriptor(object); - addSignaturePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Name feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ISYMBOL__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Signature feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addSignaturePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IMethodSymbol_signature_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IMethodSymbol_signature_feature", "_UI_IMethodSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IMETHOD_SYMBOL__SIGNATURE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns IMethodSymbol.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image representatino of object - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IMethodSymbol")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text represention of object - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((IMethodSymbol)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_IMethodSymbol_type") : //$NON-NLS-1$ - getString("_UI_IMethodSymbol_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IMethodSymbol.class)) { - case SymbolPackage.IMETHOD_SYMBOL__NAME: - case SymbolPackage.IMETHOD_SYMBOL__SIGNATURE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the EMF resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java deleted file mode 100644 index 3958147ad..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java +++ /dev/null @@ -1,361 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.IDescribedInDetail; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; -import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider; -import org.eclipse.swt.graphics.Image; -import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal; - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol} object. - * <!-- begin-user-doc --> - * @extends IContentProposalProvider - * <!-- end-user-doc --> - * @generated - */ -public class IPropertySymbolItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource, - IContentProposalProvider{ - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public IPropertySymbolItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the property descriptors - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addNamePropertyDescriptor(object); - addTypeDescriptorPropertyDescriptor(object); - addReadablePropertyDescriptor(object); - addWritablePropertyDescriptor(object); - addIntermediatePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Name feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ISYMBOL__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Type Descriptor feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addTypeDescriptorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IObjectSymbol_typeDescriptor_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_typeDescriptor_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IOBJECT_SYMBOL__TYPE_DESCRIPTOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Readable feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addReadablePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IObjectSymbol_readable_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_readable_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IOBJECT_SYMBOL__READABLE, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Writable feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addWritablePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IObjectSymbol_writable_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_writable_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IOBJECT_SYMBOL__WRITABLE, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Intermediate feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addIntermediatePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_IPropertySymbol_intermediate_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_IPropertySymbol_intermediate_feature", "_UI_IPropertySymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.IPROPERTY_SYMBOL__INTERMEDIATE, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns IPropertySymbol.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image rep of object - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IPropertySymbol")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text representation of the object - * <!-- end-user-doc --> - * @generated NOT - */ - public String getText(Object object) { - String label = ((IPropertySymbol)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_IPropertySymbol_type") : //$NON-NLS-1$ - label; - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(IPropertySymbol.class)) { - case SymbolPackage.IPROPERTY_SYMBOL__NAME: - case SymbolPackage.IPROPERTY_SYMBOL__READABLE: - case SymbolPackage.IPROPERTY_SYMBOL__WRITABLE: - case SymbolPackage.IPROPERTY_SYMBOL__INTERMEDIATE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - - /** - * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren(java.lang.Object) - */ - public Collection getChildren(Object object) - { - final List childSymbols = new ArrayList(); - childSymbols.addAll(((IPropertySymbol)object).getTypeDescriptor().getProperties()); - return Collections.unmodifiableList(childSymbols); - } - - /** - * @see org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider#getProposals(Object, org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider.IProposalCreationFactory) - */ - public ICompletionProposal[] getProposals(Object target1, IProposalCreationFactory proposalFactory) - { - return getProposalsInternal((IPropertySymbol) target1, proposalFactory, ""); //$NON-NLS-1$ - } - - private ICompletionProposal[] getProposalsInternal(IPropertySymbol symbol, IProposalCreationFactory proposalFactory, String intermediatePrefix) - { - final List completions = new ArrayList(); - final Image displayImage = - ExtendedImageRegistry.getInstance().getImage(getImage(symbol)); - - if (symbol.isIntermediate()) - { - // see if there's something using this as intermediate completion - List props = symbol.getTypeDescriptor().getProperties(); - - for (final Iterator it = props.iterator(); it.hasNext();) - { - final IPropertySymbol propSymbol = (IPropertySymbol) it.next(); - - if (!propSymbol.isIntermediate()) - { - final String replacementText = "['" + intermediatePrefix + symbol.getName() + "." + propSymbol.getName() + "']"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - completions.add(proposalFactory.createProposal( - replacementText, - replacementText, - null, - displayImage, symbol)); - } - else - { - completions.addAll(Arrays.asList(getProposalsInternal(propSymbol, proposalFactory, intermediatePrefix+symbol.getName()+"."))); //$NON-NLS-1$ - } - } - } - else - { - final String replacementText = intermediatePrefix + symbol.getName(); - final String displayText = symbol.getName(); - - completions.add(createProposal(symbol, replacementText, displayText, displayImage, - proposalFactory)); - } - - return (ICompletionProposal[]) completions.toArray(new CustomCompletionProposal[0]); - - } - - private ICompletionProposal createProposal(IPropertySymbol symbol, - final String replacementText, final String displayText, - final Image displayImage, IProposalCreationFactory proposalFactory) { - String additionalText = null; // TODO: put property value here where possible? - if (symbol instanceof IDescribedInDetail) { - additionalText = ((IDescribedInDetail) symbol).getDetailedDescription(); - } - return proposalFactory.createProposal( - replacementText, - displayText, - additionalText, - displayImage, symbol); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/ITypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/ITypeDescriptorItemProvider.java deleted file mode 100644 index 4c34ed350..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/ITypeDescriptorItemProvider.java +++ /dev/null @@ -1,372 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - - - -/** - * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class ITypeDescriptorItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * @param adapterFactory - * <!-- end-user-doc --> - * @generated - */ - public ITypeDescriptorItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the list of property descriptors - * <!-- end-user-doc --> - * @generated - */ - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addPropertiesPropertyDescriptor(object); - addTypeSignaturePropertyDescriptor(object); - addSuperTypeSignaturesPropertyDescriptor(object); - addInterfaceTypeSignaturesPropertyDescriptor(object); - addTypeSignatureDelegatePropertyDescriptor(object); - addMethodsPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Properties feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addPropertiesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_properties_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_properties_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__PROPERTIES, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Type Signature feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addTypeSignaturePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_typeSignature_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_typeSignature_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__TYPE_SIGNATURE, - false, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Super Type Signatures feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addSuperTypeSignaturesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_superTypeSignatures_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_superTypeSignatures_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Interface Type Signatures feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addInterfaceTypeSignaturesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_interfaceTypeSignatures_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_interfaceTypeSignatures_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Type Signature Delegate feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addTypeSignatureDelegatePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_typeSignatureDelegate_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_typeSignatureDelegate_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Methods feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addMethodsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_methods_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_methods_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__METHODS, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Type Parameter Signatures feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addTypeParameterSignaturesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_typeParameterSignatures_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_typeParameterSignatures_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Jdt Context feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addJdtContextPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_jdtContext_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_jdtContext_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__JDT_CONTEXT, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Enum Type feature. - * <!-- begin-user-doc --> - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void addEnumTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ITypeDescriptor_enumType_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_enumType_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - SymbolPackage.Literals.ITYPE_DESCRIPTOR__ENUM_TYPE, - true, - false, - false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns ITypeDescriptor.gif. - * <!-- begin-user-doc --> - * @param object - * @return the image associated with object or null if not found - * <!-- end-user-doc --> - * @generated - */ - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ITypeDescriptor")); //$NON-NLS-1$ - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * @param object - * @return the text label associated with object or null if not found - * <!-- end-user-doc --> - * @generated - */ - public String getText(Object object) { - String label = ((ITypeDescriptor)object).getTypeSignature(); - return label == null || label.length() == 0 ? - getString("_UI_ITypeDescriptor_type") : //$NON-NLS-1$ - getString("_UI_ITypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(ITypeDescriptor.class)) { - case SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE: - case SymbolPackage.ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES: - case SymbolPackage.ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES: - case SymbolPackage.ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing all of the children that can be created under this object. - * <!-- begin-user-doc --> - * @param newChildDescriptors - * @param object - * <!-- end-user-doc --> - * @generated - */ - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> - * @return the resource locator - * <!-- end-user-doc --> - * @generated - */ - public ResourceLocator getResourceLocator() { - return JSFCommonPlugin.INSTANCE; - } - -} - diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/SymbolItemProviderAdapterFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/SymbolItemProviderAdapterFactory.java deleted file mode 100644 index 6dc9171c9..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/SymbolItemProviderAdapterFactory.java +++ /dev/null @@ -1,534 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.provider; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.edit.provider.ChangeNotifier; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.provider.IChangeNotifier; -import org.eclipse.emf.edit.provider.IDisposable; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.INotifyChangedListener; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.jst.jsf.context.symbol.internal.util.SymbolAdapterFactory; -import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider; - -/** - * This is the factory that is used to provide the interfaces needed to support Viewers. - * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. - * The adapters also support Eclipse property sheets. - * Note that most of the adapters are shared among multiple instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class SymbolItemProviderAdapterFactory extends SymbolAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * This keeps track of the root adapter factory that delegates to this adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected ComposedAdapterFactory parentAdapterFactory; - - /** - * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IChangeNotifier changeNotifier = new ChangeNotifier(); - - /** - * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected Collection supportedTypes = new ArrayList(); - - /** - * This constructs an instance. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * TODO: try to got to Gen function to add custom adapters - * instead of a NOT - * @generated NOT - */ - public SymbolItemProviderAdapterFactory() { - supportedTypes.add(IEditingDomainItemProvider.class); - supportedTypes.add(IStructuredItemContentProvider.class); - supportedTypes.add(ITreeItemContentProvider.class); - supportedTypes.add(IItemLabelProvider.class); - supportedTypes.add(IItemPropertySource.class); - supportedTypes.add(IContentProposalProvider.class); - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBeanInstanceSymbolItemProvider iBeanInstanceSymbolItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol}. - * <!-- begin-user-doc --> - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIBeanInstanceSymbolAdapter() { - if (iBeanInstanceSymbolItemProvider == null) { - iBeanInstanceSymbolItemProvider = new IBeanInstanceSymbolItemProvider(this); - } - - return iBeanInstanceSymbolItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBeanPropertySymbolItemProvider iBeanPropertySymbolItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol}. - * <!-- begin-user-doc --> - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIBeanPropertySymbolAdapter() { - if (iBeanPropertySymbolItemProvider == null) { - iBeanPropertySymbolItemProvider = new IBeanPropertySymbolItemProvider(this); - } - - return iBeanPropertySymbolItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IInstanceSymbol} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IInstanceSymbolItemProvider iInstanceSymbolItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IInstanceSymbol}. - * <!-- begin-user-doc --> - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIInstanceSymbolAdapter() { - if (iInstanceSymbolItemProvider == null) { - iInstanceSymbolItemProvider = new IInstanceSymbolItemProvider(this); - } - - return iInstanceSymbolItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IJavaSymbol} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IJavaSymbolItemProvider iJavaSymbolItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IJavaSymbol}. - * <!-- begin-user-doc --> - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIJavaSymbolAdapter() { - if (iJavaSymbolItemProvider == null) { - iJavaSymbolItemProvider = new IJavaSymbolItemProvider(this); - } - - return iJavaSymbolItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IJavaTypeDescriptor2ItemProvider iJavaTypeDescriptor2ItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2}. - * <!-- begin-user-doc --> - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIJavaTypeDescriptor2Adapter() { - if (iJavaTypeDescriptor2ItemProvider == null) { - iJavaTypeDescriptor2ItemProvider = new IJavaTypeDescriptor2ItemProvider(this); - } - - return iJavaTypeDescriptor2ItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBeanMethodSymbolItemProvider iBeanMethodSymbolItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol}. - * <!-- begin-user-doc --> - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIBeanMethodSymbolAdapter() { - if (iBeanMethodSymbolItemProvider == null) { - iBeanMethodSymbolItemProvider = new IBeanMethodSymbolItemProvider(this); - } - - return iBeanMethodSymbolItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IComponentSymbol} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IComponentSymbolItemProvider iComponentSymbolItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IComponentSymbol}. - * <!-- begin-user-doc --> - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIComponentSymbolAdapter() { - if (iComponentSymbolItemProvider == null) { - iComponentSymbolItemProvider = new IComponentSymbolItemProvider(this); - } - - return iComponentSymbolItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IPropertySymbolItemProvider iPropertySymbolItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol}. - * <!-- begin-user-doc --> - * @return the property symbol adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIPropertySymbolAdapter() { - if (iPropertySymbolItemProvider == null) { - iPropertySymbolItemProvider = new IPropertySymbolItemProvider(this); - } - - return iPropertySymbolItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IMapTypeDescriptorItemProvider iMapTypeDescriptorItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor}. - * <!-- begin-user-doc --> - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIMapTypeDescriptorAdapter() { - if (iMapTypeDescriptorItemProvider == null) { - iMapTypeDescriptorItemProvider = new IMapTypeDescriptorItemProvider(this); - } - - return iMapTypeDescriptorItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IMethodSymbolItemProvider iMethodSymbolItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol}. - * <!-- begin-user-doc --> - * @return the adapter for method symbols - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIMethodSymbolAdapter() { - if (iMethodSymbolItemProvider == null) { - iMethodSymbolItemProvider = new IMethodSymbolItemProvider(this); - } - - return iMethodSymbolItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBoundedMapTypeDescriptorItemProvider iBoundedMapTypeDescriptorItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIBoundedMapTypeDescriptorAdapter() { - if (iBoundedMapTypeDescriptorItemProvider == null) { - iBoundedMapTypeDescriptorItemProvider = new IBoundedMapTypeDescriptorItemProvider(this); - } - - return iBoundedMapTypeDescriptorItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBoundedJavaTypeDescriptorItemProvider iBoundedJavaTypeDescriptorItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIBoundedJavaTypeDescriptorAdapter() { - if (iBoundedJavaTypeDescriptorItemProvider == null) { - iBoundedJavaTypeDescriptorItemProvider = new IBoundedJavaTypeDescriptorItemProvider(this); - } - - return iBoundedJavaTypeDescriptorItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IListTypeDescriptorItemProvider iListTypeDescriptorItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIListTypeDescriptorAdapter() { - if (iListTypeDescriptorItemProvider == null) { - iListTypeDescriptorItemProvider = new IListTypeDescriptorItemProvider(this); - } - - return iListTypeDescriptorItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected IBoundedListTypeDescriptorItemProvider iBoundedListTypeDescriptorItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Adapter createIBoundedListTypeDescriptorAdapter() { - if (iBoundedListTypeDescriptorItemProvider == null) { - iBoundedListTypeDescriptorItemProvider = new IBoundedListTypeDescriptorItemProvider(this); - } - - return iBoundedListTypeDescriptorItemProvider; - } - - /** - * This returns the root adapter factory that contains this factory. - * <!-- begin-user-doc --> - * @return the adapter factory - * <!-- end-user-doc --> - * @generated - */ - public ComposeableAdapterFactory getRootAdapterFactory() { - return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); - } - - /** - * This sets the composed adapter factory that contains this factory. - * <!-- begin-user-doc --> - * @param parentAdapterFactory - * <!-- end-user-doc --> - * @generated - */ - public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { - this.parentAdapterFactory = parentAdapterFactory; - } - - /** - * <!-- begin-user-doc --> - * @param type - * @return true if the factory supports the adapter type - * <!-- end-user-doc --> - * @generated - */ - public boolean isFactoryForType(Object type) { - return supportedTypes.contains(type) || super.isFactoryForType(type); - } - - /** - * This implementation substitutes the factory itself as the key for the adapter. - * <!-- begin-user-doc --> - * @param notifier - * @param type - * @return the adapter - * <!-- end-user-doc --> - * @generated - */ - public Adapter adapt(Notifier notifier, Object type) { - return super.adapt(notifier, this); - } - - /** - * <!-- begin-user-doc --> - * @param object - * @param type - * @return the adapted object - * <!-- end-user-doc --> - * @generated - */ - public Object adapt(Object object, Object type) { - if (isFactoryForType(type)) { - Object adapter = super.adapt(object, type); - if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { - return adapter; - } - } - - return null; - } - - /** - * This adds a listener. - * <!-- begin-user-doc --> - * @param notifyChangedListener - * <!-- end-user-doc --> - * @generated - */ - public void addListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.addListener(notifyChangedListener); - } - - /** - * This removes a listener. - * <!-- begin-user-doc --> - * @param notifyChangedListener - * <!-- end-user-doc --> - * @generated - */ - public void removeListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.removeListener(notifyChangedListener); - } - - /** - * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. - * <!-- begin-user-doc --> - * @param notification - * <!-- end-user-doc --> - * @generated - */ - public void fireNotifyChanged(Notification notification) { - changeNotifier.fireNotifyChanged(notification); - - if (parentAdapterFactory != null) { - parentAdapterFactory.fireNotifyChanged(notification); - } - } - - /** - * This disposes all of the item providers created by this factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void dispose() { - if (iBeanInstanceSymbolItemProvider != null) iBeanInstanceSymbolItemProvider.dispose(); - if (iBeanPropertySymbolItemProvider != null) iBeanPropertySymbolItemProvider.dispose(); - if (iInstanceSymbolItemProvider != null) iInstanceSymbolItemProvider.dispose(); - if (iJavaSymbolItemProvider != null) iJavaSymbolItemProvider.dispose(); - if (iJavaTypeDescriptor2ItemProvider != null) iJavaTypeDescriptor2ItemProvider.dispose(); - if (iBeanMethodSymbolItemProvider != null) iBeanMethodSymbolItemProvider.dispose(); - if (iComponentSymbolItemProvider != null) iComponentSymbolItemProvider.dispose(); - if (iPropertySymbolItemProvider != null) iPropertySymbolItemProvider.dispose(); - if (iMapTypeDescriptorItemProvider != null) iMapTypeDescriptorItemProvider.dispose(); - if (iMethodSymbolItemProvider != null) iMethodSymbolItemProvider.dispose(); - if (iBoundedMapTypeDescriptorItemProvider != null) iBoundedMapTypeDescriptorItemProvider.dispose(); - if (iBoundedJavaTypeDescriptorItemProvider != null) iBoundedJavaTypeDescriptorItemProvider.dispose(); - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/source/UnknownTypeContextSymbolFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/source/UnknownTypeContextSymbolFactory.java deleted file mode 100644 index 4a77889fe..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/source/UnknownTypeContextSymbolFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.source; - -import java.util.List; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jst.jsf.context.symbol.ERuntimeSource; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.InitializedSymbolFactory; -import org.eclipse.jst.jsf.context.symbol.source.AbstractContextSymbolFactory; -import org.eclipse.jst.jsf.context.symbol.source.IAdditionalContextSymbolInfo; - -/** - * Returns an unknown component symbol. - * - * @author cbateman - * - */ -public final class UnknownTypeContextSymbolFactory extends -AbstractContextSymbolFactory -{ - private final InitializedSymbolFactory _factory = new InitializedSymbolFactory(); - - @Override - protected ISymbol internalCreate(final String symbolName, final int scope, - final IAdaptable context, final List problems) - { - return internalCreate(symbolName, scope, context, null); - } - - @Override - protected ISymbol internalCreate(final String symbolName, final int scope, - final IAdaptable context, final List problems, - final IAdditionalContextSymbolInfo info) - { - return _factory.createUnknownComponentSymbol(symbolName, - ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL); - } - @Override - public boolean supports(final IAdaptable context) - { - return true; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IMethodSymbolBasedType.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IMethodSymbolBasedType.java deleted file mode 100644 index ae764bed7..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IMethodSymbolBasedType.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2007 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.util; - -import org.eclipse.jst.jsf.common.internal.types.MethodType; -import org.eclipse.jst.jsf.context.symbol.IMethodSymbol; - -/** - * - * @author cbateman - * - */ -public class IMethodSymbolBasedType extends MethodType -{ - private final IMethodSymbol _methodSymbol; - - /** - * @param methodSymbol - */ - public IMethodSymbolBasedType(IMethodSymbol methodSymbol) - { - super(methodSymbol.getName(), methodSymbol.getSignature()); - _methodSymbol = methodSymbol; - } - - /** - * @return the method symbol - */ - public IMethodSymbol getSymbol() - { - return _methodSymbol; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IObjectSymbolBasedValueType.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IObjectSymbolBasedValueType.java deleted file mode 100644 index 04fbe527d..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IObjectSymbolBasedValueType.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2007 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.util; - -import org.eclipse.jst.jsf.common.internal.types.IAssignable; -import org.eclipse.jst.jsf.common.internal.types.ValueType; -import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IObjectSymbol; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; - -/** - * A value type adapter class for IObjectSymbol's - * - * @author cbateman - * - */ -public class IObjectSymbolBasedValueType extends ValueType -{ - private final IObjectSymbol _symbol; - - /** - * @param symbol - * @return a properly configured instance based on the sub-type of symbol. - * Returns null if symbol is not of an appropriate IObjectSymbol type - */ - public static IObjectSymbolBasedValueType getInstance(ISymbol symbol) - { - if (symbol instanceof IInstanceSymbol) - { - if (((IInstanceSymbol)symbol).getTypeDescriptor() != null) - { - return new IObjectSymbolBasedValueType((IInstanceSymbol) symbol); - } - } - else if (symbol instanceof IPropertySymbol) - { - if (((IPropertySymbol)symbol).getTypeDescriptor() != null) - { - return new IObjectSymbolBasedValueType((IPropertySymbol) symbol); - } - } - - return null; - } - - /** - * Constructor for instance symbols (model objects) - * @param symbol - */ - public IObjectSymbolBasedValueType(final IInstanceSymbol symbol) - { - this(symbol.getTypeDescriptor().getTypeSignature(), - (String[])symbol.getTypeDescriptor().getTypeParameterSignatures().toArray(EMPTY_STRING_ARRAY), - (String[])symbol.getTypeDescriptor().getSuperTypeSignatures().toArray(EMPTY_STRING_ARRAY), - (String[])symbol.getTypeDescriptor().getInterfaceTypeSignatures().toArray(EMPTY_STRING_ARRAY), - symbol.getTypeDescriptor().isEnumType(), - IAssignable.ASSIGNMENT_TYPE_RHS /* variables are not assignable */ - , symbol); - } - - /** - * Constructor for property symbols - * - * @param symbol - */ - public IObjectSymbolBasedValueType(final IPropertySymbol symbol) - { - this(symbol.getTypeDescriptor().getTypeSignature(), - (String[])symbol.getTypeDescriptor().getTypeParameterSignatures().toArray(EMPTY_STRING_ARRAY), - (String[])symbol.getTypeDescriptor().getSuperTypeSignatures().toArray(EMPTY_STRING_ARRAY), - (String[])symbol.getTypeDescriptor().getInterfaceTypeSignatures().toArray(EMPTY_STRING_ARRAY), - symbol.getTypeDescriptor().isEnumType(), - ASSIGNMENT_TYPE_NONE | (symbol.isReadable()?IAssignable.ASSIGNMENT_TYPE_RHS:ASSIGNMENT_TYPE_NONE)|(symbol.isWritable()?IAssignable.ASSIGNMENT_TYPE_LHS:ASSIGNMENT_TYPE_NONE) - , symbol); - } - - private IObjectSymbolBasedValueType(final String signature, - final String[] typeArgs, - final String[] superTypes, - final String[] interfaceTypes, - final boolean isEnumType, - final int assignmentMask, - final IObjectSymbol symbol) - { - super(signature, typeArgs, superTypes, interfaceTypes, isEnumType, assignmentMask); - _symbol = symbol; - } - - /** - * @return the underlying IObjectSymbol - */ - public IObjectSymbol getSymbol() - { - return _symbol; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolAdapterFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolAdapterFactory.java deleted file mode 100644 index dcecf364a..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolAdapterFactory.java +++ /dev/null @@ -1,457 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IComponentSymbol; -import org.eclipse.jst.jsf.context.symbol.IDescribedInDetail; -import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IObjectSymbol; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - - -/** - * <!-- begin-user-doc --> - * The <b>Adapter Factory</b> for the model. - * It provides an adapter <code>createXXX</code> method for each class of the model. - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage - * @generated - */ -public class SymbolAdapterFactory extends AdapterFactoryImpl { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static SymbolPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public SymbolAdapterFactory() { - if (modelPackage == null) { - modelPackage = SymbolPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * <!-- begin-user-doc --> - * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. - * @param object - * <!-- end-user-doc --> - * @return whether this factory is applicable for the type of the object. - * @generated - */ - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the <code>createXXX</code> methods. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected SymbolSwitch modelSwitch = - new SymbolSwitch() { - public Object caseIBeanInstanceSymbol(IBeanInstanceSymbol object) { - return createIBeanInstanceSymbolAdapter(); - } - public Object caseIBeanPropertySymbol(IBeanPropertySymbol object) { - return createIBeanPropertySymbolAdapter(); - } - public Object caseIInstanceSymbol(IInstanceSymbol object) { - return createIInstanceSymbolAdapter(); - } - public Object caseIJavaSymbol(IJavaSymbol object) { - return createIJavaSymbolAdapter(); - } - public Object caseISymbol(ISymbol object) { - return createISymbolAdapter(); - } - public Object caseITypeDescriptor(ITypeDescriptor object) { - return createITypeDescriptorAdapter(); - } - public Object caseIDescribedInDetail(IDescribedInDetail object) { - return createIDescribedInDetailAdapter(); - } - public Object caseIJavaTypeDescriptor2(IJavaTypeDescriptor2 object) { - return createIJavaTypeDescriptor2Adapter(); - } - public Object caseIBeanMethodSymbol(IBeanMethodSymbol object) { - return createIBeanMethodSymbolAdapter(); - } - public Object caseIComponentSymbol(IComponentSymbol object) { - return createIComponentSymbolAdapter(); - } - public Object caseIPropertySymbol(IPropertySymbol object) { - return createIPropertySymbolAdapter(); - } - public Object caseIMapTypeDescriptor(IMapTypeDescriptor object) { - return createIMapTypeDescriptorAdapter(); - } - public Object caseIMethodSymbol(IMethodSymbol object) { - return createIMethodSymbolAdapter(); - } - public Object caseIObjectSymbol(IObjectSymbol object) { - return createIObjectSymbolAdapter(); - } - public Object caseIBoundedTypeDescriptor(IBoundedTypeDescriptor object) { - return createIBoundedTypeDescriptorAdapter(); - } - public Object caseIBoundedMapTypeDescriptor(IBoundedMapTypeDescriptor object) { - return createIBoundedMapTypeDescriptorAdapter(); - } - public Object caseIBoundedJavaTypeDescriptor(IBoundedJavaTypeDescriptor object) { - return createIBoundedJavaTypeDescriptorAdapter(); - } - public Object caseIListTypeDescriptor(IListTypeDescriptor object) { - return createIListTypeDescriptorAdapter(); - } - public Object caseIBoundedListTypeDescriptor(IBoundedListTypeDescriptor object) { - return createIBoundedListTypeDescriptorAdapter(); - } - public Object defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the <code>target</code>. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param target the object to adapt. - * @return the adapter for the <code>target</code>. - * @generated - */ - public Adapter createAdapter(Notifier target) { - return (Adapter)modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol <em>IBean Instance Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol - * @generated - */ - public Adapter createIBeanInstanceSymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol <em>IBean Property Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol - * @generated - */ - public Adapter createIBeanPropertySymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IInstanceSymbol <em>IInstance Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IInstanceSymbol - * @generated - */ - public Adapter createIInstanceSymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IJavaSymbol <em>IJava Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IJavaSymbol - * @generated - */ - public Adapter createIJavaSymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.ISymbol <em>ISymbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.ISymbol - * @generated - */ - public Adapter createISymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor <em>IType Descriptor</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor - * @generated - */ - public Adapter createITypeDescriptorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IDescribedInDetail <em>IDescribed In Detail</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IDescribedInDetail - * @generated - */ - public Adapter createIDescribedInDetailAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2 <em>IJava Type Descriptor2</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2 - * @generated - */ - public Adapter createIJavaTypeDescriptor2Adapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol <em>IBean Method Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol - * @generated - */ - public Adapter createIBeanMethodSymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IComponentSymbol <em>IComponent Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IComponentSymbol - * @generated - */ - public Adapter createIComponentSymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IPropertySymbol <em>IProperty Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IPropertySymbol - * @generated - */ - public Adapter createIPropertySymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor <em>IMap Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor - * @generated - */ - public Adapter createIMapTypeDescriptorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IMethodSymbol <em>IMethod Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IMethodSymbol - * @generated - */ - public Adapter createIMethodSymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IObjectSymbol <em>IObject Symbol</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IObjectSymbol - * @generated - */ - public Adapter createIObjectSymbolAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor <em>IBounded Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor - * @generated - */ - public Adapter createIBoundedTypeDescriptorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor <em>IBounded Map Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor - * @generated - */ - public Adapter createIBoundedMapTypeDescriptorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor <em>IBounded Java Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor - * @generated - */ - public Adapter createIBoundedJavaTypeDescriptorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor <em>IList Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor - * @generated - */ - public Adapter createIListTypeDescriptorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor <em>IBounded List Type Descriptor</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor - * @generated - */ - public Adapter createIBoundedListTypeDescriptorAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * <!-- begin-user-doc --> - * This default implementation returns null. - * <!-- end-user-doc --> - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //SymbolAdapterFactory diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolSwitch.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolSwitch.java deleted file mode 100644 index 92c774619..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolSwitch.java +++ /dev/null @@ -1,579 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.internal.util; - -import java.util.List; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IBoundedTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IComponentSymbol; -import org.eclipse.jst.jsf.context.symbol.IDescribedInDetail; -import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaSymbol; -import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; -import org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.IMethodSymbol; -import org.eclipse.jst.jsf.context.symbol.IObjectSymbol; -import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; -import org.eclipse.jst.jsf.context.symbol.ISymbol; -import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; -import org.eclipse.jst.jsf.context.symbol.SymbolPackage; - - - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage - * @generated - */ -public class SymbolSwitch { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ - - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static SymbolPackage modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public SymbolSwitch() { - if (modelPackage == null) { - modelPackage = SymbolPackage.eINSTANCE; - } - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * @param theEObject - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - public Object doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * @param theEClass - * @param theEObject - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - protected Object doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } - List eSuperTypes = theEClass.getESuperTypes(); - return - eSuperTypes.isEmpty() ? - defaultCase(theEObject) : - doSwitch((EClass)eSuperTypes.get(0), theEObject); - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * @param classifierID - * @param theEObject - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - protected Object doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case SymbolPackage.IBEAN_INSTANCE_SYMBOL: { - IBeanInstanceSymbol iBeanInstanceSymbol = (IBeanInstanceSymbol)theEObject; - Object result = caseIBeanInstanceSymbol(iBeanInstanceSymbol); - if (result == null) result = caseIInstanceSymbol(iBeanInstanceSymbol); - if (result == null) result = caseIDescribedInDetail(iBeanInstanceSymbol); - if (result == null) result = caseIObjectSymbol(iBeanInstanceSymbol); - if (result == null) result = caseISymbol(iBeanInstanceSymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IBEAN_PROPERTY_SYMBOL: { - IBeanPropertySymbol iBeanPropertySymbol = (IBeanPropertySymbol)theEObject; - Object result = caseIBeanPropertySymbol(iBeanPropertySymbol); - if (result == null) result = caseIPropertySymbol(iBeanPropertySymbol); - if (result == null) result = caseIDescribedInDetail(iBeanPropertySymbol); - if (result == null) result = caseIObjectSymbol(iBeanPropertySymbol); - if (result == null) result = caseISymbol(iBeanPropertySymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IINSTANCE_SYMBOL: { - IInstanceSymbol iInstanceSymbol = (IInstanceSymbol)theEObject; - Object result = caseIInstanceSymbol(iInstanceSymbol); - if (result == null) result = caseIObjectSymbol(iInstanceSymbol); - if (result == null) result = caseISymbol(iInstanceSymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IJAVA_SYMBOL: { - IJavaSymbol iJavaSymbol = (IJavaSymbol)theEObject; - Object result = caseIJavaSymbol(iJavaSymbol); - if (result == null) result = caseISymbol(iJavaSymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.ISYMBOL: { - ISymbol iSymbol = (ISymbol)theEObject; - Object result = caseISymbol(iSymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.ITYPE_DESCRIPTOR: { - ITypeDescriptor iTypeDescriptor = (ITypeDescriptor)theEObject; - Object result = caseITypeDescriptor(iTypeDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IDESCRIBED_IN_DETAIL: { - IDescribedInDetail iDescribedInDetail = (IDescribedInDetail)theEObject; - Object result = caseIDescribedInDetail(iDescribedInDetail); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2: { - IJavaTypeDescriptor2 iJavaTypeDescriptor2 = (IJavaTypeDescriptor2)theEObject; - Object result = caseIJavaTypeDescriptor2(iJavaTypeDescriptor2); - if (result == null) result = caseITypeDescriptor(iJavaTypeDescriptor2); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IBEAN_METHOD_SYMBOL: { - IBeanMethodSymbol iBeanMethodSymbol = (IBeanMethodSymbol)theEObject; - Object result = caseIBeanMethodSymbol(iBeanMethodSymbol); - if (result == null) result = caseIDescribedInDetail(iBeanMethodSymbol); - if (result == null) result = caseIMethodSymbol(iBeanMethodSymbol); - if (result == null) result = caseISymbol(iBeanMethodSymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.ICOMPONENT_SYMBOL: { - IComponentSymbol iComponentSymbol = (IComponentSymbol)theEObject; - Object result = caseIComponentSymbol(iComponentSymbol); - if (result == null) result = caseIInstanceSymbol(iComponentSymbol); - if (result == null) result = caseIDescribedInDetail(iComponentSymbol); - if (result == null) result = caseIObjectSymbol(iComponentSymbol); - if (result == null) result = caseISymbol(iComponentSymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IPROPERTY_SYMBOL: { - IPropertySymbol iPropertySymbol = (IPropertySymbol)theEObject; - Object result = caseIPropertySymbol(iPropertySymbol); - if (result == null) result = caseIObjectSymbol(iPropertySymbol); - if (result == null) result = caseISymbol(iPropertySymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IMAP_TYPE_DESCRIPTOR: { - IMapTypeDescriptor iMapTypeDescriptor = (IMapTypeDescriptor)theEObject; - Object result = caseIMapTypeDescriptor(iMapTypeDescriptor); - if (result == null) result = caseITypeDescriptor(iMapTypeDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IMETHOD_SYMBOL: { - IMethodSymbol iMethodSymbol = (IMethodSymbol)theEObject; - Object result = caseIMethodSymbol(iMethodSymbol); - if (result == null) result = caseISymbol(iMethodSymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IOBJECT_SYMBOL: { - IObjectSymbol iObjectSymbol = (IObjectSymbol)theEObject; - Object result = caseIObjectSymbol(iObjectSymbol); - if (result == null) result = caseISymbol(iObjectSymbol); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IBOUNDED_TYPE_DESCRIPTOR: { - IBoundedTypeDescriptor iBoundedTypeDescriptor = (IBoundedTypeDescriptor)theEObject; - Object result = caseIBoundedTypeDescriptor(iBoundedTypeDescriptor); - if (result == null) result = caseITypeDescriptor(iBoundedTypeDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IBOUNDED_MAP_TYPE_DESCRIPTOR: { - IBoundedMapTypeDescriptor iBoundedMapTypeDescriptor = (IBoundedMapTypeDescriptor)theEObject; - Object result = caseIBoundedMapTypeDescriptor(iBoundedMapTypeDescriptor); - if (result == null) result = caseIMapTypeDescriptor(iBoundedMapTypeDescriptor); - if (result == null) result = caseIBoundedTypeDescriptor(iBoundedMapTypeDescriptor); - if (result == null) result = caseITypeDescriptor(iBoundedMapTypeDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IBOUNDED_JAVA_TYPE_DESCRIPTOR: { - IBoundedJavaTypeDescriptor iBoundedJavaTypeDescriptor = (IBoundedJavaTypeDescriptor)theEObject; - Object result = caseIBoundedJavaTypeDescriptor(iBoundedJavaTypeDescriptor); - if (result == null) result = caseIJavaTypeDescriptor2(iBoundedJavaTypeDescriptor); - if (result == null) result = caseIBoundedTypeDescriptor(iBoundedJavaTypeDescriptor); - if (result == null) result = caseITypeDescriptor(iBoundedJavaTypeDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.ILIST_TYPE_DESCRIPTOR: { - IListTypeDescriptor iListTypeDescriptor = (IListTypeDescriptor)theEObject; - Object result = caseIListTypeDescriptor(iListTypeDescriptor); - if (result == null) result = caseITypeDescriptor(iListTypeDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SymbolPackage.IBOUNDED_LIST_TYPE_DESCRIPTOR: { - IBoundedListTypeDescriptor iBoundedListTypeDescriptor = (IBoundedListTypeDescriptor)theEObject; - Object result = caseIBoundedListTypeDescriptor(iBoundedListTypeDescriptor); - if (result == null) result = caseIListTypeDescriptor(iBoundedListTypeDescriptor); - if (result == null) result = caseIBoundedTypeDescriptor(iBoundedListTypeDescriptor); - if (result == null) result = caseITypeDescriptor(iBoundedListTypeDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IBean Instance Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IBean Instance Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIBeanInstanceSymbol(IBeanInstanceSymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IBean Property Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IBean Property Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIBeanPropertySymbol(IBeanPropertySymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IInstance Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IInstance Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIInstanceSymbol(IInstanceSymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IJava Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IJava Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIJavaSymbol(IJavaSymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>ISymbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>ISymbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseISymbol(ISymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IType Descriptor</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IType Descriptor</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseITypeDescriptor(ITypeDescriptor object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IDescribed In Detail</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IDescribed In Detail</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIDescribedInDetail(IDescribedInDetail object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IJava Type Descriptor2</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IJava Type Descriptor2</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIJavaTypeDescriptor2(IJavaTypeDescriptor2 object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IBean Method Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IBean Method Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIBeanMethodSymbol(IBeanMethodSymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IComponent Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IComponent Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIComponentSymbol(IComponentSymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IProperty Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IProperty Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIPropertySymbol(IPropertySymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IMap Type Descriptor</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IMap Type Descriptor</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIMapTypeDescriptor(IMapTypeDescriptor object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IMethod Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IMethod Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIMethodSymbol(IMethodSymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IObject Symbol</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IObject Symbol</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIObjectSymbol(IObjectSymbol object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IBounded Type Descriptor</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IBounded Type Descriptor</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIBoundedTypeDescriptor(IBoundedTypeDescriptor object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IBounded Map Type Descriptor</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IBounded Map Type Descriptor</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIBoundedMapTypeDescriptor(IBoundedMapTypeDescriptor object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IBounded Java Type Descriptor</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IBounded Java Type Descriptor</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIBoundedJavaTypeDescriptor(IBoundedJavaTypeDescriptor object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IList Type Descriptor</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IList Type Descriptor</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIListTypeDescriptor(IListTypeDescriptor object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>IBounded List Type Descriptor</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>IBounded List Type Descriptor</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public Object caseIBoundedListTypeDescriptor(IBoundedListTypeDescriptor object) { - return null; - } - - /** - * Returns the result of interpretting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpretting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public Object defaultCase(EObject object) { - return null; - } - -} //SymbolSwitch - diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/package-info.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/package-info.java deleted file mode 100644 index 3e43b1440..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - * - ********************************************************************************/ - -/** - * EL symbols framework. - * - * <p><b>Provisional API - subject to change</b></p> - */ -package org.eclipse.jst.jsf.context.symbol; diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/IContentProposalProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/IContentProposalProvider.java deleted file mode 100644 index b37344b04..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/IContentProposalProvider.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol.provider; - -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.swt.graphics.Image; - -/** - * Adapts an object to appropriate content proposal - * - * <p><b>Provisional API - subject to change</b></p> - * - * @author cbateman - * - */ -public interface IContentProposalProvider -{ - /** - * @param target - * @param proposalFactory - * @return an content proposal for target or null - * if nothing appropriate can be created - */ - ICompletionProposal[] getProposals(Object target, - IProposalCreationFactory proposalFactory); - - /** - * Implementors of the class can configure certain aspects of the returned - * proposals - * - * @author cbateman - * - */ - public interface IProposalCreationFactory - { - /** - * @param replacementText The text to be replaced - * @param displayText The text to be displayed in the assist window - * @param additionalText The text to be displayed in the "addition info" - * or null - * @param displayImage The image to be displayed or null - * @param sourceObject The original source object. Implementors should - * make no assumptions (i.e. always test instanceof before casting) - * @return a configured completion proposal for the parameters - */ - ICompletionProposal createProposal(final String replacementText, - final String displayText, - final String additionalText, - final Image displayImage, - final Object sourceObject); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/ProposalCreationFactoryAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/ProposalCreationFactoryAdapter.java deleted file mode 100644 index 588a48b01..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/ProposalCreationFactoryAdapter.java +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol.provider; - -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.contentassist.IContextInformation; -import org.eclipse.jst.jsf.context.symbol.provider.IContentProposalProvider.IProposalCreationFactory; -import org.eclipse.swt.graphics.Image; -import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal; - -/** - * Default implementation of the proposal creation factory - * - * <p><b>Provisional API - subject to change</b></p> - * - * @author cbateman - * - */ -public class ProposalCreationFactoryAdapter implements IProposalCreationFactory -{ - /** - * The absolute document offset where the replacement is to occur - */ - protected final int _replacementOffset; - /** - * The number of characters to replace starting from _replaceOffset with - * the proposal. 0 indicates insertion with no replacement - */ - protected final int _replacementLength; - - /** - * @param replacementOffset -- the absolute document offset to do the replacement - * @param replacementLength -- the number of characters to replace or 0 - * for insert without any replacement - */ - public ProposalCreationFactoryAdapter(final int replacementOffset, - final int replacementLength) - { - _replacementOffset = replacementOffset; - _replacementLength = replacementLength; - } - - public ICompletionProposal createProposal(String replacementText, - String displayText, String additionalText, Image displayImage, - Object targetObject) - - { - return createDefaultProposal(replacementText, - _replacementOffset, - _replacementLength, - replacementText.length(), - displayImage, - displayText, - null, - additionalText, - 1); - } - - /** - * Simple factory method for creating a default proposal - * - * @param replacementText - * @param replacementOffset - * @param replacementLength - * @param cursorPosition - * @param displayImage - * @param displayText - * @param contextInfo - * @param additionalText - * @param relevance - * @return a default configuration of the completion proposal based on - * the CustomCompletionProposal - */ - protected static ICompletionProposal - createDefaultProposal(final String replacementText, - final int replacementOffset, - final int replacementLength, - final int cursorPosition, - final Image displayImage, - final String displayText, - final IContextInformation contextInfo, - final String additionalText, - final int relevance) - { - return new CustomCompletionProposal(replacementText, - replacementOffset, - replacementLength, - cursorPosition, - displayImage, - displayText, - contextInfo, - additionalText, - relevance); - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/package-info.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/package-info.java deleted file mode 100644 index c1dcf6340..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/provider/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - * - ********************************************************************************/ - -/** - * Extended providers for the EL symbols framework. - * - * <p><b>Provisional API - subject to change</b></p> - */ -package org.eclipse.jst.jsf.context.symbol.provider; diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractContextSymbolFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractContextSymbolFactory.java deleted file mode 100644 index 149250c71..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractContextSymbolFactory.java +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol.source; - -import java.util.List; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jst.jsf.common.JSFCommonPlugin; -import org.eclipse.jst.jsf.context.symbol.ISymbol; - -/** - * Must be sub-classed by all contextSymbolFactory extension point implementors - * to create context configured symbols - * - * <p><b>Provisional API - subject to change</b></p> - * - * @author cbateman - * - */ -public abstract class AbstractContextSymbolFactory -{ - /** - * @param symbolName -- the symbol name - * @param scope -- the scope of the symbol - * @param context -- the context; must be supported (call supports(context)) - * @param problems -- populated with problems found during symbol construction. - * @return a new ISymbol configured for the name, scope and context or null - * if the arguments are invalid but some other reason a symbol cannot be created. - * @throws IllegalArgumentException if this method is called with context - * for which supports(context) == false or if scope does not conform - * to exactly one of the ISymbolConstants.SYMBOL_SCOPE_* constants - * @deprecated Use the new create method instead. - */ - @Deprecated - public final ISymbol create(final String symbolName, final int scope, final IAdaptable context, final List problems) - { - if (!supports(context)) - { - throw new IllegalArgumentException("Unsupported context"); //$NON-NLS-1$ - } - else if (!ISymbolConstants.isValid(scope)) - { - throw new IllegalArgumentException("Unsupported symbol constant:"+scope); //$NON-NLS-1$ - } - - try - { - return internalCreate(symbolName, scope, context, problems, null); - } - catch (final Exception e) - { - JSFCommonPlugin.log(e, "During execution of context symbol factory: "+this.getClass().getName()); //$NON-NLS-1$ - return null; - } - } - - /** - * The same as create(symbolName, scope, context, problems), except it calls - * the internalCreate with additionalInfo. By default this has the same - * effect. - * - * @param symbolName - * @param scope - * @param context - * @param problems - * @param additionalInfo - * @return the new Symbol - */ - public final ISymbol create(final String symbolName, final int scope, final IAdaptable context, final List problems, final IAdditionalContextSymbolInfo additionalInfo) - { - if (!supports(context)) - { - throw new IllegalArgumentException("Unsupported context"); //$NON-NLS-1$ - } - else if (!ISymbolConstants.isValid(scope)) - { - throw new IllegalArgumentException("Unsupported symbol constant:"+scope); //$NON-NLS-1$ - } - - try - { - return internalCreate(symbolName, scope, context, problems, additionalInfo); - } - catch (final Exception e) - { - JSFCommonPlugin.log(e, "During execution of context symbol factory: "+this.getClass().getName()); //$NON-NLS-1$ - return null; - } - } - - - /** - * Use of this method is DISCOURAGED. It is preferable to move functionality - * to the new internalCreate method and have this one call it with null. - * - * This method will eventually be deprecated and removed - * - * @param symbolName - * @param scope - * @param context - * @param problems -- see problems arg on create - * @return a new ISymbol for the name, scope and context; may return null - * @deprecated Use the new internalCreate instead. Ignore the new - * additionalInfo parameter if you do not need it. - */ - @Deprecated - protected ISymbol internalCreate(final String symbolName, final int scope, final IAdaptable context, final List problems) - { - // do nothing by default - return null; - } - - /** - * NOTE: when migrating to this method, ensure that the other internalCreate - * method in your implementation doesn't create inconsistent behaviour. - * - * @param symbolName - * @param scope - * @param context Will conform to restrictions you set out in supports(). - * @param problems CURRENTLY IGNORED. - * @param additionalInfo May be null - * @since 3.0 - * @return a new ISymbol for the name, scope and context, but with the option - * to also consult additionalInfo passed by the framework. may return null. - */ - protected ISymbol internalCreate(final String symbolName, final int scope, final IAdaptable context, final List problems, final IAdditionalContextSymbolInfo additionalInfo) - { - // by default, call the other internalCreate for backward compatibility. - // implementers can override to do things with the additional info - return internalCreate(symbolName, scope, context, problems); - } - - /** - * @param context - * @return true if this factory supports the context - */ - public abstract boolean supports(IAdaptable context); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractSymbolSourceProviderFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractSymbolSourceProviderFactory.java deleted file mode 100644 index f793f81fe..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractSymbolSourceProviderFactory.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol.source; - -import org.eclipse.core.resources.IProject; - -/** - * Default implementation of ISymbolSourceProviderFactory. Implementors may - * sub-class or create their own separate factory class. - * - * <p><b>Provisional API - subject to change</b></p> - * - * @author cbateman - * - */ -public abstract class AbstractSymbolSourceProviderFactory implements - ISymbolSourceProviderFactory -{ - private IProject _project; - - /** - * Default constructor used by extension manager to create this factory - */ - public AbstractSymbolSourceProviderFactory() - { - // do nothing - } - - /* (non-Javadoc) - * @see org.eclipse.jst.jsf.context.symbol.source.ISymbolSourceProviderFactory#createInstance(org.eclipse.core.resources.IProject) - */ - public final ISymbolSourceProvider createInstance(IProject project) - { - _project = project; - return create(project); - } - - /** - * Override this method to do specialization of provider creation - * - * @param project - * @return the symbol source provider created by the subclass - */ - protected abstract ISymbolSourceProvider create(IProject project); - - /** - * @return the IProject that this source provider is associated with. - */ - protected final IProject getProject() - { - return _project; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/IAdditionalContextSymbolInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/IAdditionalContextSymbolInfo.java deleted file mode 100644 index ad069e7a0..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/IAdditionalContextSymbolInfo.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.context.symbol.source; - - -/** - * Passed to AbstractContextSymbolFactory's to provide additional information. - * All information is optional and need not be used if not needed. - * - * Clients may use but NOT IMPLEMENT. New methods may be added without notice. - * - * @author cbateman - * @since 3.0 - * - */ -public interface IAdditionalContextSymbolInfo -{ - /** - * @return a suggested symbol type signature. May be null. - */ - String getSymbolTypeSignature(); - - /** - * @return the name of the attribute on the current element context that - * contains a value expression that may be used to find type information. - * May be null. - * - */ - String getValueExpressionAttributeName(); -}
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolConstants.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolConstants.java deleted file mode 100644 index 17f36b522..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolConstants.java +++ /dev/null @@ -1,180 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol.source; - -/** - * Defines global constants for symbols - * - * <p><b>Provisional API - subject to change</b></p> - * - * @author cbateman - * - */ -public class ISymbolConstants { - /** - * Mask to indicate all request scope symbols for a particular context - */ - public final static int SYMBOL_SCOPE_REQUEST = 1; - - /** - * Mask to indicate all session scope symbols for a particular context - */ - public final static int SYMBOL_SCOPE_SESSION = 2; - - /** - * Mask to indicate all application scope symbols for a particular context - */ - public final static int SYMBOL_SCOPE_APPLICATION = 4; - - /** - * Mask to indicate all 'none' scope symbols for a particular context - */ - public final static int SYMBOL_SCOPE_NONE = 8; - -//JSF2.0 - /** - * Mask to indicate all 'view' scope symbols for a particular context - */ - public final static int SYMBOL_SCOPE_VIEW = 16; - - /** - * Mask to indicate all 'flash' scope symbols for a particular context - */ - public final static int SYMBOL_SCOPE_FLASH = 32; - - /** - * the string representation for view scope - */ - public final static String SYMBOL_SCOPE_VIEW_STRING = "view"; //$NON-NLS-1$ - - /** - * the string representation for flash scope - */ - public final static String SYMBOL_SCOPE_FLASH_STRING = "flash"; //$NON-NLS-1$ -// - - /** - * All scopes - */ - public final static int SYMBOL_SCOPE_ALL = - SYMBOL_SCOPE_REQUEST - | SYMBOL_SCOPE_SESSION - | SYMBOL_SCOPE_APPLICATION - | SYMBOL_SCOPE_NONE - | SYMBOL_SCOPE_VIEW - | SYMBOL_SCOPE_FLASH; - - /** - * the string representation for request scope - */ - public final static String SYMBOL_SCOPE_REQUEST_STRING = "request"; //$NON-NLS-1$ - - - /** - * the string representation for session scope - */ - public final static String SYMBOL_SCOPE_SESSION_STRING = "session"; //$NON-NLS-1$ - - /** - * the string representation for application scope - */ - public final static String SYMBOL_SCOPE_APPLICATION_STRING = "application"; //$NON-NLS-1$ - - /** - * the string representation for none scope - */ - public final static String SYMBOL_SCOPE_NONE_STRING = "none"; //$NON-NLS-1$ - - /** - * @param scope - * @return true iff scope matches exactly one scope value (excluding ALL) - */ - public static boolean isValid(int scope) - { - return scope == SYMBOL_SCOPE_APPLICATION - || scope == SYMBOL_SCOPE_REQUEST - || scope == SYMBOL_SCOPE_SESSION - || scope == SYMBOL_SCOPE_NONE - || scope == SYMBOL_SCOPE_VIEW - || scope == SYMBOL_SCOPE_FLASH; - } - - /** - * @param scopeMask - * @return the string representation for a scope mask or null if either - * the mask contains more than one scope or the scope is not valid - */ - public static String getStringForMask(final int scopeMask) - { - if (scopeMask == SYMBOL_SCOPE_REQUEST) - { - return SYMBOL_SCOPE_REQUEST_STRING; - } - else if (scopeMask == SYMBOL_SCOPE_SESSION) - { - return SYMBOL_SCOPE_SESSION_STRING; - } - else if (scopeMask == SYMBOL_SCOPE_APPLICATION) - { - return SYMBOL_SCOPE_APPLICATION_STRING; - } - else if (scopeMask == SYMBOL_SCOPE_NONE) - { - return SYMBOL_SCOPE_NONE_STRING; - } - else if (scopeMask == SYMBOL_SCOPE_VIEW) - { - return SYMBOL_SCOPE_VIEW_STRING; - } - else if (scopeMask == SYMBOL_SCOPE_FLASH) - { - return SYMBOL_SCOPE_FLASH_STRING; - } - - return null; - } - - /** - * @param scopeString - * @return the scope mask for the string or -1 if the string is not - * one of SYMBOL_SCOPE_*_STRING - */ - public static int getMaskForString(final String scopeString) - { - if (SYMBOL_SCOPE_REQUEST_STRING.equals(scopeString)) - { - return SYMBOL_SCOPE_REQUEST; - } - else if (SYMBOL_SCOPE_SESSION_STRING.equals(scopeString)) - { - return SYMBOL_SCOPE_SESSION; - } - else if (SYMBOL_SCOPE_APPLICATION_STRING.equals(scopeString)) - { - return SYMBOL_SCOPE_APPLICATION; - } - else if (SYMBOL_SCOPE_NONE_STRING.equals(scopeString)) - { - return SYMBOL_SCOPE_NONE; - } - else if (SYMBOL_SCOPE_VIEW_STRING.equals(scopeString)) - { - return SYMBOL_SCOPE_VIEW; - } - else if (SYMBOL_SCOPE_FLASH_STRING.equals(scopeString)) - { - return SYMBOL_SCOPE_FLASH; - } - return -1; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolSourceProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolSourceProvider.java deleted file mode 100644 index 96dae6546..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolSourceProvider.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol.source; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jst.jsf.context.symbol.ISymbol; - -/** - * Defines a provider that acts as source of symbols. The - * implementor is usually context specific - * - * <p><b>Provisional API - subject to change</b></p> - * - * @author cbateman - * - */ -public interface ISymbolSourceProvider -{ - /** - * @param context - * @param symbolScopeMask - a mask resulting for ORing the SYMBOL_SCOPE_* - * constants to indicate what scopes to retrieve symbols for. - * @return all symbols in context matching symbolScopeMask - */ - ISymbol[] getSymbols(IAdaptable context, int symbolScopeMask); - - /** - * @param prefix - * @param context - * @param symbolScopeMask a mask resulting for ORing the SYMBOL_SCOPE_* - * @return the sub-set of getSymbols that conforms - * to String.startsWith(prefix) in context matching symbolScopeMask. - */ - ISymbol[] getSymbols(String prefix, IAdaptable context, int symbolScopeMask); - - /** - * @param context - * @return true if this provider has symbols for this context - */ - boolean isProvider(IAdaptable context); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolSourceProviderFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolSourceProviderFactory.java deleted file mode 100644 index 87b9558ed..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolSourceProviderFactory.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ - -package org.eclipse.jst.jsf.context.symbol.source; - -import org.eclipse.core.resources.IProject; - -/** - * Implemented by extensions wishing to use symbolSourceProvider extension point - * to contribute designtime symbols to the JSF symbol resolver framework. - * - * Instance factory class must implement a zero-argument default constructor - * - * <p><b>Provisional API - subject to change</b></p> - * - * @author cbateman - * - */ -public interface ISymbolSourceProviderFactory -{ - /** - * @param project - * @return a new instance of a symbol source provider for project - */ - ISymbolSourceProvider createInstance(IProject project); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/package-info.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/package-info.java deleted file mode 100644 index b4a9cc784..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - * - ********************************************************************************/ - -/** - * EL Symbols Framework Extension Point API. - * - * <p><b>Provisional API - subject to change</b></p> - */ -package org.eclipse.jst.jsf.context.symbol.source; |