public class ElementUtil extends Object
Constructor and Description |
---|
ElementUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
appendTextRegion(StringBuilder s,
ITextRegion textRegion,
boolean isSignificant) |
static ParserContext |
basicGetParserContext(EObject csElement) |
static String |
getCollectionName(boolean ordered,
boolean unique) |
static String |
getCollectionTypeName(TypedElementCS csTypedElement) |
static ModelElementCS |
getCsElement(Element asElement) |
static String[][] |
getDelegateURIs() |
static RootCSAttribution |
getDocumentAttribution(ElementCS context) |
static int |
getEndOffset(INode iNode)
This makes INode.getEndOffset from Xtext 2.5 available on 2.3
|
static String |
getExpressionText(ElementCS csElement)
Return the user text for csElement preserving all surrounding whitespace.
|
static ExpressionInOCL |
getFirstQuery(PivotMetamodelManager metamodelManager,
BaseCSResource csResource)
Extract the first embedded ExpressionInOCL.
|
static TemplateParameter |
getFormalTemplateParameter(TemplateParameterSubstitutionCS csTemplateParameterSubstitution) |
static ILeafNode |
getLeafNode(INode node) |
static int |
getLower(TypedElementCS csTypedElement) |
static <T extends NamedElementCS> |
getNamedElementCS(Collection<T> namedElements,
String name) |
static boolean |
getQualifier(List<String> qualifiers,
String trueString,
String falseString,
boolean defaultValue) |
static String |
getText(ElementCS csElement)
Return the raw text associated with a csElement.
|
static String |
getText(ElementCS csElement,
EReference feature) |
static String |
getTextName(ElementCS csElement)
Return the logical text associated with a csElement.
|
static int |
getUpper(TypedElementCS csTypedElement) |
static boolean |
hasSyntaxError(List<Diagnostic> diagnostics) |
static boolean |
isInOperation(ElementCS csElement) |
static boolean |
isOrdered(TypedElementCS csTypedElement) |
static boolean |
isPrimitiveInstanceClass(EDataType esObject) |
static boolean |
isRequired(TypedRefCS csTypeRef)
Deprecated.
Use CS2AS.isRequired to handle [?]/[1]/blank
|
static boolean |
isSpecialization(TemplateBindingCS csTemplateBinding) |
static boolean |
isUnique(TypedElementCS csTypedElement) |
static void |
setLastPathElement(PathNameCS ownedPathName,
Element asElement) |
public static void appendTextRegion(StringBuilder s, ITextRegion textRegion, boolean isSignificant)
public static ParserContext basicGetParserContext(EObject csElement)
public static String getCollectionTypeName(TypedElementCS csTypedElement)
public static String getCollectionName(boolean ordered, boolean unique)
public static ModelElementCS getCsElement(Element asElement)
public static String[][] getDelegateURIs()
public static RootCSAttribution getDocumentAttribution(ElementCS context)
public static String getExpressionText(ElementCS csElement)
public static ExpressionInOCL getFirstQuery(PivotMetamodelManager metamodelManager, BaseCSResource csResource) throws ParserException
ParserException
public static TemplateParameter getFormalTemplateParameter(TemplateParameterSubstitutionCS csTemplateParameterSubstitution)
public static ILeafNode getLeafNode(INode node)
public static int getLower(TypedElementCS csTypedElement)
public static <T extends NamedElementCS> T getNamedElementCS(Collection<T> namedElements, String name)
public static int getEndOffset(INode iNode)
public static boolean getQualifier(List<String> qualifiers, String trueString, String falseString, boolean defaultValue)
public static String getText(ElementCS csElement)
public static String getTextName(ElementCS csElement)
public static int getUpper(TypedElementCS csTypedElement)
public static boolean hasSyntaxError(List<Diagnostic> diagnostics)
public static boolean isInOperation(ElementCS csElement)
public static boolean isOrdered(TypedElementCS csTypedElement)
public static boolean isPrimitiveInstanceClass(EDataType esObject)
@Deprecated public static boolean isRequired(TypedRefCS csTypeRef)
public static boolean isSpecialization(TemplateBindingCS csTemplateBinding)
public static boolean isUnique(TypedElementCS csTypedElement)
public static void setLastPathElement(PathNameCS ownedPathName, Element asElement)
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.