Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2019-02-14 07:53:37 -0500
committerGerrit Code Review @ Eclipse.org2019-02-14 07:53:37 -0500
commit186ab8c930c9aa55f087b7fc37fc1a9ac22a2784 (patch)
tree482315bac0fe322d23ffe1798fd43a67bd1ecb82 /plugins
parentf67e66f14cb8e920e05ccb0f434ef648881399e7 (diff)
parenta34d10bd4a6ca2b10024bb585a98439887da447d (diff)
downloadorg.eclipse.etrice-186ab8c930c9aa55f087b7fc37fc1a9ac22a2784.tar.gz
org.eclipse.etrice-186ab8c930c9aa55f087b7fc37fc1a9ac22a2784.tar.xz
org.eclipse.etrice-186ab8c930c9aa55f087b7fc37fc1a9ac22a2784.zip
Merge "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