Просмотр исходного кода

Issue 974 pro (#1522)

* Fixed state color in debug mode

* Changed color
rherrmannr 8 лет назад
Родитель
Сommit
fb4d7a2f02

+ 38 - 38
plugins/org.yakindu.base.gmf.runtime/src/org/yakindu/base/gmf/runtime/highlighting/HighlightingParameters.java

@@ -1,39 +1,39 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.highlighting;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * 
- * @author Alexander Nyssen
- * @author Andreas Muelder - removed grayscaling and fadingtime due to
- *         performance issues
- * 
- */
-public class HighlightingParameters {
-
-	public static final HighlightingParameters DEFAULT = new HighlightingParameters();
-
-	public Color foregroundFadingColor = ColorConstants.red;
-
-	public Color backgroundFadingColor = new Color(null, 255, 128, 128);
-
-	public HighlightingParameters() {
-	}
-
-	public HighlightingParameters(Color foregroundFadingColor, Color backgroundFadingColor) {
-		this.foregroundFadingColor = foregroundFadingColor;
-		this.backgroundFadingColor = backgroundFadingColor;
-	}
-
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.highlighting;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * 
+ * @author Alexander Nyssen
+ * @author Andreas Muelder - removed grayscaling and fadingtime due to
+ *         performance issues
+ * 
+ */
+public class HighlightingParameters {
+
+	public static final HighlightingParameters DEFAULT = new HighlightingParameters();
+
+	public Color foregroundFadingColor = ColorConstants.red;
+
+	public Color backgroundFadingColor = new Color(null, 245, 216, 44);
+
+	public HighlightingParameters() {
+	}
+
+	public HighlightingParameters(Color foregroundFadingColor, Color backgroundFadingColor) {
+		this.foregroundFadingColor = foregroundFadingColor;
+		this.backgroundFadingColor = backgroundFadingColor;
+	}
+
 }

+ 2 - 0
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/model/presenter/AbstractDynamicNotationHandler.java

@@ -74,6 +74,8 @@ public abstract class AbstractDynamicNotationHandler implements IDynamicNotation
 		// Set the new colors
 		STATE_HIGHLIGHT_PARAMS.foregroundFadingColor = new Color(Display.getDefault(), foregroundColor);
 		STATE_HIGHLIGHT_PARAMS.backgroundFadingColor = new Color(Display.getDefault(), backgroundColor);
+		SUSPENDED_PARAMS.backgroundFadingColor = STATE_HIGHLIGHT_PARAMS.backgroundFadingColor;
+		SUSPENDED_PARAMS.foregroundFadingColor = green;
 		VERTEX_TRANSIENT_PARAMS.foregroundFadingColor = new Color(Display.getDefault(), vertexForegroundColor);
 		VERTEX_TRANSIENT_PARAMS.backgroundFadingColor = new Color(Display.getDefault(), vertexBackgroundColor);
 		TRANSITION_PARAMS.foregroundFadingColor = new Color(Display.getDefault(), transitionColor);

+ 1 - 1
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/model/presenter/ExecutionContextVisualizer.java

@@ -57,7 +57,7 @@ public class ExecutionContextVisualizer extends CrossDocumentContentAdapter {
 	public void notifyChanged(final Notification notification) {
 		super.notifyChanged(notification);
 		if (notification.getFeature() == EXECUTION_CONTEXT__ACTIVE_STATES) {
-			highlightStates(notification, HighlightingParameters.DEFAULT);
+			highlightStates(notification, DefaultDynamicNotationHandler.STATE_HIGHLIGHT_PARAMS);
 		} else if (notification.getFeature() == EXECUTION_CONTEXT__EXECUTED_ELEMENTS) {
 			highlight(notification, DefaultDynamicNotationHandler.TRANSITION_PARAMS);
 		} else if (notification.getFeature() == EXECUTION_CONTEXT__SUSPENDED_ELEMENTS) {