Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2017-09-25 04:18:38 -0400
committerBenoit Maggi2017-09-25 09:36:34 -0400
commit308ee2350b151160c1cae2645c72c2e37fb5b7ca (patch)
tree0ba7d35dff69eb1110088198355dbf7b5f70fd96 /plugins/facet
parentde45f839cfb1ab408dd92bf0d9b072dd16053d83 (diff)
downloadorg.eclipse.papyrus-308ee2350b151160c1cae2645c72c2e37fb5b7ca.tar.gz
org.eclipse.papyrus-308ee2350b151160c1cae2645c72c2e37fb5b7ca.tar.xz
org.eclipse.papyrus-308ee2350b151160c1cae2645c72c2e37fb5b7ca.zip
Bug 521475 - [userxp] the following plugin logs directly into the
console with System.out.println - replace system.out by logs - fix some quality warnings - add missing licenses - export all package at runtime Change-Id: I02879db9ff9ec91cbda577303910420c5a8b0463 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
Diffstat (limited to 'plugins/facet')
-rw-r--r--plugins/facet/editor/org.eclipse.papyrus.emf.facet.custom.metamodel.editor/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/custom/presentation/EMFUtil.java124
1 files changed, 0 insertions, 124 deletions
diff --git a/plugins/facet/editor/org.eclipse.papyrus.emf.facet.custom.metamodel.editor/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/custom/presentation/EMFUtil.java b/plugins/facet/editor/org.eclipse.papyrus.emf.facet.custom.metamodel.editor/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/custom/presentation/EMFUtil.java
index 176fdf695c3..67516332c13 100644
--- a/plugins/facet/editor/org.eclipse.papyrus.emf.facet.custom.metamodel.editor/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/custom/presentation/EMFUtil.java
+++ b/plugins/facet/editor/org.eclipse.papyrus.emf.facet.custom.metamodel.editor/src/org/eclipse/papyrus/emf/facet/custom/metamodel/v0_2_0/custom/presentation/EMFUtil.java
@@ -75,107 +75,6 @@ public class EMFUtil {
}
/**
- * Find and return all the metaclasses of the given resource set.
- *
- * @return a list of all the metaclasses of elements contained in the
- * resource set, and metaclasses in resources in which metaclasses
- * of elements in the resource set have been found
- */
- // public static Set<EClass> findAllClasses(final Set<Resource> browsedResources) {
- // // TODO: try to read from PackageRegistry?
- // // resourceSet.getPackageRegistry().keySet()
- //
- // // TODO: find EClasses in EPackages
- //
- // /*
- // * the list of metaclasses is a tree set so that it is always sorted and
- // * each class is guaranteed to appear at most once.
- // */
- // final TreeSet<EClass> classes = new TreeSet<EClass>(new Comparator<EClass>() {
- // public int compare(final EClass c1, final EClass c2) {
- // return ModelUtils.getMetaclassQualifiedName(c1).compareTo(
- // ModelUtils.getMetaclassQualifiedName(c2));
- // }
- // });
- //
- // /** The resources, in a HashSet to get constant time access */
- // final HashSet<Resource> resources = new HashSet<Resource>();
- // /**
- // * Resources that were discovered outside of the resource set, and which
- // * contain metaclasses used in the model
- // */
- // final ArrayList<Resource> newResources = new ArrayList<Resource>();
- //
- // resources.addAll(browsedResources);
- //
- // for (final Resource resource : browsedResources) {
- // final TreeIterator<EObject> allContents = resource.getAllContents();
- // while (allContents.hasNext()) {
- // final EObject eObject = allContents.next();
- // if (eObject instanceof EClass) {
- // final EClass eClass = (EClass) eObject;
- // classes.add(eClass);
- // } else {
- // // EPackage ePackage = eObject.eClass().getEPackage();
- // // System.out.println("package : " + ePackage.getNsURI());
- //
- // final EClass eClass = eObject.eClass();
- // if (eClass != null) {
- // // make sure all model elements have their metaclass in
- // // the list
- // classes.add(eClass);
- //
- // // if we discovered a new resource, then memorize it
- // final Resource res = eClass.eResource();
- // if (res != null && !resources.contains(res)) {
- // resources.add(res);
- // newResources.add(res);
- // }
- // }
- // }
- // }
- // }
- //
- // /*
- // * Now, add the classes that reside in resources that we discovered and
- // * are not part of the resource set. For example, the UML models have
- // * metaclasses in 'http://www.eclipse.org/uml2/2.1.0/UML', which is not
- // * in the resource set.
- // */
- // addAll(classes, newResources);
- // newResources.clear();
- //
- // final ArrayList<EClass> newClasses = new ArrayList<EClass>();
- //
- // for (final EClass eClass : classes) {
- // final EList<EClass> allSuperTypes = eClass.getEAllSuperTypes();
- // for (final EClass superclass : allSuperTypes) {
- // newClasses.add(superclass);
- //
- // // if we discovered a new resource, then memorize it
- // final Resource resource = superclass.eResource();
- // if (resource != null && !resources.contains(resource)) {
- // resources.add(resource);
- // newResources.add(resource);
- // }
- // }
- // }
- //
- // for (final EClass eClass : newClasses) {
- // classes.add(eClass);
- // }
- //
- // // add classes in newly discovered resources (again)
- // addAll(classes, newResources);
- //
- // // for (Resource resource : resources) {
- // // System.out.println(resource.getURI().toString());
- // // }
- //
- // return classes;
- // }
-
- /**
* Add all the classes in <code>resources</code> to the <code>classes</code> set
*/
private static void addAll(final Set<EClass> classes, final List<Resource> resources) {
@@ -277,16 +176,6 @@ public class EMFUtil {
return null;
}
- // public static EClass findMetaclassWithName(final String metaclassFullyQualifiedName,
- // final List<EClass> metaclasses) {
- // for (EClass eClass : metaclasses) {
- // if (metaclassFullyQualifiedName.equals(ModelUtils.getMetaclassQualifiedName(eClass))) {
- // return eClass;
- // }
- // }
- // return null;
- // }
-
/**
* @return the name of the package in the package registry with this nsURI,
* or <code>null</code> if not found
@@ -338,19 +227,6 @@ public class EMFUtil {
return eObject;
}
}
-
- // Resource resource;
- // resource.
- // TreeIterator<Notifier> allContents = resourceSet.getAllContents();
- // while (allContents.hasNext()) {
- // Notifier notifier = allContents.next();
- // if (notifier instanceof EObject) {
- // EObject eObject = (EObject) notifier;
- // if (uri.equals(EcoreUtil.getURI(eObject))) {
- // return eObject;
- // }
- // }
- // }
return null;
}

Back to the top