Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2018-11-23 13:08:16 +0000
committerHenrik Rentz-Reichert2018-11-23 16:07:24 +0000
commit5f90e312dbeeffaa057b682e3becb2cee79f6ea0 (patch)
tree714ee95ab99632e9f6a612024ae28458e0c2bce1 /plugins/org.eclipse.etrice.core.room.ui
parent4c57977d9e3f098ffae44ee5f3373878b351feca (diff)
downloadorg.eclipse.etrice-5f90e312dbeeffaa057b682e3becb2cee79f6ea0.tar.gz
org.eclipse.etrice-5f90e312dbeeffaa057b682e3becb2cee79f6ea0.tar.xz
org.eclipse.etrice-5f90e312dbeeffaa057b682e3becb2cee79f6ea0.zip
reduced warnings in eTrice Java and Xtend sources
Diffstat (limited to 'plugins/org.eclipse.etrice.core.room.ui')
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/RoomEditor.java4
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/util/UIExpressionUtil.xtend4
3 files changed, 5 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF
index d593980bb..e875da7ff 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.core.room.ui/META-INF/MANIFEST.MF
@@ -38,3 +38,4 @@ Export-Package: org.eclipse.etrice.core.ui,
org.eclipse.etrice.core.ui.quickfix,
org.eclipse.etrice.core.ui.util
Bundle-Activator: org.eclipse.etrice.core.ui.RoomUiActivator
+Automatic-Module-Name: org.eclipse.etrice.core.room.ui
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/RoomEditor.java b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/RoomEditor.java
index 245b4502c..62412554b 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/RoomEditor.java
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/editor/RoomEditor.java
@@ -87,9 +87,9 @@ public class RoomEditor extends XtextEditor implements IValidatingEditor {
}
@Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class key) {
+ public <T> T getAdapter(Class<T> key) {
if (key.equals(IContextProvider.class)) {
- return new SelectedModelHelpProvider(this);
+ return key.cast(new SelectedModelHelpProvider(this));
}
return super.getAdapter(key);
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/util/UIExpressionUtil.xtend b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/util/UIExpressionUtil.xtend
index ea60f789a..2caf978d1 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/util/UIExpressionUtil.xtend
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/util/UIExpressionUtil.xtend
@@ -53,7 +53,7 @@ class UIExpressionUtil {
val fsmGenBuilderFactory = RoomUiModule.injector.getInstance(ExtendedFsmGenBuilderFactory)
Map<ModelComponent, GraphContainer> cache = newHashMap
- def public GraphContainer get(ModelComponent mc) {
+ def GraphContainer get(ModelComponent mc) {
if(!cache.containsKey(mc)) {
val builder = fsmGenBuilderFactory.create()
val gc = builder.createTransformedModel(mc)
@@ -76,7 +76,7 @@ class UIExpressionUtil {
val exprProvider = RoomUiModule.getInjector().getInstance(DetailExpressionProvider) => [ prov |
if(ctx instanceof DetailCode) {
prov.owner = ctx.eContainer
- prov.reference = ctx.eContainmentFeature as EReference
+ prov.reference = ctx.eContainmentFeature
} else {
prov.owner = ctx
prov.reference = ref

Back to the top