diff --git a/headless-services/sprotty-si-view/build.sh b/headless-services/sprotty-si-view/build.sh
index 30937f582..9be8a5549 100755
--- a/headless-services/sprotty-si-view/build.sh
+++ b/headless-services/sprotty-si-view/build.sh
@@ -23,6 +23,7 @@ cp -R ${client_dir}/samples $static_dir/samples
cp -R ${client_dir}/css $static_dir/css
cp -R ${client_dir}/lib $static_dir/lib
cp -R ${client_dir}/src $static_dir/src
+cp -R ${client_dir}/icon $static_dir/icon
../mvnw \
-f ../pom.xml \
diff --git a/headless-services/sprotty-si-view/client/icon/aggregator.svg b/headless-services/sprotty-si-view/client/icon/aggregator.svg
new file mode 100644
index 000000000..a7a4d65a7
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/aggregator.svg
@@ -0,0 +1,26 @@
+
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/alt-gateway.svg b/headless-services/sprotty-si-view/client/icon/alt-gateway.svg
new file mode 100644
index 000000000..62b53397c
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/alt-gateway.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/bridge.svg b/headless-services/sprotty-si-view/client/icon/bridge.svg
new file mode 100644
index 000000000..3d4cc9c32
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/bridge.svg
@@ -0,0 +1,16 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/chain.svg b/headless-services/sprotty-si-view/client/icon/chain.svg
new file mode 100644
index 000000000..a6455096b
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/chain.svg
@@ -0,0 +1,20 @@
+
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/content-filter.svg b/headless-services/sprotty-si-view/client/icon/content-filter.svg
new file mode 100644
index 000000000..e5139c3a2
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/content-filter.svg
@@ -0,0 +1,23 @@
+
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/enricher.svg b/headless-services/sprotty-si-view/client/icon/enricher.svg
new file mode 100644
index 000000000..445d35c85
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/enricher.svg
@@ -0,0 +1,23 @@
+
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/filter.svg b/headless-services/sprotty-si-view/client/icon/filter.svg
new file mode 100644
index 000000000..9c4a72cb0
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/filter.svg
@@ -0,0 +1,17 @@
+
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/gateway.svg b/headless-services/sprotty-si-view/client/icon/gateway.svg
new file mode 100644
index 000000000..8609a42f4
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/gateway.svg
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/inbound-gateway.svg b/headless-services/sprotty-si-view/client/icon/inbound-gateway.svg
new file mode 100644
index 000000000..8609a42f4
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/inbound-gateway.svg
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/logging-channel-adapter.svg b/headless-services/sprotty-si-view/client/icon/logging-channel-adapter.svg
new file mode 100644
index 000000000..bfbd34ac3
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/logging-channel-adapter.svg
@@ -0,0 +1,19 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/outbound-channel-adapter.svg b/headless-services/sprotty-si-view/client/icon/outbound-channel-adapter.svg
new file mode 100644
index 000000000..691d26b9d
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/outbound-channel-adapter.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/outbound-gateway.svg b/headless-services/sprotty-si-view/client/icon/outbound-gateway.svg
new file mode 100644
index 000000000..b37c0e8fe
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/outbound-gateway.svg
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/router.svg b/headless-services/sprotty-si-view/client/icon/router.svg
new file mode 100644
index 000000000..80f355d49
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/router.svg
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/service-activator.svg b/headless-services/sprotty-si-view/client/icon/service-activator.svg
new file mode 100644
index 000000000..34dc7e1e9
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/service-activator.svg
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/splitter.svg b/headless-services/sprotty-si-view/client/icon/splitter.svg
new file mode 100644
index 000000000..4b659d1f0
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/splitter.svg
@@ -0,0 +1,26 @@
+
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/icon/transformer.svg b/headless-services/sprotty-si-view/client/icon/transformer.svg
new file mode 100644
index 000000000..a41fdd34b
--- /dev/null
+++ b/headless-services/sprotty-si-view/client/icon/transformer.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/headless-services/sprotty-si-view/client/samples/coffee-complete.json b/headless-services/sprotty-si-view/client/samples/coffee-modified.json
similarity index 99%
rename from headless-services/sprotty-si-view/client/samples/coffee-complete.json
rename to headless-services/sprotty-si-view/client/samples/coffee-modified.json
index 402342001..dfbc13315 100644
--- a/headless-services/sprotty-si-view/client/samples/coffee-complete.json
+++ b/headless-services/sprotty-si-view/client/samples/coffee-modified.json
@@ -516,7 +516,7 @@
"countLong": 1549
}
},
- "componentType": "bridge",
+ "componentType": "filter",
"properties": {},
"output": "hotDrinkBarista",
"input": "hotDrinks",
@@ -629,7 +629,7 @@
"countLong": 1559
}
},
- "componentType": "service-activator",
+ "componentType": "transformer",
"properties": {},
"output": "preparedDrinks",
"input": "coldDrinkBarista"
diff --git a/headless-services/sprotty-si-view/client/samples/coffee.json b/headless-services/sprotty-si-view/client/samples/coffee.json
index b087a0773..402342001 100644
--- a/headless-services/sprotty-si-view/client/samples/coffee.json
+++ b/headless-services/sprotty-si-view/client/samples/coffee.json
@@ -629,7 +629,7 @@
"countLong": 1559
}
},
- "componentType": "transformer",
+ "componentType": "service-activator",
"properties": {},
"output": "preparedDrinks",
"input": "coldDrinkBarista"
diff --git a/headless-services/sprotty-si-view/client/src/views.tsx b/headless-services/sprotty-si-view/client/src/views.tsx
index 19d5d4b09..c2529f6c8 100644
--- a/headless-services/sprotty-si-view/client/src/views.tsx
+++ b/headless-services/sprotty-si-view/client/src/views.tsx
@@ -77,7 +77,6 @@ export class LimitedWidthLabelView extends SLabelView {
}
}
-
@injectable()
export class ExampleGraphView extends SGraphView {
@@ -121,123 +120,10 @@ export class EdgeView extends PolylineEdgeView {
@injectable()
export class IntegrationNodeView extends RectangularNodeView {
render(node: Readonly, context: RenderingContext): VNode {
- if (node.componentType==='transformer') {
- return
-
-
-
-
-
- {context.renderChildren(node)}
- ;
- } else if (node.componentType==='aggregator') {
- return
-
-
-
-
-
-
-
-
- {context.renderChildren(node)}
-
- } else if (node.componentType==='splitter') {
- return
-
-
-
-
-
-
-
-
- {context.renderChildren(node)}
- ;
- } else if (node.componentType === 'router') {
- return
-
-
-
-
-
-
-
-
-
-
- {context.renderChildren(node)}
- ;
- } else if (node.componentType === 'service-activator') {
- return
-
-
-
-
-
-
-
-
-
-
-
-
-
- {context.renderChildren(node)}
- ;
- } else if (node.componentType.indexOf('outbound-channel-adapter')>=0) {
- return
-
-
-
-
-
-
-
-
-
- {context.renderChildren(node)}
-
+ if (node.componentType.indexOf('outbound-channel-adapter')>=0) {
+ return nodeIcon(node, context, "outbound-channel-adapter");
} else {
- return
-
- {context.renderChildren(node)}
-
+ return nodeIcon(node, context, node.componentType);
}
}
}
@@ -284,6 +170,15 @@ export class ErrorPortView implements IView {
;
}
}
+
+function nodeIcon(node: Readonly, context: RenderingContext, iconType: string): VNode {
+ const url = `/icon/${iconType}.svg`;
+ return
+
+
+ {context.renderChildren(node)}
+ ;
+}
/*
'+
'' +