From f93b63ee7072c2fac4ca4894f665fb706bec8d2a Mon Sep 17 00:00:00 2001 From: Laurent Wouters Date: Fri, 4 Apr 2014 16:18:34 +0200 Subject: [clean] Retiring org.eclipse.papyrus.infra.table.efacet Signed-off-by: Laurent Wouters --- .../.classpath | 7 --- .../.project | 40 -------------- .../META-INF/MANIFEST.MF | 27 ---------- .../build.properties | 6 --- .../plugin.xml | 31 ----------- .../resources/TableEFacetCustomization.uiCustom | 38 ------------- .../resources/TableEFacetQuery.querySet | 23 -------- .../resources/TableEFacet_Facet.facetSet | 12 ----- .../TableEFacet_FacetCustomization.uiCustom | 13 ----- .../papyrus/infra/table/efacet/Activator.java | 35 ------------ .../queries/AbstractEditorContainerQuery.java | 33 ------------ .../efacet/queries/AbstractGetEditorIconQuery.java | 57 -------------------- .../table/efacet/queries/GetContainedTables.java | 63 ---------------------- .../infra/table/efacet/queries/GetTableIcon.java | 17 ------ .../infra/table/efacet/queries/GetTableName.java | 14 ----- .../table/efacet/queries/IsTableContainer.java | 32 ----------- 16 files changed, 448 deletions(-) delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.classpath delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.project delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/META-INF/MANIFEST.MF delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/build.properties delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/plugin.xml delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetCustomization.uiCustom delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetQuery.querySet delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_Facet.facetSet delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_FacetCustomization.uiCustom delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/Activator.java delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractEditorContainerQuery.java delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractGetEditorIconQuery.java delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetContainedTables.java delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableIcon.java delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableName.java delete mode 100644 deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/IsTableContainer.java diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.classpath deleted file mode 100644 index 45f024e850e..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.project deleted file mode 100644 index f6616caf598..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.project +++ /dev/null @@ -1,40 +0,0 @@ - - - org.eclipse.papyrus.infra.table.efacet - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.emf.facet.common.sdk.core.projectBuilder - - - - - org.eclipse.emf.facet.common.core.builder - - - - - - org.eclipse.emf.facet.common.ProjectNature - org.eclipse.emf.facet.common.sdk.core.ProjectNature - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/META-INF/MANIFEST.MF deleted file mode 100644 index b5aa18a517d..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/META-INF/MANIFEST.MF +++ /dev/null @@ -1,27 +0,0 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.facet.util.core, - org.eclipse.uml2.uml, - org.eclipse.emf.ecore, - org.eclipse.emf.facet.infra.query.core, - org.eclipse.emf.facet.infra.facet.core, - org.eclipse.uml2.types, - org.eclipse.emf.facet.infra.browser.custom.core, - org.eclipse.papyrus.infra.core;bundle-version="0.10.1", - com.google.guava, - org.eclipse.papyrus.views.modelexplorer;bundle-version="0.10.1", - org.eclipse.papyrus.infra.table.efacet.metamodel;bundle-version="0.10.1", - org.eclipse.papyrus.infra.core.sasheditor;bundle-version="0.10.1", - org.eclipse.emf.facet.widgets.table.metamodel;bundle-version="0.2.0" -Bundle-Vendor: Eclipse Modeling Project -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: ., - bin -Bundle-Version: 0.10.1.qualifier -Bundle-Name: Facet for TableEFacet (Incubation) -Bundle-Activator: org.eclipse.papyrus.infra.table.efacet.Activator -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet;singleton: - =true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/build.properties deleted file mode 100644 index 8de5aeeefd0..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - resources/ diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/plugin.xml deleted file mode 100644 index 29d66931e5c..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/plugin.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetCustomization.uiCustom b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetCustomization.uiCustom deleted file mode 100644 index 6f983f6626f..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetCustomization.uiCustom +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetQuery.querySet b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetQuery.querySet deleted file mode 100644 index 5c30d185f42..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetQuery.querySet +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_Facet.facetSet b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_Facet.facetSet deleted file mode 100644 index df451b68448..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_Facet.facetSet +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_FacetCustomization.uiCustom b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_FacetCustomization.uiCustom deleted file mode 100644 index 7f3885c6436..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_FacetCustomization.uiCustom +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/Activator.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/Activator.java deleted file mode 100644 index 333c2d08d68..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/Activator.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.eclipse.papyrus.infra.table.efacet; - -import org.eclipse.core.runtime.Plugin; -import org.osgi.framework.BundleContext; - -/** The activator class controls the plug-in life cycle */ -public class Activator extends Plugin { - - // The shared instance - private static Activator plugin; - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.table.efacet"; //$NON-NLS-1$ - - @Override - public void start(final BundleContext context) throws Exception { - super.start(context); - Activator.plugin = this; - } - - @Override - public void stop(final BundleContext context) throws Exception { - Activator.plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return Activator.plugin; - } -} diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractEditorContainerQuery.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractEditorContainerQuery.java deleted file mode 100644 index fd9ec5ca0ea..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractEditorContainerQuery.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.eclipse.papyrus.infra.table.efacet.queries; - -import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor; -import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageMngr; -import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.core.services.ServicesRegistry; -import org.eclipse.papyrus.infra.core.utils.EditorUtils; -import org.eclipse.papyrus.infra.core.utils.ServiceUtils; - -/** - * - * An abstract class to get the pageMngr - * - */ -//TODO duplicated code from modelexplorer.views -//TODO should be refactored and store into an upper plugin like oep.infra.core.xxx -public abstract class AbstractEditorContainerQuery {//we don't need to implements IJavaModelQuery here - - /** - * - * @return - * @throws ServiceException - */ - protected IPageMngr getPageMngr() throws ServiceException { - // pageMngr can't be static, because there is a new IPageMngr each time we open a Papyrus Editor - final IMultiDiagramEditor papyrusEditor = EditorUtils.getMultiDiagramEditor(); - if(papyrusEditor != null) { - final ServicesRegistry serviceRegistry = papyrusEditor.getServicesRegistry(); - return ServiceUtils.getInstance().getIPageMngr(serviceRegistry); - } - throw new ServiceException("Can't retrieve the IPageMngr"); //$NON-NLS-1$ - } -} diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractGetEditorIconQuery.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractGetEditorIconQuery.java deleted file mode 100644 index bed379fefce..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractGetEditorIconQuery.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.eclipse.papyrus.infra.table.efacet.queries; - -import org.eclipse.papyrus.infra.core.editorsfactory.IPageIconsRegistry; -import org.eclipse.papyrus.infra.core.editorsfactory.IPageIconsRegistryExtended; -import org.eclipse.papyrus.infra.core.editorsfactory.PageIconsRegistry; -import org.eclipse.papyrus.infra.core.services.ServiceException; -import org.eclipse.papyrus.infra.core.utils.EditorUtils; - -/** - * - * An abstract class to get the iconRegistery - * - */ -//TODO duplicated code from modelexplorer.views -//TODO should be refactored and store into an upper plugin like oep.infra.core.xxx -public abstract class AbstractGetEditorIconQuery {//we don't need to implements IJavaModelQuery here - - /** - * the icon registry - */ - private static IPageIconsRegistry editorRegistry; - - /** - * Get the EditorRegistry used to create editor instances. This default - * implementation return the singleton eINSTANCE. This method can be - * subclassed to return another registry. - * - * @return the singleton eINSTANCE of editor registry - */ - protected IPageIconsRegistryExtended getEditorRegistry() { - if(editorRegistry == null) { - editorRegistry = createEditorRegistry(); - } - if(!(editorRegistry instanceof IPageIconsRegistryExtended)) { - throw new RuntimeException("The editor registry do not implement IPageIconsRegistryExtended");////$NON-NLS-1$ - } - return (IPageIconsRegistryExtended)editorRegistry; - } - - /** - * Return the EditorRegistry for nested editor descriptors. Subclass should - * implements this method in order to return the registry associated to the - * extension point namespace. - * - * @return the EditorRegistry for nested editor descriptors - * FIXME : use a deprecated method - */ - protected IPageIconsRegistry createEditorRegistry() { - try { - return EditorUtils.getServiceRegistry().getService(IPageIconsRegistry.class); - } catch (final ServiceException e) { - // Not found, return an empty one which return null for each - // request. - return new PageIconsRegistry(); - } - } -} diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetContainedTables.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetContainedTables.java deleted file mode 100644 index da01cb9d7be..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetContainedTables.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.eclipse.papyrus.infra.table.efacet.queries; - -import java.util.Collection; -import java.util.Iterator; - -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EStructuralFeature.Setting; -import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException; -import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery; -import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList; -import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table; -import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.TablePackage; -import org.eclipse.papyrus.infra.core.utils.PapyrusEcoreUtils; -import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable; -import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage; -import org.eclipse.uml2.uml.Element; - -import com.google.common.base.Function; -import com.google.common.base.Predicate; -import com.google.common.collect.Iterables; -import com.google.common.collect.Sets; - -/** Get the collection of all contained tables */ -//FIXME this query is declared using Element in the querySet -> change into EObject when the EMF-Facet bug will be corrected 365744 - -public class GetContainedTables extends AbstractEditorContainerQuery implements IJavaModelQuery> { - - public Collection evaluate(final Element context, final ParameterValueList parameterValues) throws ModelQueryExecutionException { - final Predicate p = new Predicate() { - - public boolean apply(final EStructuralFeature.Setting setting) { - return setting.getEObject() instanceof Table && setting.getEStructuralFeature() == TablePackage.Literals.TABLE__CONTEXT; - } - }; - final Function f = new Function() { - - public PapyrusTable apply(final EStructuralFeature.Setting setting) { - final Collection references = PapyrusEcoreUtils.getUsages(setting.getEObject()); - final Predicate p2 = new Predicate() { - - public boolean apply(final Setting setting) { - return setting.getEObject() instanceof PapyrusTable && PapyrustablePackage.Literals.PAPYRUS_TABLE__TABLE == setting.getEStructuralFeature(); - } - }; - final Iterator iterator = Iterables.filter(references, p2).iterator(); - if(iterator.hasNext()) { - return (PapyrusTable)iterator.next().getEObject(); - } - return null; - } - - }; - - Iterable transform = Iterables.transform(Iterables.filter(PapyrusEcoreUtils.getUsages(context), p), f); - transform = Iterables.filter(transform, new Predicate() { - - public boolean apply(final PapyrusTable table) { - return table != null; - } - }); - return Sets.newHashSet(transform); - } -} diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableIcon.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableIcon.java deleted file mode 100644 index 6ce506e4251..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableIcon.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.eclipse.papyrus.infra.table.efacet.queries; - -import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException; -import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery; -import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList; -import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable; - -/** Return the path to the icon of the corresponding table */ -public class GetTableIcon extends AbstractGetEditorIconQuery implements IJavaModelQuery { - - /** - * {@inheritDoc} - */ - public String evaluate(final PapyrusTable context, final ParameterValueList parameterValues) throws ModelQueryExecutionException { - return "/" + getEditorRegistry().getEditorURLIcon(context); //$NON-NLS-1$ - } -} diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableName.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableName.java deleted file mode 100644 index e2eb1e215df..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableName.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.eclipse.papyrus.infra.table.efacet.queries; - -import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException; -import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery; -import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList; -import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable; - -/** Return the name for the table */ -public class GetTableName implements IJavaModelQuery { - - public String evaluate(final PapyrusTable context, final ParameterValueList parameterValues) throws ModelQueryExecutionException { - return context.getName() + " (new)"; - } -} diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/IsTableContainer.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/IsTableContainer.java deleted file mode 100644 index 1c7dcc5e103..00000000000 --- a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/IsTableContainer.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.eclipse.papyrus.infra.table.efacet.queries; - -import org.eclipse.emf.ecore.EStructuralFeature.Setting; -import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException; -import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery; -import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList; -import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table; -import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.TablePackage; -import org.eclipse.papyrus.views.modelexplorer.NavigatorUtils; -import org.eclipse.uml2.uml.Element; - -import com.google.common.base.Predicate; - -/** Returns true if the element contains a Table */ -//FIXME this query is declared using Element in the querySet -> change into EObject when the EMF-Facet bug will be corrected 365744 -//FIXME : remove the dependencies on the ModelExplorer -public class IsTableContainer extends AbstractEditorContainerQuery implements IJavaModelQuery { - - /** - * {@inheritDoc} - */ - public Boolean evaluate(final Element context, final ParameterValueList parameterValues) throws ModelQueryExecutionException { - final Predicate p = new Predicate() { - - public boolean apply(final Setting arg0) { - return arg0.getEObject() instanceof Table && arg0.getEStructuralFeature() == TablePackage.Literals.TABLE__CONTEXT; - } - }; - final boolean result = NavigatorUtils.find(context, p); - return NavigatorUtils.find(context, p); - } -} -- cgit v1.2.3