Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/experimental/sync/VisualIDMap.java')
-rw-r--r--plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/experimental/sync/VisualIDMap.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/experimental/sync/VisualIDMap.java b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/experimental/sync/VisualIDMap.java
new file mode 100644
index 0000000000..39aed1376f
--- /dev/null
+++ b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/experimental/sync/VisualIDMap.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 THALES GLOBAL SERVICES.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.business.internal.experimental.sync;
+
+import java.util.HashMap;
+
+/**
+ * This map knows of the correspondence between the visual ids of containers and
+ * their elements needed when a container switches to/from the "list" mode. The
+ * visual IDs are referenced by hard coded strings because we do not have access
+ * to the diagram plug-in from here where the edit parts are defined.
+ *
+ * @author Mariot Chauvin
+ */
+public class VisualIDMap extends HashMap<String, String> {
+ private static final long serialVersionUID = 748079557726425012L;
+
+ /**
+ * Construct a new instance.
+ */
+ public VisualIDMap() {
+ // DNodeContainerEditPart <-> DNodeListEditPart
+ addEntry("2002", "2003");
+ // DNodeContainerNameEditPart <-> DNodeListNameEditPart
+ addEntry("5006", "5007");
+ // DNodeContainerViewNodeContainerCompartmentEditPart <->
+ // DNodeListViewNodeContainerCompartment2EditPart
+ addEntry("7001", "7004");
+ // DNodeContainer2EditPart <-> DNodeList2EditPart
+ addEntry("3008", "3009");
+ // DNodeContainer2NameEditPart <-> DNodeListName2EditPart
+ addEntry("5005", "5004");
+ // DNodeContainerViewNodeListCompartment2EditPart <->
+ // DNodeListViewNodeListCompartmentEditPart
+ addEntry("7002", "7003");
+ }
+
+ private void addEntry(String s1, String s2) {
+ put(s1, s2);
+ put(s2, s1);
+ }
+}

Back to the top