Java Code Examples for org.eclipse.xtext.XtextPackage#UNORDERED_GROUP

The following examples show how to use org.eclipse.xtext.XtextPackage#UNORDERED_GROUP . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractSemanticRegionsFinder.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
protected void collectMatchableElements(AbstractElement ele, Collection<AbstractElement> result) {
	switch (ele.eClass().getClassifierID()) {
		case XtextPackage.RULE_CALL:
			assertNoEObjectRuleCall((RuleCall) ele);
		case XtextPackage.KEYWORD:
			result.add(ele);
			break;
		case XtextPackage.CROSS_REFERENCE:
			collectMatchableElements(((CrossReference) ele).getTerminal(), result);
			break;
		case XtextPackage.ASSIGNMENT:
			collectMatchableElements(((Assignment) ele).getTerminal(), result);
			break;
		case XtextPackage.ALTERNATIVES:
		case XtextPackage.GROUP:
		case XtextPackage.UNORDERED_GROUP:
			for (AbstractElement child : ((CompoundElement) ele).getElements())
				collectMatchableElements(child, result);
			break;
	}
}
 
Example 2
Source File: CfgAdapter.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public Iterable<AbstractElement> getUnorderedChildren(AbstractElement ele) {
	switch (ele.eClass().getClassifierID()) {
		case XtextPackage.UNORDERED_GROUP:
			return ((UnorderedGroup) ele).getElements();
		default:
			return null;
	}
}