/**
* Initializes the selector map.
*/
private static void initSelectorMap() {
try {
selectorMap.put("CREATE_PACKAGE", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreationMode",
ElementType.class), ElementType.PACKAGE));
selectorMap.put("CREATE_COMPONENT", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreationMode",
ElementType.class), ElementType.COMPONENT));
selectorMap.put("CREATE_CLASS", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreationMode",
ElementType.class), ElementType.CLASS));
selectorMap.put("CREATE_DEPENDENCY", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreateConnectionMode",
RelationType.class), RelationType.DEPENDENCY));
selectorMap.put("CREATE_ASSOCIATION", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreateConnectionMode",
RelationType.class), RelationType.ASSOCIATION));
selectorMap.put("CREATE_COMPOSITION", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreateConnectionMode",
RelationType.class), RelationType.COMPOSITION));
selectorMap.put("CREATE_AGGREGATION", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreateConnectionMode",
RelationType.class), RelationType.AGGREGATION));
selectorMap.put("CREATE_INHERITANCE", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreateConnectionMode",
RelationType.class), RelationType.INHERITANCE));
selectorMap.put("CREATE_INTERFACE_REALIZATION", new MethodCall(
StructureDiagramEditor.class.getMethod("setCreateConnectionMode",
RelationType.class), RelationType.INTERFACE_REALIZATION));
selectorMap.put("RESET_POINTS", new MethodCall(
StructureDiagramEditor.class.getMethod("resetConnectionPoints")));
selectorMap.put("RECT_TO_DIRECT", new MethodCall(
StructureDiagramEditor.class.getMethod("rectilinearToDirect")));
selectorMap.put("DIRECT_TO_RECT", new MethodCall(
StructureDiagramEditor.class.getMethod("directToRectilinear")));
selectorMap.put("NAVIGABLE_TO_SOURCE", new MethodCall(
StructureDiagramEditor.class.getMethod("setNavigability",
RelationEndType.class), RelationEndType.SOURCE));
selectorMap.put("NAVIGABLE_TO_TARGET", new MethodCall(
StructureDiagramEditor.class.getMethod("setNavigability",
RelationEndType.class), RelationEndType.TARGET));
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
}