Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2019-02-14 07:33:57 -0500
committerJuergen Haug2019-02-14 07:33:57 -0500
commita34d10bd4a6ca2b10024bb585a98439887da447d (patch)
treef6dc676cf500e5fc74a3df962632c9298d2ef275 /plugins
parentd5c8fcc7837872e98bb7164fd591d264b48173a9 (diff)
downloadorg.eclipse.etrice-a34d10bd4a6ca2b10024bb585a98439887da447d.tar.gz
org.eclipse.etrice-a34d10bd4a6ca2b10024bb585a98439887da447d.tar.xz
org.eclipse.etrice-a34d10bd4a6ca2b10024bb585a98439887da447d.zip
Bug 542660 - deactivated resource markers for diagrams
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomDiagramBehavior.java19
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java14
2 files changed, 28 insertions, 5 deletions
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomDiagramBehavior.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomDiagramBehavior.java
index f617288ef..4415024b2 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomDiagramBehavior.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomDiagramBehavior.java
@@ -15,6 +15,7 @@
package org.eclipse.etrice.ui.common.base.editor;
import org.eclipse.gef.ContextMenuProvider;
+import org.eclipse.graphiti.ui.editor.DefaultMarkerBehavior;
import org.eclipse.graphiti.ui.editor.DefaultPersistencyBehavior;
import org.eclipse.graphiti.ui.editor.DefaultUpdateBehavior;
import org.eclipse.graphiti.ui.editor.DiagramBehavior;
@@ -52,4 +53,22 @@ public class CustomDiagramBehavior extends DiagramBehavior {
protected DefaultPersistencyBehavior createPersistencyBehavior() {
return new CustomPersistencyBehavior(this);
}
+
+ @Override
+ protected DefaultMarkerBehavior createMarkerBehavior() {
+ DefaultMarkerBehavior markerBehavior = super.createMarkerBehavior();
+
+ // Bug 542660
+ markerBehavior.disableProblemIndicationUpdate();
+
+ return markerBehavior;
+ }
+
+ @Override
+ public void enableAdapters() {
+ super.enableAdapters();
+
+ // Bug 542660
+ getMarkerBehavior().disableProblemIndicationUpdate();
+ }
}
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java
index 47af71873..4c91be7cd 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/DiagramEditorBase.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.etrice.core.common.ui.linking.GlobalNonPlatformURIEditorOpener;
import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
import org.eclipse.etrice.core.fsm.ui.FSMUiModule;
+import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.ui.editor.DiagramBehavior;
@@ -127,11 +128,14 @@ public abstract class DiagramEditorBase extends DiagramEditor implements IInputU
}
public ModelComponent getModelComponent() {
- Diagram diagram = getDiagramTypeProvider().getDiagram();
- if(diagram != null) {
- EObject bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(diagram);
- if (bo instanceof ModelComponent)
- return (ModelComponent) bo;
+ IDiagramTypeProvider diagramTypeProvider = getDiagramTypeProvider();
+ if(diagramTypeProvider != null) {
+ Diagram diagram = diagramTypeProvider.getDiagram();
+ if(diagram != null) {
+ EObject bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(diagram);
+ if (bo instanceof ModelComponent)
+ return (ModelComponent) bo;
+ }
}
return null;

Back to the top