diff options
author | 2021-01-06 00:01:51 +0100 | |
---|---|---|
committer | 2021-01-06 00:01:51 +0100 | |
commit | 7dcbe0bc5a9cac09de030b5f328f2e4d575f4ab5 (patch) | |
tree | d90109608b1f4871f3aef9c873cb80262a4154a1 /Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse | |
parent | merge models20 measurements (diff) | |
download | VIATRA-Generator-7dcbe0bc5a9cac09de030b5f328f2e4d575f4ab5.tar.gz VIATRA-Generator-7dcbe0bc5a9cac09de030b5f328f2e4d575f4ab5.tar.zst VIATRA-Generator-7dcbe0bc5a9cac09de030b5f328f2e4d575f4ab5.zip |
rebase dreal-integ on models20-measurements
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse')
14 files changed, 0 insertions, 194 deletions
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/.gitignore deleted file mode 100644 index 54297e9d..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /.SolverLanguageUiModule.java._trace | ||
2 | /.SolverLanguageUiModule.xtendbin | ||
3 | /SolverLanguageUiModule.java | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/contentassist/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/contentassist/.gitignore deleted file mode 100644 index 7bf487b6..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/contentassist/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /.SolverLanguageProposalProvider.java._trace | ||
2 | /.SolverLanguageProposalProvider.xtendbin | ||
3 | /SolverLanguageProposalProvider.java | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/highlight/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/highlight/.gitignore deleted file mode 100644 index 682fd167..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/highlight/.gitignore +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /.SolverSemanticHighlightCalculator.java._trace | ||
2 | /.SolverSemanticHighlightCalculator.xtendbin | ||
3 | /.SolverSemanticTextAttributeProvider.java._trace | ||
4 | /.SolverSemanticTextAttributeProvider.xtendbin | ||
5 | /SolverSemanticHighlightCalculator.java | ||
6 | /SolverSemanticTextAttributeProvider.java | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/labeling/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/labeling/.gitignore deleted file mode 100644 index 4f407d4c..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/labeling/.gitignore +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /.SolverLanguageDescriptionLabelProvider.java._trace | ||
2 | /.SolverLanguageDescriptionLabelProvider.xtendbin | ||
3 | /.SolverLanguageLabelProvider.java._trace | ||
4 | /.SolverLanguageLabelProvider.xtendbin | ||
5 | /SolverLanguageDescriptionLabelProvider.java | ||
6 | /SolverLanguageLabelProvider.java | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/outline/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/outline/.gitignore deleted file mode 100644 index 63ce4740..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/outline/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /.SolverLanguageOutlineTreeProvider.java._trace | ||
2 | /.SolverLanguageOutlineTreeProvider.xtendbin | ||
3 | /SolverLanguageOutlineTreeProvider.java | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/quickfix/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/quickfix/.gitignore deleted file mode 100644 index 37dbeadb..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/quickfix/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /.SolverLanguageQuickfixProvider.java._trace | ||
2 | /.SolverLanguageQuickfixProvider.xtendbin | ||
3 | /SolverLanguageQuickfixProvider.java | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin deleted file mode 100644 index a107bf27..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin +++ /dev/null | |||
Binary files differ | |||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin deleted file mode 100644 index 994dbd52..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin +++ /dev/null | |||
Binary files differ | |||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.gitignore deleted file mode 100644 index 61ce5bef..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.gitignore +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /.SolverSemanticHighlightCalculator.java._trace | ||
2 | /.SolverSemanticTextAttributeProvider.java._trace | ||
3 | /.SolverSemanticHighlightCalculator.xtendbin | ||
4 | /.SolverSemanticTextAttributeProvider.xtendbin | ||
5 | /SolverSemanticHighlightCalculator.java | ||
6 | /SolverSemanticTextAttributeProvider.java | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/SolverSemanticHighlightCalculator.java b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/SolverSemanticHighlightCalculator.java deleted file mode 100644 index 2935dfd7..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/SolverSemanticHighlightCalculator.java +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | package org.eclipse.viatra.solver.language.ui.syntaxcoloring; | ||
2 | |||
3 | import com.google.common.collect.Iterators; | ||
4 | import java.util.Iterator; | ||
5 | import java.util.Random; | ||
6 | import java.util.WeakHashMap; | ||
7 | import org.eclipse.viatra.solver.language.solverLanguage.Reference; | ||
8 | import org.eclipse.xtend2.lib.StringConcatenation; | ||
9 | import org.eclipse.xtext.ide.editor.syntaxcoloring.DefaultSemanticHighlightingCalculator; | ||
10 | import org.eclipse.xtext.ide.editor.syntaxcoloring.IHighlightedPositionAcceptor; | ||
11 | import org.eclipse.xtext.nodemodel.ICompositeNode; | ||
12 | import org.eclipse.xtext.nodemodel.util.NodeModelUtils; | ||
13 | import org.eclipse.xtext.resource.XtextResource; | ||
14 | import org.eclipse.xtext.util.CancelIndicator; | ||
15 | |||
16 | @SuppressWarnings("all") | ||
17 | public class SolverSemanticHighlightCalculator extends DefaultSemanticHighlightingCalculator { | ||
18 | public static final String SYMBOL_CODE = "SymbolCode::"; | ||
19 | |||
20 | private final WeakHashMap<String, String> symbolName2ID = new WeakHashMap<String, String>(); | ||
21 | |||
22 | @Override | ||
23 | public void provideHighlightingFor(final XtextResource resource, final IHighlightedPositionAcceptor acceptor, final CancelIndicator cancelIndicator) { | ||
24 | if (((resource == null) || (resource.getParseResult() == null))) { | ||
25 | return; | ||
26 | } else { | ||
27 | final Iterator<Reference> modelSymbols = Iterators.<Reference>filter(resource.getAllContents(), Reference.class); | ||
28 | while (modelSymbols.hasNext()) { | ||
29 | { | ||
30 | final Reference symbolElement = modelSymbols.next(); | ||
31 | final ICompositeNode node = NodeModelUtils.getNode(symbolElement); | ||
32 | acceptor.addPosition( | ||
33 | node.getOffset(), | ||
34 | node.getLength(), | ||
35 | this.getSymbolCode(node.getText())); | ||
36 | } | ||
37 | } | ||
38 | } | ||
39 | } | ||
40 | |||
41 | public String getSymbolCode(final String name) { | ||
42 | boolean _containsKey = this.symbolName2ID.containsKey(name); | ||
43 | if (_containsKey) { | ||
44 | return this.symbolName2ID.get(name); | ||
45 | } else { | ||
46 | final String id = this.calculateSymbolCode(name); | ||
47 | this.symbolName2ID.put(name, id); | ||
48 | return id; | ||
49 | } | ||
50 | } | ||
51 | |||
52 | public String calculateSymbolCode(final String name) { | ||
53 | int _hashCode = name.hashCode(); | ||
54 | final Random random = new Random(_hashCode); | ||
55 | final float hue = this.huePick(random.nextFloat()); | ||
56 | float _nextFloat = random.nextFloat(); | ||
57 | double _multiply = (_nextFloat * 0.3); | ||
58 | final double saturation = (0.2 + _multiply); | ||
59 | float _nextFloat_1 = random.nextFloat(); | ||
60 | double _multiply_1 = (_nextFloat_1 * 0.2); | ||
61 | final double brightness = (_multiply_1 + 0.7f); | ||
62 | StringConcatenation _builder = new StringConcatenation(); | ||
63 | _builder.append(SolverSemanticHighlightCalculator.SYMBOL_CODE); | ||
64 | _builder.append(" "); | ||
65 | _builder.append(hue); | ||
66 | _builder.append(" "); | ||
67 | _builder.append(saturation); | ||
68 | _builder.append(" "); | ||
69 | _builder.append(brightness); | ||
70 | return _builder.toString(); | ||
71 | } | ||
72 | |||
73 | private float huePick(final float random) { | ||
74 | final int pink = 300; | ||
75 | final int tolerance = 10; | ||
76 | final float degree = (random * (360 - (2 * tolerance))); | ||
77 | if ((degree < (pink - tolerance))) { | ||
78 | return degree; | ||
79 | } else { | ||
80 | return (degree + (2 * tolerance)); | ||
81 | } | ||
82 | } | ||
83 | } | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/SolverSemanticTextAttributeProvider.java b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/SolverSemanticTextAttributeProvider.java deleted file mode 100644 index 04824ad1..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/SolverSemanticTextAttributeProvider.java +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | package org.eclipse.viatra.solver.language.ui.syntaxcoloring; | ||
2 | |||
3 | import com.google.inject.Inject; | ||
4 | import java.util.WeakHashMap; | ||
5 | import org.eclipse.jface.text.TextAttribute; | ||
6 | import org.eclipse.swt.graphics.Color; | ||
7 | import org.eclipse.swt.graphics.Font; | ||
8 | import org.eclipse.swt.graphics.RGB; | ||
9 | import org.eclipse.viatra.solver.language.ui.syntaxcoloring.SolverSemanticHighlightCalculator; | ||
10 | import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess; | ||
11 | import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfiguration; | ||
12 | import org.eclipse.xtext.ui.editor.syntaxcoloring.PreferenceStoreAccessor; | ||
13 | import org.eclipse.xtext.ui.editor.syntaxcoloring.TextAttributeProvider; | ||
14 | import org.eclipse.xtext.ui.editor.utils.EditorUtils; | ||
15 | import org.eclipse.xtext.ui.editor.utils.TextStyle; | ||
16 | |||
17 | @SuppressWarnings("all") | ||
18 | public class SolverSemanticTextAttributeProvider extends TextAttributeProvider { | ||
19 | private final TextStyle defaultTextStyle = new TextStyle(); | ||
20 | |||
21 | private final WeakHashMap<String, TextAttribute> colorID2TextAttribute = new WeakHashMap<String, TextAttribute>(); | ||
22 | |||
23 | @Inject | ||
24 | public SolverSemanticTextAttributeProvider(final IHighlightingConfiguration highlightingConfig, final IPreferenceStoreAccess preferenceStoreAccess, final PreferenceStoreAccessor prefStoreAccessor) { | ||
25 | super(highlightingConfig, preferenceStoreAccess, prefStoreAccessor); | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | public TextAttribute getAttribute(final String id) { | ||
30 | TextAttribute _xifexpression = null; | ||
31 | boolean _isMetamodelElementColorID = this.isMetamodelElementColorID(id); | ||
32 | if (_isMetamodelElementColorID) { | ||
33 | boolean _containsKey = this.colorID2TextAttribute.containsKey(id); | ||
34 | if (_containsKey) { | ||
35 | return this.colorID2TextAttribute.get(id); | ||
36 | } else { | ||
37 | final TextAttribute style = this.metamodelElementTextStyle(id); | ||
38 | this.colorID2TextAttribute.put(id, style); | ||
39 | return style; | ||
40 | } | ||
41 | } else { | ||
42 | _xifexpression = super.getAttribute(id); | ||
43 | } | ||
44 | return _xifexpression; | ||
45 | } | ||
46 | |||
47 | private boolean isMetamodelElementColorID(final String id) { | ||
48 | return id.startsWith(SolverSemanticHighlightCalculator.SYMBOL_CODE); | ||
49 | } | ||
50 | |||
51 | private TextAttribute metamodelElementTextStyle(final String id) { | ||
52 | final String[] texts = id.split(" "); | ||
53 | float _parseFloat = Float.parseFloat(texts[1]); | ||
54 | float _parseFloat_1 = Float.parseFloat(texts[2]); | ||
55 | float _parseFloat_2 = Float.parseFloat(texts[3]); | ||
56 | final RGB backgroundColor = new RGB(_parseFloat, _parseFloat_1, _parseFloat_2); | ||
57 | Color _colorFromRGB = EditorUtils.colorFromRGB(this.defaultTextStyle.getColor()); | ||
58 | Color _colorFromRGB_1 = EditorUtils.colorFromRGB(backgroundColor); | ||
59 | int _style = this.defaultTextStyle.getStyle(); | ||
60 | Font _fontFromFontData = EditorUtils.fontFromFontData(this.defaultTextStyle.getFontData()); | ||
61 | return new TextAttribute(_colorFromRGB, _colorFromRGB_1, _style, _fontFromFontData); | ||
62 | } | ||
63 | } | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin deleted file mode 100644 index 9839769e..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin +++ /dev/null | |||
Binary files differ | |||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.gitignore deleted file mode 100644 index 565d4b27..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /.SolverLanguageValidator.java._trace | ||
2 | /.SolverLanguageValidator.xtendbin | ||
3 | /SolverLanguageValidator.java | ||
diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/SolverLanguageValidator.java b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/SolverLanguageValidator.java deleted file mode 100644 index 2b8f158a..00000000 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/SolverLanguageValidator.java +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.validation; | ||
5 | |||
6 | import org.eclipse.viatra.solver.language.validation.AbstractSolverLanguageValidator; | ||
7 | |||
8 | /** | ||
9 | * This class contains custom validation rules. | ||
10 | * | ||
11 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation | ||
12 | */ | ||
13 | @SuppressWarnings("all") | ||
14 | public class SolverLanguageValidator extends AbstractSolverLanguageValidator { | ||
15 | } | ||