Commit 84cfef97 authored by Simon Barner's avatar Simon Barner
Browse files

- Avoid leaking SWT colors

refs 2709
parent 8dfe5f38
AF3ComponentUIActivator.java 8f74f89c6dd44b6396a051fbbb3ac41484f82b92 GREEN
DefaultStyle.java 519063d1a3e2e3c9b3a61e09dadfb5e301e102e4 GREEN
DefaultStyle.java 64d6d28d47a01d7ceb5339b5c49eada72ebd38cf YELLOW
......@@ -15,8 +15,9 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
import org.fortiss.af3.component.model.Channel;
import org.fortiss.af3.component.model.Component;
......@@ -28,31 +29,26 @@ import org.fortiss.af3.component.model.Component;
public final class DefaultStyle {
/** {@link Component} background color for strong causality. */
public static Color STRONGLY_CAUSAL_COMPONENT_BACKGROUND = createColor(159, 186, 221);
public static Color STRONGLY_CAUSAL_COMPONENT_BACKGROUND = getColor(159, 186, 221);
/** {@link Component} background color for strong causality. */
public static Color WEAKLY_CAUSAL_COMPONENT_BACKGROUND = createColor(250, 232, 131);
public static Color WEAKLY_CAUSAL_COMPONENT_BACKGROUND = getColor(250, 232, 131);
/** {@link Component} background color for component sub-structure.. */
public static Color SUBSTRUCTURE_COMPONENT_BACKGROUND = createColor(224, 192, 192);
public static Color SUBSTRUCTURE_COMPONENT_BACKGROUND = getColor(224, 192, 192);
/** {@link Component} background color for component sub-structure.. */
public static Color NON_ARCHITECTURE_COMPONENT_BACKGROUND = createColor(131, 224, 131);
public static Color NON_ARCHITECTURE_COMPONENT_BACKGROUND = getColor(131, 224, 131);
/** {@link Component} foreground color. */
public static Color COMPONENT_FOREGROUND = createColor(14, 46, 88);
public static Color COMPONENT_FOREGROUND = getColor(14, 46, 88);
/** {@link Channel} simulation label color. */
public static Color SIMULATION_LABEL_COLOR = createColor(255, 51, 0);
public static Color SIMULATION_LABEL_COLOR = getColor(255, 51, 0);
/** {@link Component} active color. */
public static Color COMPONENT_ACTIVE_COLOR = createColor(255, 170, 51);
public static Color COMPONENT_ACTIVE_COLOR = getColor(255, 170, 51);
/** {@link Component} background color. */
public static Color COMPONENT_BACKGROUND = WEAKLY_CAUSAL_COMPONENT_BACKGROUND;
/** Creates a {@link Color}. */
public static Color createColor(int r, int g, int b) {
return new Color(Display.getDefault(), r, g, b);
}
}
CodeSpecificationEditor.java 56fcfa471d36c0268bef41d9c5d36dce6796f5ac RED
CodeSpecificationEditor.java 461d9b6668dfeeb0debd34e9f725d49cc8bbbea2 RED
CodeSpecificationEditorBinding.java a0cff3224d8d0755e948188c2480e528c82eb590 GREEN
ComponentArchitectureEditorBinding.java 262e86525dda985d7baaee6a90150d34389b34ca GREEN
ComponentStructureEditor.java 11aee03b8db78a93a7704a8b8240b84a6d192012 GREEN
......@@ -6,4 +6,3 @@ ComponentStructureEditorBinding.java 06c025c71dc820498a1702a46e18a35b63045a60 GR
LayoutComponentCommand.java 368e05dfe2dd95059f2b10bbd872287fac5213e1 RED
PackComponentCommand.java 98d5095e07cda4a8e29b85b8da1c2260c270db45 GREEN
PackSelectionToComponent.java d275a8a63381c48c8840a06b18753f2960c459f6 GREEN
SourcePartitionScanner.java a1673701daadb2436745e2cf361b2902dde88a59 RED
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.editor;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import static org.fortiss.af3.component.ui.editor.code.ErrorAnnotation.ERROR_RGB;
import static org.fortiss.af3.component.ui.editor.code.ErrorAnnotation.ERROR_TYPE;
import static org.fortiss.tooling.kernel.ui.util.DataBindingUtils.performComplexTextBinding;
......@@ -42,7 +43,6 @@ import org.eclipse.swt.custom.ST;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.layout.FillLayout;
......@@ -149,8 +149,7 @@ public class CodeSpecificationEditor extends EditorBase<CodeSpecification> {
// set what layer this type is on
fOverviewRuler.setAnnotationTypeLayer(ERROR_TYPE, 3);
// set what color is used on the overview ruler for the type
fOverviewRuler.setAnnotationTypeColor(ERROR_TYPE,
new Color(Display.getDefault(), ERROR_RGB));
fOverviewRuler.setAnnotationTypeColor(ERROR_TYPE, getColor(ERROR_RGB));
// create the actual source viewer
codeViewer =
......@@ -178,7 +177,7 @@ public class CodeSpecificationEditor extends EditorBase<CodeSpecification> {
// ap.addTextStyleStrategy(ERROR_TYPE, new UnderlineStrategy(SWT.UNDERLINE_SINGLE));
// -> Try and see if it behaves as expected.
ap.addAnnotationType(ERROR_TYPE);
ap.setAnnotationTypeColor(ERROR_TYPE, new Color(Display.getDefault(), ERROR_RGB));
ap.setAnnotationTypeColor(ERROR_TYPE, getColor(ERROR_RGB));
codeViewer.addPainter(ap);
// setup the editor concerning syntax highlighting and content assist
......
AnnotationConfiguration.java 088cabbbcb9229685e1ffb2dcc34b83e05c0461a GREEN
AnnotationHover.java 358cf5c6da186c300662c5132bc0e8c6e20b7ca8 GREEN
AnnotationMarkerAccess.java f0fdeb10d89a3611249f5334ea76e518baca710f GREEN
CodeEditorConfiguration.java 26743ecd99fd01042c81bbae5616bcfc1ec1c0e3 RED
ColorCache.java bcb67403f3c853ab15bb7f82653a80f1f97b6a36 GREEN
CodeEditorConfiguration.java 33a6316f9a589745b3c0b66fa3bada5191368156 RED
ColorCache.java a94bcf443a540c7814341ed16fc116d4e1ab26b3 YELLOW
ErrorAnnotation.java a7ec0ad49bb7965c79e99d15844d8a3377572025 GREEN
UndoRedo.java 7009ef378aafc33f1fb8e4c94227e9104ded7ce3 GREEN
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.editor.code;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import static org.fortiss.af3.component.ui.utils.ComponentFieldAssistUtils.getInputPortNames;
import static org.fortiss.af3.component.ui.utils.ComponentFieldAssistUtils.getOutputPortNames;
import static org.fortiss.af3.expression.ui.utils.ExpressionFieldAssistUtils.getAllConstructors;
......@@ -76,10 +77,10 @@ public class CodeEditorConfiguration extends SourceViewerConfiguration {
}
/** Color constant used to display code dark red. */
protected Color DARK_RED = new Color(null, 128, 0, 0);
protected Color DARK_RED = getColor(128, 0, 0);
/** Color constant used to display code dark blue. */
protected Color DARK_BLUE = new Color(null, 0, 0, 128);
protected Color DARK_BLUE = getColor(0, 0, 128);
/** Detector used to create the scanners. */
protected IWordDetector detector = new IWordDetector() {
......
......@@ -18,7 +18,6 @@ package org.fortiss.af3.component.ui.editor.code;
import org.eclipse.jface.text.source.ISharedTextColors;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
/**
* Simple color cache used for error highlighting.
......@@ -29,7 +28,7 @@ public class ColorCache implements ISharedTextColors {
/** {@inheritDoc} */
@Override
public Color getColor(RGB rgb) {
return new Color(Display.getDefault(), rgb);
return getColor(rgb);
}
/** {@inheritDoc} */
......
AllocationEditPart.java 3256a0093638f840ea57c9fb54e571d405aa56d9 GREEN
AllocationEditPart.java 173575e42990784c0312ca548778ce9a0299c2f8 YELLOW
ChannelDeploymentEditPart.java 1994a0a4435f3ef8543074f74cf12e056d6cdc9f GREEN
ComponentArchitectureSubDiagramEditPart.java ba4d0a1ba43d557730ab6edd153cd90ab1728bd9 GREEN
ComponentDeploymentEditPart.java 086b7790e22403001b45749e62f281a71e5a8fab GREEN
......
......@@ -15,9 +15,10 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.deployment.ui.neweditor;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import org.eclipse.draw2d.IFigure;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
import org.fortiss.af3.deployment.model.ComponentAllocation;
import org.fortiss.tooling.base.ui.editpart.allocation.AllocationConnectionEditPartBase;
import org.fortiss.tooling.base.ui.layout.RectangleGridLayoutDiagramConfiguration;
......@@ -30,8 +31,7 @@ import org.fortiss.tooling.base.ui.layout.RectangleGridLayoutDiagramConfiguratio
public class AllocationEditPart extends AllocationConnectionEditPartBase<ComponentAllocation> {
/** Foreground color for the connection. */
public static final Color ALLOCATION_FOREGROUND_COLOR = new Color(Display.getDefault(), 200, 0,
0);
public static final Color ALLOCATION_FOREGROUND_COLOR = getColor(200, 0, 0);
/** Constructor. */
protected AllocationEditPart(ComponentAllocation modelElement) {
......
......@@ -4,6 +4,6 @@ DseSaveableView.java 22835778bfb4feab96f3a3b6cc2ce84ea966566d RED
HelpComposite.java 0f7de17a0363d5250e6ccb2f6e91a5f6a0553688 RED
HelpView.java fd7e374fdc92d6c30df9a743e6b2fdfe45a3e262 RED
SynthesisViewBase.java cbb419af6e1248f58af2450ed313b36e4e4faf3e RED
SynthesisViewBase2.java 9b72b416b38e4179ed8bc41999b245fcb24b82b4 RED
SynthesisViewBase2.java 8b11fa8b649a1d720748958da7302efebae77c24 RED
SynthesisViewBase2Composite.java 4a6b0b05e47167dd63f8338abc9e3b2bc846b12b RED
UtilizationPatternBackend.java 981a53812a541b5b478f065429e35f8d5929ad7a RED
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.ui.perspective.generic;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import static org.fortiss.af3.exploration.util.DesignSpaceExplorationModelElementFactory.createExplorationSpecification;
import static org.fortiss.af3.exploration.util.ExplorationUtils.convertRuleSetsToExplorationSpec;
import static org.fortiss.af3.exploration.util.ExplorationUtils.convertToMap;
......@@ -48,7 +49,6 @@ import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
......@@ -142,10 +142,11 @@ public abstract class SynthesisViewBase2 extends DSEPerspectiveViewBase {
}
});
List<RuleSet> objectives = ruleSets.stream()
.filter(s -> s.getExplorationTargets().stream()
.anyMatch(t -> t instanceof ExplorationObjective))
.collect(Collectors.toList());
List<RuleSet> objectives =
ruleSets.stream()
.filter(s -> s.getExplorationTargets().stream()
.anyMatch(t -> t instanceof ExplorationObjective))
.collect(Collectors.toList());
synthesisComposite.objectiveSetsTable.setInput(objectives);
synthesisComposite.constraintSetsTable.setContentProvider(new ArrayContentProvider());
......@@ -181,10 +182,11 @@ public abstract class SynthesisViewBase2 extends DSEPerspectiveViewBase {
}
});
List<RuleSet> constraints = ruleSets.stream()
.filter(s -> s.getExplorationTargets().stream()
.anyMatch(t -> t instanceof ExplorationConstraint))
.collect(Collectors.toList());
List<RuleSet> constraints =
ruleSets.stream()
.filter(s -> s.getExplorationTargets().stream()
.anyMatch(t -> t instanceof ExplorationConstraint))
.collect(Collectors.toList());
synthesisComposite.constraintSetsTable.setInput(constraints);
synthesisComposite.constraintSetsTable
......@@ -203,10 +205,12 @@ public abstract class SynthesisViewBase2 extends DSEPerspectiveViewBase {
synthesisComposite.explorationTimeoutText.addVerifyListener(new TimeoutVerifyListener());
synthesisComposite.validityTimeoutText.addVerifyListener(new TimeoutVerifyListener());
synthesisComposite.explorationTimeoutText.addKeyListener(new TimeoutKeyListener());
synthesisComposite.constraintSetsTable.addSelectionChangedListener(
new ConstraintObjectiveRuleSetListener(synthesisComposite.constraintsTree));
synthesisComposite.objectiveSetsTable.addSelectionChangedListener(
new ConstraintObjectiveRuleSetListener(synthesisComposite.objectivesTree));
synthesisComposite.constraintSetsTable
.addSelectionChangedListener(new ConstraintObjectiveRuleSetListener(
synthesisComposite.constraintsTree));
synthesisComposite.objectiveSetsTable
.addSelectionChangedListener(new ConstraintObjectiveRuleSetListener(
synthesisComposite.objectivesTree));
synthesisComposite.btnCheckValidity.addSelectionListener(new CheckValidityListener());
}
......@@ -258,17 +262,17 @@ public abstract class SynthesisViewBase2 extends DSEPerspectiveViewBase {
display.syncExec(() -> {
if(expSolution.getSolutionState() == SolutionState.OPTIMAL ||
expSolution.getSolutionState() == SolutionState.OPTIMIZED) {
synthesisComposite.validityResult.setBackground(new Color(null, 0, 255, 0));
synthesisComposite.validityResult.setBackground(getColor(0, 255, 0));
} else if(expSolution.getSolutionState() == SolutionState.UNSAT) {
synthesisComposite.validityResult.setBackground(new Color(null, 255, 0, 0));
synthesisComposite.validityResult.setBackground(getColor(255, 0, 0));
} else {
synthesisComposite.validityResult
.setBackground(new Color(null, 255, 255, 0));
synthesisComposite.validityResult.setBackground(getColor(255, 255, 0));
}
});
} catch(Z3Exception e) {
status = new Status(IStatus.ERROR, AF3ExplorationUIActivator.PLUGIN_ID,
"Deployment synthesis failed.", e);
status =
new Status(IStatus.ERROR, AF3ExplorationUIActivator.PLUGIN_ID,
"Deployment synthesis failed.", e);
MessageDialog.openError(new Shell(), "Error", "Unknown error in solver.");
} catch(Exception e) {
e.printStackTrace();
......@@ -389,8 +393,10 @@ public abstract class SynthesisViewBase2 extends DSEPerspectiveViewBase {
return;
int numberOfObjectives = 0;
for(RuleSet rs : subsets) {
List<ExplorationTarget<?>> collect = rs.getExplorationTargets().stream()
.filter(e -> e instanceof ExplorationObjective<?>).collect(Collectors.toList());
List<ExplorationTarget<?>> collect =
rs.getExplorationTargets().stream()
.filter(e -> e instanceof ExplorationObjective<?>)
.collect(Collectors.toList());
numberOfObjectives += collect.size();
}
int userTimeout = 0;
......@@ -402,13 +408,14 @@ public abstract class SynthesisViewBase2 extends DSEPerspectiveViewBase {
@SuppressWarnings("unused") boolean vincent = true;
}
if(numberOfObjectives == 0) {
synthesisComposite.totalTimeoutLabel
.setText(synthesisComposite.explorationTimeoutText.getText() + "s");
synthesisComposite.totalTimeoutLabel.setText(synthesisComposite.explorationTimeoutText
.getText() + "s");
return;
}
totalTimeout = (userTimeout * numberOfObjectives);
final String string = synthesisComposite.explorationTimeoutText.getText() + "s x " +
numberOfObjectives + " Objectives => Total timeout of " + totalTimeout + "s";
final String string =
synthesisComposite.explorationTimeoutText.getText() + "s x " + numberOfObjectives +
" Objectives => Total timeout of " + totalTimeout + "s";
synthesisComposite.totalTimeoutLabel.setText(string);
}
......
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.ui.perspective.process;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import static org.fortiss.af3.exploration.ui.AF3ExplorationUIActivator.getImageDescriptor;
import static org.fortiss.af3.exploration.ui.perspective.process.IProcessManager.EProcessStep.CONSTRAINTS;
import static org.fortiss.af3.exploration.ui.perspective.process.IProcessManager.EProcessStep.DEPLOYMENT_SYNTHESIS;
......@@ -313,11 +314,11 @@ public class ProcessManager implements IProcessManager {
/** {@inheritDoc} */
@Override
public Color getColorForProcessStep(EProcessStep processStep) {
Color homeColor = new Color(null, 157, 4, 0);
Color constraintsColor = new Color(null, 0, 0, 0);
Color synthesisColor = new Color(null, 0, 61, 180);
Color visColor = new Color(null, 28, 120, 8);
Color helpColor = new Color(null, 205, 149, 12);
Color homeColor = getColor(157, 4, 0);
Color constraintsColor = getColor(0, 0, 0);
Color synthesisColor = getColor(0, 61, 180);
Color visColor = getColor(28, 120, 8);
Color helpColor = getColor(205, 149, 12);
switch(processStep) {
case HOME:
......
Container4D.java 9458f4f82550aa6937c6e0c33e15e7fe879ca8ff RED
Editor4DBackend.java 8d7a66d087cc816db651e8d0f3716e25f65c0cf7 RED
Editor4DBackend.java 3f455d28be050962374d370eb496843b5a2d215b RED
Editor4DVisualization.java 6d0eeef246db4021433ce2d292ca3557deb0deb0 RED
......@@ -16,6 +16,7 @@
package org.fortiss.af3.exploration.ui.perspective.visualization.visualizations.fourD;
import static org.eclipse.swt.SWT.Paint;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import static org.fortiss.af3.exploration.ui.util.ExplorationUiUtil.get4DimColor;
import static org.fortiss.af3.exploration.ui.util.ExplorationUiUtil.getColor;
import static org.fortiss.tooling.graphicsGL.util.Graph3DModelElementFactory.graphPoint;
......@@ -36,7 +37,6 @@ import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
......@@ -206,7 +206,7 @@ public class Editor4DBackend extends Editor4DGUI {
for(int i = 0; i < nrOfColors; ++i) {
double p = ExplorationUiUtil.getGradientPrecentage(max, min, values.get(i));
RGB color = getColor(p);
gc.setBackground(new Color(e.display, color));
gc.setBackground(getColor(color));
gc.fillRectangle(i * width, 0, width, height);
}
......
DataDictionaryEditor.java 1692a9f5ebb1751d5f4bcf0e406cdf6816ebb2e3 GREEN
DataDictionaryEditor.java 077b9614ffe8e977e45473a6019ed10e4c82e7f2 YELLOW
DataDictionaryEditorBinding.java 0afd69998e31b243361ecbbd6a4691f8ee72b3a9 GREEN
DataDictionaryEvaluatorBackend.java 8ac259f436097fdc51252be25ef7d134ae4a44ab GREEN
DataDictionaryEvaluatorBinding.java ed402d190105d8be10c1b126f98b3de447387033 GREEN
......
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.expression.ui.editor;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import static org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils.getEObjectElements;
import static org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils.getFirstElement;
......@@ -37,10 +38,8 @@ import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.PlatformUI;
import org.fortiss.af3.expression.model.DataDictionary;
......@@ -225,12 +224,11 @@ public class DataDictionaryEditor extends EditorBase<DataDictionary> implements
/** Set the foreground color of the provided {@link ViewerCell} */
private void setCellTextColor(ViewerCell cell, boolean isSamplingTimeFunction) {
Device device = Display.getCurrent();
if((isSamplingTimeFunction)) {
Color blue = new Color(device, 0, 0, 255);
Color blue = getColor(0, 0, 255);
cell.setForeground(blue);
} else {
Color black = new Color(device, 0, 0, 0);
Color black = getColor(0, 0, 0);
cell.setForeground(black);
}
}
......
......@@ -21,7 +21,7 @@ RationaleConstraintUI.java c66bd566855aad5829fae55f14677a37afe6a0cf GREEN
RequirementContainsTestSuiteConstraintUI.java 15a9a1488eba7110e018854c547761ea90273fde GREEN
RequirementExistsConstraintUI.java afcf14d56b9ee8c380498607c604ec886f0f685f GREEN
RequirementImplementedCorrectlyConstraintUI.java 155c38ab5ab81f31312f0e452e7b3b8cd022df45 GREEN
ReviewConstraintUI.java c9acd4ddf5b1471c7e4b8abf2c0eb912077e5dcf GREEN
ReviewConstraintUI.java 49580d5990261fa88295deb528190072d18f54af YELLOW
ReviewNonConflictingConstraintUI.java 867b947839c0c46abfff080ba7839997d20453cd GREEN
ReviewUnambiguousConstraintUI.java 061bfe7a0975c127267aa36934d3b06f467d4e3b GREEN
ReviewVerifiableConstraintUI.java a7cb0906481a8816195a9d7107a9d94300061bc2 GREEN
......
package org.fortiss.af3.mira.ui.constraints;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import java.util.Date;
......@@ -283,9 +284,9 @@ public abstract class ReviewConstraintUI extends ConstraintUIBase {
@Override
public Color getBackground(Object element) {
if(((Review)element).isOk() == true) {
return new Color(Display.getCurrent(), 0, 255, 0);
return getColor(0, 255, 0);
}
return new Color(Display.getCurrent(), 255, 0, 0);
return getColor(255, 0, 0);
}
/** {@inheritDoc} */
......
AnalysisToWordRuleConverter.java 1063cec984eefbc7c7febe30f2f0a0be44a43c03 GREEN
ConnectionContentAssistProcessor.java 634978387a6b3c61f3f59eb468574bcec733610c GREEN
ConnectionHighlightColorConstants.java 375f54d51a77451f394481a826a7d4ccd8d16e3f GREEN
ConnectionHighlightColorConstants.java a4147ab2f5059e8840aa5ec27b7c262036860ca9 YELLOW
ConnectionHighlightConfiguration.java ec649fe71b9795aaa444a5a3aa5440ddd1a1874b RED
ConnectionHighlightScanner.java 998959ff0d22d4a743a25fce2169b97fb243cfa9 GREEN
ConnectionHoverInformationControl.java 1bf28d1c94ebad2c0fae8fc60f14cd23d7a01f92 RED
......
/*-------------------------------------------------------------------------+
| Copyright 2012 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| Licensed under the Apache License, Version 2.0 (the "License"; |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
......@@ -15,9 +15,9 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.mira.ui.editor.highlight;
import static org.eclipse.wb.swt.SWTResourceManager.getColor;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
/**
* Color constants for highlighting in requirements.
......@@ -27,24 +27,23 @@ import org.eclipse.swt.widgets.Display;
public class ConnectionHighlightColorConstants {
/** Color defined for context elements. */
public static final Color ELEMENT_COLOR =
new Color(Display.getCurrent(), new RGB(65, 105, 225));
public static final Color ELEMENT_COLOR = getColor(65, 105, 225);
/** Color for synonyms - identical as elements. */
public static final Color SYNONYM_COLOR = ELEMENT_COLOR;
/** Color defined for signal elements. */
public static final Color SIGNAL_COLOR = new Color(Display.getCurrent(), new RGB(128, 0, 0));
public static final Color SIGNAL_COLOR = getColor(128, 0, 0);
/** Color defined for mode elements. */
public static final Color MODE_COLOR = new Color(Display.getCurrent(), new RGB(128, 0, 0));
public static final Color MODE_COLOR = getColor(128, 0, 0);
/** Color defined for requirement elements elements. */
public static final Color REQ_COLOR = new Color(Display.getCurrent(), new RGB(128, 0, 0));
public static final Color REQ_COLOR = getColor(128, 0, 0);
/** Color defined for person of stakeholder. */
public static final Color PERSON_COLOR = new Color(Display.getCurrent(), new RGB(139, 101, 8));
public static final Color PERSON_COLOR = getColor(139, 101, 8);
/** Color defined for parameter. */
public static final Color PARAMETER_COLOR = new Color(Display.getCurrent(), new RGB(0, 255, 0));
public static final Color PARAMETER_COLOR = getColor(0, 255, 0);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment