diff options
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu')
8 files changed, 0 insertions, 172 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/CftLanguageUiModule.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/CftLanguageUiModule.xtend deleted file mode 100644 index 6558d759..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/CftLanguageUiModule.xtend +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.ui.syntaxcoloring.CftLanguageSemanticHighlightingCalculator | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.components.ui.syntaxcoloring.CftLanguageTokenToAttributeIdMapper | ||
8 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor | ||
9 | import org.eclipse.xtext.ide.editor.syntaxcoloring.AbstractAntlrTokenToAttributeIdMapper | ||
10 | import org.eclipse.xtext.ide.editor.syntaxcoloring.ISemanticHighlightingCalculator | ||
11 | |||
12 | /** | ||
13 | * Use this class to register components to be used within the Eclipse IDE. | ||
14 | */ | ||
15 | @FinalFieldsConstructor | ||
16 | class CftLanguageUiModule extends AbstractCftLanguageUiModule { | ||
17 | def Class<? extends AbstractAntlrTokenToAttributeIdMapper> bindAbstractAntlrTokenToAttributeIdMapper() { | ||
18 | CftLanguageTokenToAttributeIdMapper | ||
19 | } | ||
20 | |||
21 | def Class<? extends ISemanticHighlightingCalculator> bindISemanticHighlightingCalculator() { | ||
22 | CftLanguageSemanticHighlightingCalculator | ||
23 | } | ||
24 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/CftLanguageProposalProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/CftLanguageProposalProvider.xtend deleted file mode 100644 index 2d173d73..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/CftLanguageProposalProvider.xtend +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.contentassist | ||
5 | |||
6 | |||
7 | /** | ||
8 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#content-assist | ||
9 | * on how to customize the content assistant. | ||
10 | */ | ||
11 | class CftLanguageProposalProvider extends AbstractCftLanguageProposalProvider { | ||
12 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/CftLanguageDescriptionLabelProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/CftLanguageDescriptionLabelProvider.xtend deleted file mode 100644 index 17a734e1..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/CftLanguageDescriptionLabelProvider.xtend +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.labeling | ||
5 | |||
6 | import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider | ||
7 | |||
8 | /** | ||
9 | * Provides labels for IEObjectDescriptions and IResourceDescriptions. | ||
10 | * | ||
11 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider | ||
12 | */ | ||
13 | class CftLanguageDescriptionLabelProvider extends DefaultDescriptionLabelProvider { | ||
14 | |||
15 | // Labels and icons can be computed like this: | ||
16 | |||
17 | // override text(IEObjectDescription ele) { | ||
18 | // ele.name.toString | ||
19 | // } | ||
20 | // | ||
21 | // override image(IEObjectDescription ele) { | ||
22 | // ele.EClass.name + '.gif' | ||
23 | // } | ||
24 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/CftLanguageLabelProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/CftLanguageLabelProvider.xtend deleted file mode 100644 index f111c553..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/CftLanguageLabelProvider.xtend +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.labeling | ||
5 | |||
6 | import com.google.inject.Inject | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition | ||
8 | import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider | ||
9 | import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider | ||
10 | |||
11 | /** | ||
12 | * Provides labels for EObjects. | ||
13 | * | ||
14 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider | ||
15 | */ | ||
16 | class CftLanguageLabelProvider extends DefaultEObjectLabelProvider { | ||
17 | |||
18 | @Inject | ||
19 | new(AdapterFactoryLabelProvider delegate) { | ||
20 | super(delegate); | ||
21 | } | ||
22 | |||
23 | def text(MappingDefinition mappingDefinition) { | ||
24 | mappingDefinition.pattern?.name | ||
25 | } | ||
26 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/CftLanguageOutlineTreeProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/CftLanguageOutlineTreeProvider.xtend deleted file mode 100644 index 3a75a639..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/CftLanguageOutlineTreeProvider.xtend +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.outline | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDefinition | ||
8 | import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider | ||
9 | |||
10 | /** | ||
11 | * Customization of the default outline structure. | ||
12 | * | ||
13 | * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#outline | ||
14 | */ | ||
15 | class CftLanguageOutlineTreeProvider extends DefaultOutlineTreeProvider { | ||
16 | def _isLeaf(EventDefinition eventDefinition) { | ||
17 | true | ||
18 | } | ||
19 | |||
20 | def _isLeaf(MappingDefinition mappingDefinition) { | ||
21 | true | ||
22 | } | ||
23 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/CftLanguageQuickfixProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/CftLanguageQuickfixProvider.xtend deleted file mode 100644 index 4ca09e2b..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/CftLanguageQuickfixProvider.xtend +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.quickfix | ||
5 | |||
6 | import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider | ||
7 | |||
8 | /** | ||
9 | * Custom quickfixes. | ||
10 | * | ||
11 | * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes | ||
12 | */ | ||
13 | class CftLanguageQuickfixProvider extends DefaultQuickfixProvider { | ||
14 | |||
15 | // @Fix(CftLanguageValidator.INVALID_NAME) | ||
16 | // def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) { | ||
17 | // acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [ | ||
18 | // context | | ||
19 | // val xtextDocument = context.xtextDocument | ||
20 | // val firstLetter = xtextDocument.get(issue.offset, 1) | ||
21 | // xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase) | ||
22 | // ] | ||
23 | // } | ||
24 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageSemanticHighlightingCalculator.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageSemanticHighlightingCalculator.xtend deleted file mode 100644 index 47c9ebdf..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageSemanticHighlightingCalculator.xtend +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.syntaxcoloring | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition | ||
4 | import org.eclipse.emf.ecore.EObject | ||
5 | import org.eclipse.xtext.ide.editor.syntaxcoloring.DefaultSemanticHighlightingCalculator | ||
6 | import org.eclipse.xtext.ide.editor.syntaxcoloring.IHighlightedPositionAcceptor | ||
7 | import org.eclipse.xtext.util.CancelIndicator | ||
8 | |||
9 | import static hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage.Literals.* | ||
10 | import static org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultHighlightingConfiguration.* | ||
11 | |||
12 | class CftLanguageSemanticHighlightingCalculator extends DefaultSemanticHighlightingCalculator { | ||
13 | protected dispatch def highlightElement(KOfMGateDefinition gate, IHighlightedPositionAcceptor acceptor, | ||
14 | CancelIndicator cancelIndicator) { | ||
15 | acceptor.highlightFeature(gate, KOF_MGATE_DEFINITION__K, KEYWORD_ID) | ||
16 | acceptor.highlightFeature(gate, KOF_MGATE_DEFINITION__M, KEYWORD_ID) | ||
17 | false | ||
18 | } | ||
19 | |||
20 | protected dispatch def highlightElement(EObject eObject, IHighlightedPositionAcceptor acceptor, | ||
21 | CancelIndicator cancelIndicator) { | ||
22 | super.highlightElement(eObject, acceptor, cancelIndicator) | ||
23 | } | ||
24 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageTokenToAttributeIdMapper.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageTokenToAttributeIdMapper.xtend deleted file mode 100644 index 4656d0a0..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageTokenToAttributeIdMapper.xtend +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
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 | class CftLanguageTokenToAttributeIdMapper extends DefaultAntlrTokenToAttributeIdMapper { | ||
7 | override protected calculateId(String tokenName, int tokenType) { | ||
8 | switch (tokenName) { | ||
9 | case "RULE_T_DOUBLE": | ||
10 | HighlightingStyles.NUMBER_ID | ||
11 | default: | ||
12 | super.calculateId(tokenName, tokenType) | ||
13 | } | ||
14 | } | ||
15 | } \ No newline at end of file | ||