Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Le Fevre - CEA2015-07-17 13:16:25 +0000
committerGerrit Code Review @ Eclipse.org2015-07-17 14:04:15 +0000
commit83f2e29ec43eb448e781e8ca25d47663f24dd311 (patch)
tree20778ec90119b9afe4e70b252945e8fd9806ba95 /extraplugins/uml/org.eclipse.papyrus.uml.diagram.dnd.smart/src/org/eclipse/papyrus/uml/diagram/dnd/smart/graph/model/EClassComparator.java
parent9c6d2832593b3f3c94d11b0144d0cf11fe16f409 (diff)
downloadorg.eclipse.papyrus-83f2e29ec43eb448e781e8ca25d47663f24dd311.tar.gz
org.eclipse.papyrus-83f2e29ec43eb448e781e8ca25d47663f24dd311.tar.xz
org.eclipse.papyrus-83f2e29ec43eb448e781e8ca25d47663f24dd311.zip
Bug 469690: [drag and drop]: implement an inhouse graph methodology.
-initial implementation that redefines in the plugin the code embedded here https://git.eclipse.org/r/#/c/46240/ Change-Id: I3be59e12c3027e7718eca6153e55d5892c0f868b Signed-off-by: Francois Le Fevre - CEA <francois.le-fevre@cea.fr>
Diffstat (limited to 'extraplugins/uml/org.eclipse.papyrus.uml.diagram.dnd.smart/src/org/eclipse/papyrus/uml/diagram/dnd/smart/graph/model/EClassComparator.java')
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.diagram.dnd.smart/src/org/eclipse/papyrus/uml/diagram/dnd/smart/graph/model/EClassComparator.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.diagram.dnd.smart/src/org/eclipse/papyrus/uml/diagram/dnd/smart/graph/model/EClassComparator.java b/extraplugins/uml/org.eclipse.papyrus.uml.diagram.dnd.smart/src/org/eclipse/papyrus/uml/diagram/dnd/smart/graph/model/EClassComparator.java
new file mode 100644
index 00000000000..8d4ad9d40c6
--- /dev/null
+++ b/extraplugins/uml/org.eclipse.papyrus.uml.diagram.dnd.smart/src/org/eclipse/papyrus/uml/diagram/dnd/smart/graph/model/EClassComparator.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.dnd.smart.graph.model;
+
+import java.util.Comparator;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * Comparator of two ECLass
+ * @author flefevre
+ *
+ */
+public class EClassComparator implements Comparator<EClass>{
+
+ public int compare(EClass e1, EClass e2) {
+ if(e1.getName()!=null){
+ return e1.getName().compareTo(e2.getName());
+ }
+ else{
+ return -1;
+ }
+ }
+}

Back to the top