public class GrammarUtil extends Object
| Constructor and Description |
|---|
GrammarUtil() |
| Modifier and Type | Method and Description |
|---|---|
static List<EnumRule> |
allEnumRules(Grammar _this) |
static Collection<org.eclipse.emf.ecore.EPackage> |
allEPackagesToValidate(Grammar _this) |
static List<AbstractMetamodelDeclaration> |
allMetamodelDeclarations(Grammar grammar) |
static List<ParserRule> |
allParserRules(Grammar _this) |
static List<AbstractRule> |
allRules(Grammar grammar) |
static List<TerminalRule> |
allTerminalRules(Grammar _this) |
static List<Grammar> |
allUsedGrammars(Grammar grammar) |
static List<AbstractElement> |
containedAbstractElements(org.eclipse.emf.ecore.EObject e) |
static List<Action> |
containedActions(org.eclipse.emf.ecore.EObject e) |
static List<Assignment> |
containedAssignments(org.eclipse.emf.ecore.EObject e) |
static List<CrossReference> |
containedCrossReferences(org.eclipse.emf.ecore.EObject e) |
static List<Keyword> |
containedKeywords(org.eclipse.emf.ecore.EObject e) |
static List<RuleCall> |
containedRuleCalls(org.eclipse.emf.ecore.EObject e) |
static Assignment |
containingAssignment(org.eclipse.emf.ecore.EObject e) |
static CrossReference |
containingCrossReference(org.eclipse.emf.ecore.EObject e) |
static EnumRule |
containingEnumRule(org.eclipse.emf.ecore.EObject e) |
static Group |
containingGroup(org.eclipse.emf.ecore.EObject e) |
static ParserRule |
containingParserRule(org.eclipse.emf.ecore.EObject e) |
static AbstractRule |
containingRule(org.eclipse.emf.ecore.EObject e) |
static UnorderedGroup |
containingUnorderedGroup(org.eclipse.emf.ecore.EObject e) |
static boolean |
containsAssignedAction(ParserRule rule) |
static List<AbstractElement> |
elementsBeforeThisInContainingGroup(AbstractElement _this) |
static org.eclipse.emf.ecore.EClassifier |
findCurrentType(AbstractElement element) |
static org.eclipse.emf.ecore.EDataType |
findEBoolean(Grammar grammar)
Find the datatype for EBoolean which is referable from the given grammar.
|
static org.eclipse.emf.ecore.EClass |
findEObject(Grammar grammar)
Find the class for EObject which is referable from the given grammar.
|
static org.eclipse.emf.ecore.EDataType |
findEString(Grammar grammar)
Find the datatype for EString which is referable from the given grammar.
|
static AbstractRule |
findRuleForName(Grammar grammar,
String ruleName) |
static Collection<? extends AbstractElement> |
getAllAlternatives(Grammar g) |
static Collection<? extends AbstractElement> |
getAllAssignments(Grammar g) |
static Collection<? extends AbstractElement> |
getAllGroups(Grammar g) |
static Set<String> |
getAllKeywords(Grammar g) |
static Collection<? extends AbstractElement> |
getAllPredicatedElements(Grammar g) |
static Collection<? extends AbstractElement> |
getAllUnorderedGroups(Grammar g) |
static String |
getClasspathRelativePathToBinGrammar(Grammar grammar) |
static String |
getClasspathRelativePathToXmi(Grammar grammar) |
static Grammar |
getGrammar(org.eclipse.emf.ecore.EObject grammarElement) |
static String |
getLanguageId(Grammar g) |
static String |
getName(Grammar g)
Deprecated.
replaced by
getSimpleName(Grammar) for more clarity |
static String |
getNamespace(Grammar g) |
static org.eclipse.emf.ecore.EReference |
getReference(CrossReference crossRef) |
static org.eclipse.emf.ecore.EReference |
getReference(CrossReference ref,
org.eclipse.emf.ecore.EClass referenceOwner) |
static String |
getSimpleName(Grammar g) |
static String |
getTypeRefName(TypeRef typeRef) |
static boolean |
isAnyCardinality(AbstractElement e) |
static boolean |
isAssigned(org.eclipse.emf.ecore.EObject e) |
static boolean |
isAssignedAction(org.eclipse.emf.ecore.EObject e) |
static boolean |
isAssignedEObjectRuleCall(org.eclipse.emf.ecore.EObject ele) |
static boolean |
isBooleanAssignment(Assignment a) |
static boolean |
isDatatypeRule(AbstractRule abstractRule) |
static boolean |
isDatatypeRule(ParserRule parserRule) |
static boolean |
isDatatypeRuleCall(org.eclipse.emf.ecore.EObject grammarElement) |
static boolean |
isEnumRuleCall(org.eclipse.emf.ecore.EObject grammarElement) |
static boolean |
isEObjectFragmentRule(AbstractRule rule) |
static boolean |
isEObjectFragmentRuleCall(org.eclipse.emf.ecore.EObject ele) |
static boolean |
isEObjectRule(org.eclipse.emf.ecore.EObject grammarElement) |
static boolean |
isEObjectRuleCall(org.eclipse.emf.ecore.EObject grammarElement) |
static boolean |
isMultipleAssignment(Action a) |
static boolean |
isMultipleAssignment(Assignment a) |
static boolean |
isMultipleCardinality(AbstractElement e) |
static boolean |
isOneOrMoreCardinality(AbstractElement e) |
static boolean |
isOptionalCardinality(AbstractElement e) |
static boolean |
isParserRuleCall(org.eclipse.emf.ecore.EObject grammarElement) |
static boolean |
isSingleAssignment(Assignment a) |
static boolean |
isTerminalRuleCall(org.eclipse.emf.ecore.EObject grammarElement) |
static boolean |
isUnassignedAction(org.eclipse.emf.ecore.EObject e) |
static boolean |
isUnassignedEObjectRuleCall(org.eclipse.emf.ecore.EObject ele) |
static boolean |
isUnassignedParserRuleCall(org.eclipse.emf.ecore.EObject ele) |
public static String getClasspathRelativePathToBinGrammar(Grammar grammar)
@Deprecated public static String getName(Grammar g)
getSimpleName(Grammar) for more claritypublic static Grammar getGrammar(org.eclipse.emf.ecore.EObject grammarElement)
public static AbstractRule containingRule(org.eclipse.emf.ecore.EObject e)
public static ParserRule containingParserRule(org.eclipse.emf.ecore.EObject e)
public static EnumRule containingEnumRule(org.eclipse.emf.ecore.EObject e)
public static Assignment containingAssignment(org.eclipse.emf.ecore.EObject e)
public static Group containingGroup(org.eclipse.emf.ecore.EObject e)
public static UnorderedGroup containingUnorderedGroup(org.eclipse.emf.ecore.EObject e)
public static CrossReference containingCrossReference(org.eclipse.emf.ecore.EObject e)
public static List<Assignment> containedAssignments(org.eclipse.emf.ecore.EObject e)
public static List<AbstractElement> containedAbstractElements(org.eclipse.emf.ecore.EObject e)
public static List<CrossReference> containedCrossReferences(org.eclipse.emf.ecore.EObject e)
public static boolean containsAssignedAction(ParserRule rule)
public static List<AbstractElement> elementsBeforeThisInContainingGroup(AbstractElement _this)
public static boolean isParserRuleCall(org.eclipse.emf.ecore.EObject grammarElement)
public static boolean isEObjectRuleCall(org.eclipse.emf.ecore.EObject grammarElement)
public static boolean isEObjectRule(org.eclipse.emf.ecore.EObject grammarElement)
public static boolean isUnassignedParserRuleCall(org.eclipse.emf.ecore.EObject ele)
public static boolean isUnassignedEObjectRuleCall(org.eclipse.emf.ecore.EObject ele)
public static boolean isEObjectFragmentRuleCall(org.eclipse.emf.ecore.EObject ele)
public static boolean isEObjectFragmentRule(AbstractRule rule)
public static boolean isAssignedEObjectRuleCall(org.eclipse.emf.ecore.EObject ele)
public static boolean isDatatypeRuleCall(org.eclipse.emf.ecore.EObject grammarElement)
public static boolean isEnumRuleCall(org.eclipse.emf.ecore.EObject grammarElement)
public static boolean isTerminalRuleCall(org.eclipse.emf.ecore.EObject grammarElement)
public static AbstractRule findRuleForName(Grammar grammar, String ruleName)
ruleName - the name of the rule that should be found. May be a qualified name with a dot as a delimiter.public static List<AbstractRule> allRules(Grammar grammar)
public static List<ParserRule> allParserRules(Grammar _this)
public static List<TerminalRule> allTerminalRules(Grammar _this)
public static Collection<? extends AbstractElement> getAllAlternatives(Grammar g)
public static Collection<? extends AbstractElement> getAllGroups(Grammar g)
public static Collection<? extends AbstractElement> getAllUnorderedGroups(Grammar g)
public static Collection<? extends AbstractElement> getAllAssignments(Grammar g)
public static Collection<? extends AbstractElement> getAllPredicatedElements(Grammar g)
public static List<AbstractMetamodelDeclaration> allMetamodelDeclarations(Grammar grammar)
public static boolean isAssigned(org.eclipse.emf.ecore.EObject e)
public static boolean isAssignedAction(org.eclipse.emf.ecore.EObject e)
public static boolean isUnassignedAction(org.eclipse.emf.ecore.EObject e)
public static boolean isBooleanAssignment(Assignment a)
public static boolean isSingleAssignment(Assignment a)
public static boolean isMultipleAssignment(Assignment a)
public static boolean isMultipleAssignment(Action a)
public static boolean isOptionalCardinality(AbstractElement e)
public static boolean isMultipleCardinality(AbstractElement e)
public static boolean isOneOrMoreCardinality(AbstractElement e)
public static boolean isAnyCardinality(AbstractElement e)
public static boolean isDatatypeRule(ParserRule parserRule)
public static boolean isDatatypeRule(AbstractRule abstractRule)
public static org.eclipse.emf.ecore.EReference getReference(CrossReference ref, org.eclipse.emf.ecore.EClass referenceOwner)
public static org.eclipse.emf.ecore.EReference getReference(CrossReference crossRef)
public static org.eclipse.emf.ecore.EClassifier findCurrentType(AbstractElement element)
public static Collection<org.eclipse.emf.ecore.EPackage> allEPackagesToValidate(Grammar _this)
public static org.eclipse.emf.ecore.EDataType findEString(Grammar grammar)
public static org.eclipse.emf.ecore.EDataType findEBoolean(Grammar grammar)
public static org.eclipse.emf.ecore.EClass findEObject(Grammar grammar)
Copyright © 2015. All Rights Reserved.