Created
March 25, 2013 20:33
-
-
Save kthoms/5240455 to your computer and use it in GitHub Desktop.
LWC13: QlDslXtendValidator.xtend
check_featureDeclaredBeforeCall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Check | |
def void check_featureDeclaredBeforeCall (XFeatureCall featureCall) { | |
val featureSource = featureCall.feature.sourceElements.head | |
val nodeFeature = if (featureSource != null) featureSource.node else featureCall.feature.node | |
val nodeCall = featureCall.node | |
if (nodeFeature != null) { | |
if (nodeFeature.offset > nodeCall.offset) { | |
error(featureCall.feature.simpleName+" must be declared before.",featureCall, | |
XbasePackage::eINSTANCE.XAbstractFeatureCall_Feature, IssueCodes::FEATURE_CALL_BEFORE_DECLARATION, null | |
) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment