diff options
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java')
-rw-r--r-- | plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java index 05a8fb6ba3d..ef022fb92fb 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java @@ -1,58 +1,58 @@ -/**
- * Copyright (c) 2011 Mia-Software.
- *
- * 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:
- * Gregoire Dupe (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet
- * Nicolas Guyomar (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet
- * Nicolas Bros (Mia-Software) - Bug 361617 - Deprecation of APIs for the old Facet metamodels
- */
-package org.eclipse.papyrus.emf.facet.efacet.core.internal.catalog;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.emf.facet.efacet.FacetSet;
-import org.eclipse.papyrus.emf.facet.efacet.QuerySet;
-import org.eclipse.papyrus.emf.facet.efacet.catalog.efacetcatalog.EfacetcatalogFactory;
-import org.eclipse.papyrus.emf.facet.efacet.catalog.efacetcatalog.FacetSetCatalog;
-import org.eclipse.papyrus.emf.facet.efacet.catalog.efacetcatalog.QuerySetCatalog;
-import org.eclipse.papyrus.emf.facet.efacet.core.internal.Messages;
-import org.eclipse.papyrus.emf.facet.util.emf.catalog.CatalogSet;
-import org.eclipse.papyrus.emf.facet.util.emf.core.ICatalogManager;
-
-/** @deprecated replaced by {@link EFacetCatalogManager2} for the new eFacet2 metamodel */
-@Deprecated
-public class EFacetCatalogManager implements ICatalogManager {
-
- private final FacetSetCatalog facetSetCatalog;
- private final QuerySetCatalog querySetCatalog;
-
- public EFacetCatalogManager() {
- this.facetSetCatalog = EfacetcatalogFactory.eINSTANCE.createFacetSetCatalog();
- this.facetSetCatalog.setName(Messages.EFacetCatalogManager_FacetSetCatalogName);
- this.querySetCatalog = EfacetcatalogFactory.eINSTANCE.createQuerySetCatalog();
- this.querySetCatalog.setName(Messages.EFacetCatalogManager_QuerySetCatalogName);
- }
-
- public boolean canBeManaged(final EObject root) {
- return root instanceof QuerySet || root instanceof FacetSet;
- }
-
- public void manage(final EObject root) {
- if (root instanceof FacetSet) {
- FacetSet facetSet = (FacetSet) root;
- this.facetSetCatalog.getInstalledEntries().add(facetSet);
- } else if (root instanceof QuerySet) {
- QuerySet querySet = (QuerySet) root;
- this.querySetCatalog.getInstalledEntries().add(querySet);
- }
- }
-
- public void setCatalogSet(final CatalogSet catalogSet) {
- catalogSet.getCatalogs().add(this.facetSetCatalog);
- catalogSet.getCatalogs().add(this.querySetCatalog);
- }
-}
+/** + * Copyright (c) 2011 Mia-Software. + * + * 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: + * Gregoire Dupe (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet + * Nicolas Guyomar (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet + * Nicolas Bros (Mia-Software) - Bug 361617 - Deprecation of APIs for the old Facet metamodels + */ +package org.eclipse.papyrus.emf.facet.efacet.core.internal.catalog; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.emf.facet.efacet.FacetSet; +import org.eclipse.papyrus.emf.facet.efacet.QuerySet; +import org.eclipse.papyrus.emf.facet.efacet.catalog.efacetcatalog.EfacetcatalogFactory; +import org.eclipse.papyrus.emf.facet.efacet.catalog.efacetcatalog.FacetSetCatalog; +import org.eclipse.papyrus.emf.facet.efacet.catalog.efacetcatalog.QuerySetCatalog; +import org.eclipse.papyrus.emf.facet.efacet.core.internal.Messages; +import org.eclipse.papyrus.emf.facet.util.emf.catalog.CatalogSet; +import org.eclipse.papyrus.emf.facet.util.emf.core.ICatalogManager; + +/** @deprecated replaced by {@link EFacetCatalogManager2} for the new eFacet2 metamodel */ +@Deprecated +public class EFacetCatalogManager implements ICatalogManager { + + private final FacetSetCatalog facetSetCatalog; + private final QuerySetCatalog querySetCatalog; + + public EFacetCatalogManager() { + this.facetSetCatalog = EfacetcatalogFactory.eINSTANCE.createFacetSetCatalog(); + this.facetSetCatalog.setName(Messages.EFacetCatalogManager_FacetSetCatalogName); + this.querySetCatalog = EfacetcatalogFactory.eINSTANCE.createQuerySetCatalog(); + this.querySetCatalog.setName(Messages.EFacetCatalogManager_QuerySetCatalogName); + } + + public boolean canBeManaged(final EObject root) { + return root instanceof QuerySet || root instanceof FacetSet; + } + + public void manage(final EObject root) { + if (root instanceof FacetSet) { + FacetSet facetSet = (FacetSet) root; + this.facetSetCatalog.getInstalledEntries().add(facetSet); + } else if (root instanceof QuerySet) { + QuerySet querySet = (QuerySet) root; + this.querySetCatalog.getInstalledEntries().add(querySet); + } + } + + public void setCatalogSet(final CatalogSet catalogSet) { + catalogSet.getCatalogs().add(this.facetSetCatalog); + catalogSet.getCatalogs().add(this.querySetCatalog); + } +} |