aboutsummaryrefslogtreecommitdiffstats
path: root/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/CftLanguageSemanticHighlightingCalculator.xtend
blob: 47c9ebdfc9f7779715d59ee682206edd46f0b0b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package hu.bme.mit.inf.dslreasoner.faulttree.components.ui.syntaxcoloring

import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition
import org.eclipse.emf.ecore.EObject
import org.eclipse.xtext.ide.editor.syntaxcoloring.DefaultSemanticHighlightingCalculator
import org.eclipse.xtext.ide.editor.syntaxcoloring.IHighlightedPositionAcceptor
import org.eclipse.xtext.util.CancelIndicator

import static hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage.Literals.*
import static org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultHighlightingConfiguration.*

class CftLanguageSemanticHighlightingCalculator extends DefaultSemanticHighlightingCalculator {
	protected dispatch def highlightElement(KOfMGateDefinition gate, IHighlightedPositionAcceptor acceptor,
		CancelIndicator cancelIndicator) {
		acceptor.highlightFeature(gate, KOF_MGATE_DEFINITION__K, KEYWORD_ID)
		acceptor.highlightFeature(gate, KOF_MGATE_DEFINITION__M, KEYWORD_ID)
		false
	}
	
	protected dispatch def highlightElement(EObject eObject, IHighlightedPositionAcceptor acceptor,
		CancelIndicator cancelIndicator) {
		super.highlightElement(eObject, acceptor, cancelIndicator)
	}
}