Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2014-03-24 14:46:32 -0400
committerHenrik Rentz-Reichert2014-03-24 14:46:32 -0400
commit990d7afbb6af11825963425ccda770b19cac08a4 (patch)
treea0f1d3a071095874282295049bcf15abadd5b7a6
parent7f19845bc17cf5f32d17b8964eb4d7b659c9e7ef (diff)
downloadorg.eclipse.etrice-990d7afbb6af11825963425ccda770b19cac08a4.tar.gz
org.eclipse.etrice-990d7afbb6af11825963425ccda770b19cac08a4.tar.xz
org.eclipse.etrice-990d7afbb6af11825963425ccda770b19cac08a4.zip
Bug 400663: add icons and texts to Xtext based DSLs where missing
https://bugs.eclipse.org/400663 Change-Id: I6a53a068fe9d490745685df8e41930b451d0d65b
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_ActorClassConfig.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_ActorInstanceConfig.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_AttrClassConfig.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_AttrInstanceConfig.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_DynamicConfig.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_PortClassConfig.pngbin0 -> 2890 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_PortInstanceConfig.pngbin0 -> 2933 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_ProtocolClassConfig.pngbin0 -> 2935 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_SubSystemConfig.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/Config_doc.icobin0 -> 894 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/config_ConfigModel.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/icons/config_Import.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/plugin.xml2
-rw-r--r--plugins/org.eclipse.etrice.core.config.ui/src/org/eclipse/etrice/core/ui/labeling/ConfigLabelProvider.java151
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_Import.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_Mapping.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_MappingModel.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_SubSystemMapping.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_ThreadMapping.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_doc.icobin0 -> 894 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/plugin.xml2
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/src/org/eclipse/etrice/core/etmap/ui/labeling/ETMapLabelProvider.java22
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_Import.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_NodeClass.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_NodeRef.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalModel.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalSystem.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalThread.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_RuntimeClass.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_doc.icobin0 -> 894 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/plugin.xml2
-rw-r--r--plugins/org.eclipse.etrice.core.etphys.ui/src/org/eclipse/etrice/core/etphys/ui/labeling/ETPhysLabelProvider.java52
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/icons/LogicalThread.gifbin1014 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/icons/LogicalThread.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/icons/ProtocolSemantics.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/icons/Room_doc.icobin0 -> 894 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/icons/SemanticsRule.pngbin0 -> 3829 bytes
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/plugin.xml2
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java24
40 files changed, 245 insertions, 15 deletions
diff --git a/plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF
index 758221e2e..6f62209a8 100644
--- a/plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.etrice.core.config;bundle-version="0.4.0";visibility
org.eclipse.etrice.core.room.ui;bundle-version="0.4.0",
org.eclipse.etrice.core.common.ui;bundle-version="0.4.0"
Import-Package: org.apache.commons.logging,
- org.apache.log4j
+ org.apache.log4j,
+ org.eclipse.etrice.core.genmodel.etricegen
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.etrice.core.ui.contentassist.antlr,
org.eclipse.etrice.core.ui.internal,
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ActorClassConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ActorClassConfig.png
new file mode 100644
index 000000000..b872e5013
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ActorClassConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ActorInstanceConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ActorInstanceConfig.png
new file mode 100644
index 000000000..4f05cdce5
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ActorInstanceConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_AttrClassConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_AttrClassConfig.png
new file mode 100644
index 000000000..bc1ae0213
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_AttrClassConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_AttrInstanceConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_AttrInstanceConfig.png
new file mode 100644
index 000000000..a1db3567f
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_AttrInstanceConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_DynamicConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_DynamicConfig.png
new file mode 100644
index 000000000..6c1b5fe2d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_DynamicConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_PortClassConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_PortClassConfig.png
new file mode 100644
index 000000000..167cacc0b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_PortClassConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_PortInstanceConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_PortInstanceConfig.png
new file mode 100644
index 000000000..524ac27ba
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_PortInstanceConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ProtocolClassConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ProtocolClassConfig.png
new file mode 100644
index 000000000..2f1e885db
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_ProtocolClassConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_SubSystemConfig.png b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_SubSystemConfig.png
new file mode 100644
index 000000000..215f90eea
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_SubSystemConfig.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/Config_doc.ico b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_doc.ico
new file mode 100644
index 000000000..bd0852ebe
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/Config_doc.ico
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/config_ConfigModel.png b/plugins/org.eclipse.etrice.core.config.ui/icons/config_ConfigModel.png
new file mode 100644
index 000000000..2054b16de
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/config_ConfigModel.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/icons/config_Import.png b/plugins/org.eclipse.etrice.core.config.ui/icons/config_Import.png
new file mode 100644
index 000000000..0d060ada2
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config.ui/icons/config_Import.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.config.ui/plugin.xml b/plugins/org.eclipse.etrice.core.config.ui/plugin.xml
index ae1fb2b6e..aaf986a8f 100644
--- a/plugins/org.eclipse.etrice.core.config.ui/plugin.xml
+++ b/plugins/org.eclipse.etrice.core.config.ui/plugin.xml
@@ -10,7 +10,7 @@
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="config"
- icon="icons/config_icon.gif"
+ icon="icons/Config_doc.ico"
id="org.eclipse.etrice.core.Config"
name="Config Editor">
</editor>
diff --git a/plugins/org.eclipse.etrice.core.config.ui/src/org/eclipse/etrice/core/ui/labeling/ConfigLabelProvider.java b/plugins/org.eclipse.etrice.core.config.ui/src/org/eclipse/etrice/core/ui/labeling/ConfigLabelProvider.java
index 05911c24d..2f62eddc0 100644
--- a/plugins/org.eclipse.etrice.core.config.ui/src/org/eclipse/etrice/core/ui/labeling/ConfigLabelProvider.java
+++ b/plugins/org.eclipse.etrice.core.config.ui/src/org/eclipse/etrice/core/ui/labeling/ConfigLabelProvider.java
@@ -4,7 +4,29 @@
package org.eclipse.etrice.core.ui.labeling;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.etrice.core.config.ActorClassConfig;
+import org.eclipse.etrice.core.config.ActorInstanceConfig;
+import org.eclipse.etrice.core.config.AttrClassConfig;
+import org.eclipse.etrice.core.config.AttrInstanceConfig;
+import org.eclipse.etrice.core.config.ConfigModel;
+import org.eclipse.etrice.core.config.DynamicConfig;
+import org.eclipse.etrice.core.config.Import;
+import org.eclipse.etrice.core.config.PortClassConfig;
+import org.eclipse.etrice.core.config.PortInstanceConfig;
+import org.eclipse.etrice.core.config.ProtocolClassConfig;
+import org.eclipse.etrice.core.config.RefPath;
+import org.eclipse.etrice.core.config.SubSystemConfig;
+import org.eclipse.etrice.core.config.util.ConfigUtil;
+import org.eclipse.etrice.core.room.ActorContainerClass;
+import org.eclipse.etrice.core.room.ActorRef;
+import org.eclipse.jface.resource.FontDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.viewers.StyledString.Styler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.RGB;
import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
+import org.eclipse.xtext.ui.label.StylerFactory;
import com.google.inject.Inject;
@@ -15,20 +37,131 @@ import com.google.inject.Inject;
*/
public class ConfigLabelProvider extends DefaultEObjectLabelProvider {
+ private static final String KEYWORD_COLOR = "KEYWORD_COLOR";
+
+ @Inject
+ private StylerFactory stylerFactory;
+ private Styler keywordStyler = null;
+
@Inject
public ConfigLabelProvider(AdapterFactoryLabelProvider delegate) {
super(delegate);
+
+ JFaceResources.getColorRegistry().put(KEYWORD_COLOR, new RGB(50, 50, 50));
}
-/*
- //Labels and icons can be computed like this:
+ String image(ConfigModel mdl) {
+ return "Config_ConfigModel.png";
+ }
+
+ String image(Import mdl) {
+ return "Config_Import.png";
+ }
+
+ String image(ActorClassConfig mdl) {
+ return "Config_ActorClassConfig.png";
+ }
+
+ String image(ActorInstanceConfig mdl) {
+ return "Config_ActorInstanceConfig.png";
+ }
+
+ String image(AttrClassConfig mdl) {
+ return "Config_AttrClassConfig.png";
+ }
+
+ String image(AttrInstanceConfig mdl) {
+ return "Config_AttrInstanceConfig.png";
+ }
+
+ String image(DynamicConfig mdl) {
+ return "Config_DynamicConfig.png";
+ }
+
+ String image(PortClassConfig mdl) {
+ return "Config_PortClassConfig.png";
+ }
+
+ String image(PortInstanceConfig mdl) {
+ return "Config_PortInstanceConfig.png";
+ }
+
+ String image(ProtocolClassConfig mdl) {
+ return "Config_ProtocolClassConfig.png";
+ }
+
+ String image(SubSystemConfig mdl) {
+ return "Config_SubSystemConfig.png";
+ }
+
+ // texts
+
+
+ String text(ConfigModel mdl) {
+ return "ConfigModel "+mdl.getName();
+ }
- String text(MyModel ele) {
- return "my "+ele.getName();
+ StyledString text(Import im) {
+ if (im.getImportedNamespace()==null) {
+ StyledString txt = new StyledString("import model "+im.getImportURI());
+ txt.setStyle(0, 12, getKeywordStyler());
+ return txt;
+ }
+ else {
+ StyledString txt = new StyledString("import ns "+im.getImportedNamespace());
+ txt.setStyle(0, 9, getKeywordStyler());
+ return txt;
+ }
+ }
+
+ String text(ActorClassConfig mdl) {
+ return "Config of ActorClass "+mdl.getActor().getName();
+ }
+
+ String text(ActorInstanceConfig mdl) {
+ ActorContainerClass root = mdl.getSubSystem().getType();
+ RefPath path = mdl.getPath();
+ ActorRef ref = ConfigUtil.getLastActorRef(root, path);
+ return "Config of ActorInstance "+ConfigUtil.getPath(mdl)+" ("+ref.getType().getName()+")";
+ }
+
+ String text(AttrClassConfig mdl) {
+ return "Config of Attribute "+mdl.getAttribute().getName();
+ }
+
+ String text(AttrInstanceConfig mdl) {
+ return "Config of Attribute "+mdl.getAttribute().getName();
+ }
+
+ String text(DynamicConfig mdl) {
+ return "Dynamic Config";
+ }
+
+ String text(PortClassConfig mdl) {
+ ProtocolClassConfig pcc = (ProtocolClassConfig) mdl.eContainer();
+ String kind = (mdl==pcc.getRegular()) ? "regular" : "conjugated";
+ return "Config of "+kind+" PortClass "+pcc.getProtocol().getName();
+ }
+
+ String text(PortInstanceConfig mdl) {
+ return "Config of Port Instance "+mdl.getItem().getName();
+ }
+
+ String text(ProtocolClassConfig mdl) {
+ return "Config of Protocol Class "+mdl.getProtocol().getName();
+ }
+
+ String text(SubSystemConfig mdl) {
+ return "Config of SubSystem "+mdl.getSubSystem().getName();
+ }
+
+
+ private Styler getKeywordStyler() {
+ if (keywordStyler==null) {
+ FontDescriptor font = JFaceResources.getFontDescriptor(JFaceResources.TEXT_FONT);
+ FontDescriptor boldFont = font.setStyle(SWT.BOLD);
+ keywordStyler = stylerFactory.createStyler(boldFont, KEYWORD_COLOR, null);
+ }
+ return keywordStyler;
}
-
- String image(MyModel ele) {
- return "MyModel.gif";
- }
-*/
}
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_Import.png b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_Import.png
new file mode 100644
index 000000000..012bcd943
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_Import.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_Mapping.png b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_Mapping.png
new file mode 100644
index 000000000..e190b3610
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_Mapping.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_MappingModel.png b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_MappingModel.png
new file mode 100644
index 000000000..1bb1bdde1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_MappingModel.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_SubSystemMapping.png b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_SubSystemMapping.png
new file mode 100644
index 000000000..8f5646708
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_SubSystemMapping.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_ThreadMapping.png b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_ThreadMapping.png
new file mode 100644
index 000000000..012a9b6f6
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_ThreadMapping.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_doc.ico b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_doc.ico
new file mode 100644
index 000000000..ca44806f1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/icons/etmap_doc.ico
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/plugin.xml b/plugins/org.eclipse.etrice.core.etmap.ui/plugin.xml
index b28d657e8..168738a03 100644
--- a/plugins/org.eclipse.etrice.core.etmap.ui/plugin.xml
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/plugin.xml
@@ -10,7 +10,7 @@
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="etmap"
- icon="icons/etmap.gif"
+ icon="icons/etmap_doc.ico"
id="org.eclipse.etrice.core.etmap.ETMap"
name="ETMap Editor">
</editor>
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/src/org/eclipse/etrice/core/etmap/ui/labeling/ETMapLabelProvider.java b/plugins/org.eclipse.etrice.core.etmap.ui/src/org/eclipse/etrice/core/etmap/ui/labeling/ETMapLabelProvider.java
index d3f8df6dd..dd85eb52b 100644
--- a/plugins/org.eclipse.etrice.core.etmap.ui/src/org/eclipse/etrice/core/etmap/ui/labeling/ETMapLabelProvider.java
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/src/org/eclipse/etrice/core/etmap/ui/labeling/ETMapLabelProvider.java
@@ -15,6 +15,7 @@ package org.eclipse.etrice.core.etmap.ui.labeling;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.etrice.core.etmap.eTMap.Import;
import org.eclipse.etrice.core.etmap.eTMap.Mapping;
+import org.eclipse.etrice.core.etmap.eTMap.MappingModel;
import org.eclipse.etrice.core.etmap.eTMap.SubSystemMapping;
import org.eclipse.etrice.core.etmap.eTMap.ThreadMapping;
import org.eclipse.jface.resource.FontDescriptor;
@@ -25,6 +26,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
import org.eclipse.xtext.ui.label.StylerFactory;
+
import com.google.inject.Inject;
/**
@@ -45,6 +47,26 @@ public class ETMapLabelProvider extends DefaultEObjectLabelProvider {
super(delegate);
}
+ String image(MappingModel mdl) {
+ return "etmap_MappingModel.png";
+ }
+
+ String image(Import mdl) {
+ return "etmap_Import.png";
+ }
+
+ String image(SubSystemMapping mdl) {
+ return "etmap_SubSystemMapping.png";
+ }
+
+ String image(Mapping mdl) {
+ return "etmap_Mapping.png";
+ }
+
+ String image(ThreadMapping mdl) {
+ return "etmap_ThreadMapping.png";
+ }
+
String text(Mapping m) {
return "Mapping "+m.getLogicalSys().getName()+" -> "+m.getPhysicalSys().getName();
}
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_Import.png b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_Import.png
new file mode 100644
index 000000000..3a68068ae
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_Import.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_NodeClass.png b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_NodeClass.png
new file mode 100644
index 000000000..2bc271783
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_NodeClass.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_NodeRef.png b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_NodeRef.png
new file mode 100644
index 000000000..3ac91b4e3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_NodeRef.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalModel.png b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalModel.png
new file mode 100644
index 000000000..9424d0764
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalModel.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalSystem.png b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalSystem.png
new file mode 100644
index 000000000..01073d06f
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalSystem.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalThread.png b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalThread.png
new file mode 100644
index 000000000..490e4f30c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_PhysicalThread.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_RuntimeClass.png b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_RuntimeClass.png
new file mode 100644
index 000000000..d18e1884a
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_RuntimeClass.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_doc.ico b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_doc.ico
new file mode 100644
index 000000000..3c0484b56
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/icons/etphys_doc.ico
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/plugin.xml b/plugins/org.eclipse.etrice.core.etphys.ui/plugin.xml
index ec9ebd1e6..5b7ac28d6 100644
--- a/plugins/org.eclipse.etrice.core.etphys.ui/plugin.xml
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/plugin.xml
@@ -10,7 +10,7 @@
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="etphys"
- icon="icons/etphys.gif"
+ icon="icons/etphys_doc.ico"
id="org.eclipse.etrice.core.etphys.ETPhys"
name="ETPhys Editor">
</editor>
diff --git a/plugins/org.eclipse.etrice.core.etphys.ui/src/org/eclipse/etrice/core/etphys/ui/labeling/ETPhysLabelProvider.java b/plugins/org.eclipse.etrice.core.etphys.ui/src/org/eclipse/etrice/core/etphys/ui/labeling/ETPhysLabelProvider.java
index 7d39f9b6c..cf4e4373a 100644
--- a/plugins/org.eclipse.etrice.core.etphys.ui/src/org/eclipse/etrice/core/etphys/ui/labeling/ETPhysLabelProvider.java
+++ b/plugins/org.eclipse.etrice.core.etphys.ui/src/org/eclipse/etrice/core/etphys/ui/labeling/ETPhysLabelProvider.java
@@ -14,7 +14,11 @@ package org.eclipse.etrice.core.etphys.ui.labeling;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.etrice.core.etphys.eTPhys.Import;
+import org.eclipse.etrice.core.etphys.eTPhys.NodeClass;
import org.eclipse.etrice.core.etphys.eTPhys.NodeRef;
+import org.eclipse.etrice.core.etphys.eTPhys.PhysicalModel;
+import org.eclipse.etrice.core.etphys.eTPhys.PhysicalSystem;
+import org.eclipse.etrice.core.etphys.eTPhys.PhysicalThread;
import org.eclipse.etrice.core.etphys.eTPhys.RuntimeClass;
import org.eclipse.jface.resource.FontDescriptor;
import org.eclipse.jface.resource.JFaceResources;
@@ -24,6 +28,10 @@ import org.eclipse.swt.SWT;
import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
import org.eclipse.xtext.ui.label.StylerFactory;
+
+
+
+
import com.google.inject.Inject;
/**
@@ -45,6 +53,50 @@ public class ETPhysLabelProvider extends DefaultEObjectLabelProvider {
super(delegate);
}
+ String image(PhysicalModel mdl) {
+ return "etphys_PhysicalModel.png";
+ }
+
+ String image(Import mdl) {
+ return "etphys_Import.png";
+ }
+
+ String image(NodeClass mdl) {
+ return "etphys_NodeClass.png";
+ }
+
+ String image(NodeRef mdl) {
+ return "etphys_NodeRef.png";
+ }
+
+ String image(PhysicalSystem mdl) {
+ return "etphys_PhysicalSystem.png";
+ }
+
+ String image(PhysicalThread mdl) {
+ return "etphys_PhysicalThread.png";
+ }
+
+ String image(RuntimeClass mdl) {
+ return "etphys_RuntimeClass.png";
+ }
+
+ String text(PhysicalModel mdl) {
+ return "PhysicalModel "+mdl.getName();
+ }
+
+ String text(NodeClass mdl) {
+ return "NodeClass "+mdl.getName();
+ }
+
+ String text(PhysicalSystem mdl) {
+ return "PhysicalSystem "+mdl.getName();
+ }
+
+ String text(PhysicalThread mdl) {
+ return "PhysicalThread "+mdl.getName();
+ }
+
String text(RuntimeClass rc) {
return rc.getName()+"("+rc.getThreadModel().getLiteral()+")";
}
diff --git a/plugins/org.eclipse.etrice.core.room.ui/icons/LogicalThread.gif b/plugins/org.eclipse.etrice.core.room.ui/icons/LogicalThread.gif
deleted file mode 100644
index 9767cf936..000000000
--- a/plugins/org.eclipse.etrice.core.room.ui/icons/LogicalThread.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.room.ui/icons/LogicalThread.png b/plugins/org.eclipse.etrice.core.room.ui/icons/LogicalThread.png
new file mode 100644
index 000000000..e720fc4ff
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.room.ui/icons/LogicalThread.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.room.ui/icons/ProtocolSemantics.png b/plugins/org.eclipse.etrice.core.room.ui/icons/ProtocolSemantics.png
new file mode 100644
index 000000000..9457fecbd
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.room.ui/icons/ProtocolSemantics.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.room.ui/icons/Room_doc.ico b/plugins/org.eclipse.etrice.core.room.ui/icons/Room_doc.ico
new file mode 100644
index 000000000..b311e0234
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.room.ui/icons/Room_doc.ico
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.room.ui/icons/SemanticsRule.png b/plugins/org.eclipse.etrice.core.room.ui/icons/SemanticsRule.png
new file mode 100644
index 000000000..ef1e1043d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.room.ui/icons/SemanticsRule.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.core.room.ui/plugin.xml b/plugins/org.eclipse.etrice.core.room.ui/plugin.xml
index 3c8b3e617..5b91bdaac 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/plugin.xml
+++ b/plugins/org.eclipse.etrice.core.room.ui/plugin.xml
@@ -11,7 +11,7 @@
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="room"
- icon="icons/etrice_doc16.ico"
+ icon="icons/Room_doc.ico"
id="org.eclipse.etrice.core.Room"
name="Room Editor">
</editor>
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java
index 5487ad9f5..3ee55f319 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java
@@ -28,6 +28,7 @@ import org.eclipse.etrice.core.room.EnumerationType;
import org.eclipse.etrice.core.room.ExternalPort;
import org.eclipse.etrice.core.room.ExternalType;
import org.eclipse.etrice.core.room.Import;
+import org.eclipse.etrice.core.room.InSemanticsRule;
import org.eclipse.etrice.core.room.LogicalSystem;
import org.eclipse.etrice.core.room.LogicalThread;
import org.eclipse.etrice.core.room.Message;
@@ -36,10 +37,12 @@ import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.PortOperation;
import org.eclipse.etrice.core.room.PrimitiveType;
import org.eclipse.etrice.core.room.ProtocolClass;
+import org.eclipse.etrice.core.room.ProtocolSemantics;
import org.eclipse.etrice.core.room.RefinedState;
import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.etrice.core.room.SAP;
import org.eclipse.etrice.core.room.SPP;
+import org.eclipse.etrice.core.room.SemanticsRule;
import org.eclipse.etrice.core.room.ServiceImplementation;
import org.eclipse.etrice.core.room.SimpleState;
import org.eclipse.etrice.core.room.StandardOperation;
@@ -202,7 +205,7 @@ public class RoomLabelProvider extends DefaultEObjectLabelProvider {
return "actorInstanceMapping.gif";
}
String image(LogicalThread lt) {
- return "LogicalThread.gif";
+ return "LogicalThread.png";
}
String image(AnnotationType at) {
@@ -221,6 +224,14 @@ public class RoomLabelProvider extends DefaultEObjectLabelProvider {
return "EnumLiteral.gif";
}
+ String image(ProtocolSemantics ps) {
+ return "ProtocolSemantics.png";
+ }
+
+ String image(SemanticsRule ps) {
+ return "SemanticsRule.png";
+ }
+
// custom labels
StyledString text(Import im) {
@@ -374,6 +385,17 @@ public class RoomLabelProvider extends DefaultEObjectLabelProvider {
return lit.getName()+" = "+lit.getLiteralValue();
}
+ String text(ProtocolSemantics ps) {
+ return "ProtocolSemantics";
+ }
+
+ String text(SemanticsRule rule) {
+ if (rule instanceof InSemanticsRule)
+ return "in: "+rule.getMsg();
+ else
+ return "out: "+rule.getMsg();
+ }
+
private Styler getKeywordStyler() {
if (keywordStyler==null) {
FontDescriptor font = JFaceResources.getFontDescriptor(JFaceResources.TEXT_FONT);

Back to the top