This file contains hidden or 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
pattern ClassAttributeNames(Cls,Name) = { | |
EClass(Cls); | |
EString(Name); | |
// since eAttributes will refer to EAttribute, we can use its name feature | |
EClass.eAttributes.name(Cls,Name); | |
} |
This file contains hidden or 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
public String execute(String modelPath, String patternFQN) { | |
ResourceSet resourceSet = new ResourceSetImpl(); | |
URI fileURI = URI.createFileURI(modelPath); | |
Resource resource = resourceSet.getResource(fileURI, true); | |
if (resource != null) { | |
try { | |
IncQueryMatcher matcher = MatcherFactoryRegistry.getMatcherFactory(patternFQN).getMatcher(resource); | |
Collection<IPatternMatch> matches = matcher.getAllMatches(); | |
for (IPatternMatch match : matches) { | |
IncQueryEngine.getDefaultLogger().logError(match.prettyPrint()); |
This file contains hidden or 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
// Query based features | |
private IncqueryFeatureHandler numberOfSchoolsHandler; | |
private IncqueryFeatureHandler lastYearHandler; | |
private IncqueryFeatureHandler teachersWithMostCourses; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
*/ | |
protected SchoolImpl() { |
NewerOlder