Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2018-11-23 08:08:16 -0500
committerHenrik Rentz-Reichert2018-11-23 11:07:24 -0500
commit5f90e312dbeeffaa057b682e3becb2cee79f6ea0 (patch)
tree714ee95ab99632e9f6a612024ae28458e0c2bce1 /plugins/org.eclipse.etrice.ui.common.base
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.ui.common.base')
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/AbstractPropertyDialog.java1
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/MultiValidator2.java1
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/refactoring/DiagramReferenceUpdater.xtend2
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java9
5 files changed, 7 insertions, 7 deletions
diff --git a/plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF
index fec558aec..54d745155 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.ui.common.base/META-INF/MANIFEST.MF
@@ -40,3 +40,4 @@ Export-Package: org.eclipse.etrice.ui.common.base,
org.eclipse.etrice.ui.common.base.refactoring,
org.eclipse.etrice.ui.common.base.resource,
org.eclipse.etrice.ui.common.base.support
+Automatic-Module-Name: org.eclipse.etrice.ui.common.base
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/AbstractPropertyDialog.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/AbstractPropertyDialog.java
index 8b5007b8e..f25be7e36 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/AbstractPropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/AbstractPropertyDialog.java
@@ -74,6 +74,7 @@ import org.eclipse.xtext.resource.IEObjectDescription;
// note: the FormDialog of org.eclipse.ui.forms.source_3.7.0 requires JavaSE-1.8
// therefore we need to set the BREE of this plug-in also to Java 8
+@SuppressWarnings({"rawtypes", "unchecked"})
public abstract class AbstractPropertyDialog extends FormDialog {
private class GlobalStatus extends ComputedValue {
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/MultiValidator2.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/MultiValidator2.java
index b6f938f1b..17f91d427 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/MultiValidator2.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/dialogs/MultiValidator2.java
@@ -36,6 +36,7 @@ import org.eclipse.core.runtime.IStatus;
* But is aware of converters and pre-validators and treats a last valid state of any value as failure.
*
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public abstract class MultiValidator2 extends MultiValidator {
private int targetCount;
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/refactoring/DiagramReferenceUpdater.xtend b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/refactoring/DiagramReferenceUpdater.xtend
index 5d78aab4c..e371b65db 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/refactoring/DiagramReferenceUpdater.xtend
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/refactoring/DiagramReferenceUpdater.xtend
@@ -29,7 +29,6 @@ import org.eclipse.ltk.core.refactoring.resource.RenameResourceChange
import org.eclipse.xtext.resource.IReferenceDescription
import org.eclipse.xtext.ui.refactoring.ElementRenameArguments
import org.eclipse.xtext.ui.refactoring.IRefactoringUpdateAcceptor
-import org.eclipse.xtext.ui.refactoring.impl.EmfResourceChangeUtil
import org.eclipse.xtext.ui.refactoring.impl.EmfResourceReferenceUpdater
/**
@@ -38,7 +37,6 @@ import org.eclipse.xtext.ui.refactoring.impl.EmfResourceReferenceUpdater
class DiagramReferenceUpdater extends EmfResourceReferenceUpdater {
@Inject DiagramAccessBase diagramAccess
- @Inject EmfResourceChangeUtil changeUtil
override protected createReferenceUpdates(ElementRenameArguments elementRenameArguments, Multimap<URI, IReferenceDescription> resource2references, ResourceSet resourceSet, IRefactoringUpdateAcceptor updateAcceptor, IProgressMonitor monitor) {
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java
index 606e380c3..deef77c22 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java
@@ -41,10 +41,9 @@ public class HelpFeature extends AbstractCustomFeature {
}
public String getFeatureId(ICustomContext context) {
- if (context instanceof ICustomContext) {
- ICustomContext peContext = (ICustomContext) context;
- if (peContext.getPictogramElements() != null && peContext.getPictogramElements().length == 1){
- PictogramElement pe = peContext.getPictogramElements()[0];
+ if (context != null) {
+ if (context.getPictogramElements() != null && context.getPictogramElements().length == 1){
+ PictogramElement pe = context.getPictogramElements()[0];
// don't show help for diagram input
if(getBusinessObjectForPictogramElement(pe) == getBusinessObjectForPictogramElement(getDiagram()))
return null;
@@ -70,7 +69,7 @@ public class HelpFeature extends AbstractCustomFeature {
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- ContextHelpProvider.showHelp(getBoClassName(((ICustomContext) context).getPictogramElements()[0]));
+ ContextHelpProvider.showHelp(getBoClassName(context.getPictogramElements()[0]));
return Status.OK_STATUS;
}

Back to the top