Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tortmayr committed Aug 30, 2024
1 parent 95b2d58 commit 80bda42
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,37 @@ public final class DefaultTypes {

private DefaultTypes() {}

// HTML elements
public static final String HTML = "html";

// Generic types
public static final String FOREIGN_OBJECT = "foreign-object";
public static final String PRE_RENDERED = "pre-rendered";
public static final String SHAPE_PRE_RENDERED = "shape-pre-rendered";

// Svg Elements
public static final String SVG = "svg";

// Graph Types
public static final String GRAPH = "graph";
public static final String NODE = "node";
public static final String COMPARTMENT = "comp";
public static final String COMPARTMENT_HEADER = "comp:header";
public static final String EDGE = "edge";
public static final String PORT = "port";
public static final String ROUTING_POINT = "routing-point"; // client-side only type by default
public static final String VOLATILE_ROUTING_POINT = "volatile-routing-point"; // client-side only type by default
public static final String LABEL = "label";
public static final String COMPARTMENT = "comp";
public static final String COMPARTMENT_HEADER = "comp:header";

// UI elements
public static final String BUTTON = "button";
public static final String EXPAND_BUTTON = "button:expand";
public static final String ISSUE_MARKER = "marker"; // client-side only type by default

// shapes
// Shapes
public static final String NODE_CIRCLE = "node:circle";
public static final String NODE_RECTANGLE = "node:rectangle";
public static final String NODE_DIAMOND = "node:diamond";
public static final String FOREIGN_OBJECT = "foreign-object";
public static final String PRE_RENDERED = "pre-rendered";
public static final String SHAPE_PRE_RENDERED = "shape-pre-rendered";

public static final String HTML = "html";

// types present on the client
public static final String ROUTING_POINT = "routing-point";
public static final String VOLATILE_ROUTING_POINT = "volatile-routing-point";
public static final String SVG = "svg";
public static final String ISSUE_MARKER = "marker";

public static Map<String, EClass> getDefaultTypeMappings() {
Map<String, EClass> mapping = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ void testGetAllSvgDefaulTypes() throws IOException {
assertType(nodeChidlren.get(1), GCompartment.class, DefaultTypes.COMPARTMENT);
assertType(nodeChidlren.get(2), GLabel.class, DefaultTypes.LABEL);
assertType(nodeChidlren.get(3), GPort.class, DefaultTypes.PORT);

}

private <T extends GModelElement> void assertType(final GModelElement element, final Class<T> clazz,
Expand Down

0 comments on commit 80bda42

Please sign in to comment.