diff options
author | 2018-02-15 23:06:11 +0100 | |
---|---|---|
committer | 2018-02-15 23:06:11 +0100 | |
commit | 16b5e5555e5e138b79442942c1c9c0dd6f33dd20 (patch) | |
tree | ab355496088aa2598ddd71c5204acf57183b44fc /Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application | |
parent | Generation specification -> execution (diff) | |
download | VIATRA-Generator-16b5e5555e5e138b79442942c1c9c0dd6f33dd20.tar.gz VIATRA-Generator-16b5e5555e5e138b79442942c1c9c0dd6f33dd20.tar.zst VIATRA-Generator-16b5e5555e5e138b79442942c1c9c0dd6f33dd20.zip |
coloring refined
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application')
2 files changed, 3 insertions, 4 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/highlight/ColorCalculator.xtend b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/highlight/ColorCalculator.xtend index d0f9db88..5c871a78 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/highlight/ColorCalculator.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/highlight/ColorCalculator.xtend | |||
@@ -9,7 +9,7 @@ class ColorCalculator { | |||
9 | 9 | ||
10 | public def dispatch getColor(EClass c) { | 10 | public def dispatch getColor(EClass c) { |
11 | val supertypes = (c.getEAllSuperTypes + #[c]) | 11 | val supertypes = (c.getEAllSuperTypes + #[c]) |
12 | val typeHashcodes = supertypes.map[(c.getEPackage.nsURI->c.name).hashCode] | 12 | val typeHashcodes = supertypes.map[(c.getEPackage.nsURI->c.name).hashCode+2] |
13 | return randomColor(typeHashcodes) | 13 | return randomColor(typeHashcodes) |
14 | } | 14 | } |
15 | public def dispatch getColor(EEnum e) { | 15 | public def dispatch getColor(EEnum e) { |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/highlight/MetamodelElementColoringTextAttributeProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/highlight/MetamodelElementColoringTextAttributeProvider.xtend index 10b96d02..d843b904 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/highlight/MetamodelElementColoringTextAttributeProvider.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/highlight/MetamodelElementColoringTextAttributeProvider.xtend | |||
@@ -8,9 +8,8 @@ import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess | |||
8 | import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfiguration | 8 | import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfiguration |
9 | import org.eclipse.xtext.ui.editor.syntaxcoloring.PreferenceStoreAccessor | 9 | import org.eclipse.xtext.ui.editor.syntaxcoloring.PreferenceStoreAccessor |
10 | import org.eclipse.xtext.ui.editor.syntaxcoloring.TextAttributeProvider | 10 | import org.eclipse.xtext.ui.editor.syntaxcoloring.TextAttributeProvider |
11 | import org.eclipse.xtext.ui.editor.utils.TextStyle | ||
12 | import org.eclipse.xtext.ui.editor.utils.EditorUtils | 11 | import org.eclipse.xtext.ui.editor.utils.EditorUtils |
13 | import org.eclipse.swt.SWT | 12 | import org.eclipse.xtext.ui.editor.utils.TextStyle |
14 | 13 | ||
15 | class MetamodelElementColoringTextAttributeProvider extends TextAttributeProvider{ | 14 | class MetamodelElementColoringTextAttributeProvider extends TextAttributeProvider{ |
16 | 15 | ||
@@ -50,7 +49,7 @@ class MetamodelElementColoringTextAttributeProvider extends TextAttributeProvide | |||
50 | return new TextAttribute( | 49 | return new TextAttribute( |
51 | EditorUtils.colorFromRGB(defaultTextStyle.color), | 50 | EditorUtils.colorFromRGB(defaultTextStyle.color), |
52 | EditorUtils.colorFromRGB(backgroundColor), | 51 | EditorUtils.colorFromRGB(backgroundColor), |
53 | defaultTextStyle.style.bitwiseAnd(SWT.BORDER), | 52 | defaultTextStyle.style, |
54 | EditorUtils.fontFromFontData(defaultTextStyle.getFontData())); | 53 | EditorUtils.fontFromFontData(defaultTextStyle.getFontData())); |
55 | } | 54 | } |
56 | } | 55 | } |