diff options
author | 2019-02-06 18:28:18 +0100 | |
---|---|---|
committer | 2019-02-19 19:18:25 +0100 | |
commit | 615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7 (patch) | |
tree | 1c9fe0f4ae152d84152c8ff1cfb6366ec8b277e9 /Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring | |
parent | [Stochastic] Fault tree transformation langauge (diff) | |
download | VIATRA-Generator-615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7.tar.gz VIATRA-Generator-615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7.tar.zst VIATRA-Generator-615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7.zip |
Extract component fault tree model
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring')
5 files changed, 65 insertions, 0 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin new file mode 100644 index 00000000..81585f8b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.xtendbin new file mode 100644 index 00000000..d8af5320 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.gitignore new file mode 100644 index 00000000..3fdf4894 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | /.CftLanguageSemanticHighlightingCalculator.java._trace | ||
2 | /.CftLanguageTokenToAttributeIdMapper.java._trace | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageSemanticHighlightingCalculator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageSemanticHighlightingCalculator.java new file mode 100644 index 00000000..268faba3 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageSemanticHighlightingCalculator.java | |||
@@ -0,0 +1,38 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.syntaxcoloring; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition; | ||
5 | import java.util.Arrays; | ||
6 | import org.eclipse.emf.ecore.EObject; | ||
7 | import org.eclipse.xtext.ide.editor.syntaxcoloring.DefaultSemanticHighlightingCalculator; | ||
8 | import org.eclipse.xtext.ide.editor.syntaxcoloring.IHighlightedPositionAcceptor; | ||
9 | import org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultHighlightingConfiguration; | ||
10 | import org.eclipse.xtext.util.CancelIndicator; | ||
11 | |||
12 | @SuppressWarnings("all") | ||
13 | public class CftLanguageSemanticHighlightingCalculator extends DefaultSemanticHighlightingCalculator { | ||
14 | protected boolean _highlightElement(final KOfMGateDefinition gate, final IHighlightedPositionAcceptor acceptor, final CancelIndicator cancelIndicator) { | ||
15 | boolean _xblockexpression = false; | ||
16 | { | ||
17 | this.highlightFeature(acceptor, gate, CftPackage.Literals.KOF_MGATE_DEFINITION__K, DefaultHighlightingConfiguration.KEYWORD_ID); | ||
18 | this.highlightFeature(acceptor, gate, CftPackage.Literals.KOF_MGATE_DEFINITION__M, DefaultHighlightingConfiguration.KEYWORD_ID); | ||
19 | _xblockexpression = false; | ||
20 | } | ||
21 | return _xblockexpression; | ||
22 | } | ||
23 | |||
24 | protected boolean _highlightElement(final EObject eObject, final IHighlightedPositionAcceptor acceptor, final CancelIndicator cancelIndicator) { | ||
25 | return super.highlightElement(eObject, acceptor, cancelIndicator); | ||
26 | } | ||
27 | |||
28 | protected boolean highlightElement(final EObject gate, final IHighlightedPositionAcceptor acceptor, final CancelIndicator cancelIndicator) { | ||
29 | if (gate instanceof KOfMGateDefinition) { | ||
30 | return _highlightElement((KOfMGateDefinition)gate, acceptor, cancelIndicator); | ||
31 | } else if (gate != null) { | ||
32 | return _highlightElement(gate, acceptor, cancelIndicator); | ||
33 | } else { | ||
34 | throw new IllegalArgumentException("Unhandled parameter types: " + | ||
35 | Arrays.<Object>asList(gate, acceptor, cancelIndicator).toString()); | ||
36 | } | ||
37 | } | ||
38 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageTokenToAttributeIdMapper.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageTokenToAttributeIdMapper.java new file mode 100644 index 00000000..9ad4afda --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageTokenToAttributeIdMapper.java | |||
@@ -0,0 +1,25 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.syntaxcoloring; | ||
2 | |||
3 | import org.eclipse.xtext.ide.editor.syntaxcoloring.DefaultAntlrTokenToAttributeIdMapper; | ||
4 | import org.eclipse.xtext.ide.editor.syntaxcoloring.HighlightingStyles; | ||
5 | |||
6 | @SuppressWarnings("all") | ||
7 | public class CftLanguageTokenToAttributeIdMapper extends DefaultAntlrTokenToAttributeIdMapper { | ||
8 | @Override | ||
9 | protected String calculateId(final String tokenName, final int tokenType) { | ||
10 | String _switchResult = null; | ||
11 | if (tokenName != null) { | ||
12 | switch (tokenName) { | ||
13 | case "RULE_T_DOUBLE": | ||
14 | _switchResult = HighlightingStyles.NUMBER_ID; | ||
15 | break; | ||
16 | default: | ||
17 | _switchResult = super.calculateId(tokenName, tokenType); | ||
18 | break; | ||
19 | } | ||
20 | } else { | ||
21 | _switchResult = super.calculateId(tokenName, tokenType); | ||
22 | } | ||
23 | return _switchResult; | ||
24 | } | ||
25 | } | ||