public class ElementUtil
extends java.lang.Object
Constructor and Description |
---|
ElementUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
appendTextRegion(java.lang.StringBuilder s,
org.eclipse.xtext.util.ITextRegion textRegion,
boolean isSignificant) |
static ParserContext |
basicGetParserContext(org.eclipse.emf.ecore.EObject csElement) |
static java.lang.String |
getCollectionName(boolean ordered,
boolean unique) |
static java.lang.String |
getCollectionTypeName(TypedElementCS csTypedElement) |
static ModelElementCS |
getCsElement(Element asElement) |
static java.lang.String[][] |
getDelegateURIs() |
static RootCSAttribution |
getDocumentAttribution(ElementCS context) |
static int |
getEndOffset(org.eclipse.xtext.nodemodel.INode iNode)
This makes INode.getEndOffset from Xtext 2.5 available on 2.3
|
static java.lang.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 org.eclipse.xtext.nodemodel.ILeafNode |
getLeafNode(org.eclipse.xtext.nodemodel.INode node) |
static int |
getLower(TypedElementCS csTypedElement) |
static <T extends NamedElementCS> |
getNamedElementCS(java.util.Collection<T> namedElements,
java.lang.String name) |
static boolean |
getQualifier(java.util.List<java.lang.String> qualifiers,
java.lang.String trueString,
java.lang.String falseString,
boolean defaultValue) |
static java.lang.String |
getText(ElementCS csElement)
Return the raw text associated with a csElement.
|
static java.lang.String |
getText(ElementCS csElement,
org.eclipse.emf.ecore.EReference feature) |
static java.lang.String |
getTextName(ElementCS csElement)
Return the logical text associated with a csElement.
|
static int |
getUpper(TypedElementCS csTypedElement) |
static boolean |
hasSyntaxError(java.util.List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> diagnostics) |
static boolean |
isInOperation(ElementCS csElement) |
static boolean |
isOrdered(TypedElementCS csTypedElement) |
static boolean |
isPrimitiveInstanceClass(org.eclipse.emf.ecore.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(@NonNull java.lang.StringBuilder s, @Nullable org.eclipse.xtext.util.ITextRegion textRegion, boolean isSignificant)
@Nullable public static ParserContext basicGetParserContext(@NonNull org.eclipse.emf.ecore.EObject csElement)
@Nullable public static java.lang.String getCollectionTypeName(@NonNull TypedElementCS csTypedElement)
@NonNull public static java.lang.String getCollectionName(boolean ordered, boolean unique)
@Nullable public static ModelElementCS getCsElement(@NonNull Element asElement)
public static java.lang.String[][] getDelegateURIs()
@Nullable public static RootCSAttribution getDocumentAttribution(@NonNull ElementCS context)
@NonNull public static java.lang.String getExpressionText(@NonNull ElementCS csElement)
@Nullable public static ExpressionInOCL getFirstQuery(@NonNull PivotMetamodelManager metamodelManager, BaseCSResource csResource) throws ParserException
ParserException
@Nullable public static TemplateParameter getFormalTemplateParameter(@NonNull TemplateParameterSubstitutionCS csTemplateParameterSubstitution)
@Nullable public static org.eclipse.xtext.nodemodel.ILeafNode getLeafNode(@NonNull org.eclipse.xtext.nodemodel.INode node)
public static int getLower(@NonNull TypedElementCS csTypedElement)
@Nullable public static <T extends NamedElementCS> T getNamedElementCS(@NonNull java.util.Collection<T> namedElements, @NonNull java.lang.String name)
public static int getEndOffset(@NonNull org.eclipse.xtext.nodemodel.INode iNode)
public static boolean getQualifier(@NonNull java.util.List<java.lang.String> qualifiers, @NonNull java.lang.String trueString, @NonNull java.lang.String falseString, boolean defaultValue)
@Nullable public static java.lang.String getText(@NonNull ElementCS csElement)
@Nullable public static java.lang.String getText(@NonNull ElementCS csElement, org.eclipse.emf.ecore.EReference feature)
@Nullable public static java.lang.String getTextName(@NonNull ElementCS csElement)
public static int getUpper(@NonNull TypedElementCS csTypedElement)
public static boolean hasSyntaxError(@NonNull java.util.List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> diagnostics)
public static boolean isInOperation(@NonNull ElementCS csElement)
public static boolean isOrdered(@NonNull TypedElementCS csTypedElement)
public static boolean isPrimitiveInstanceClass(@NonNull org.eclipse.emf.ecore.EDataType esObject)
@Deprecated public static boolean isRequired(@Nullable TypedRefCS csTypeRef)
public static boolean isSpecialization(@NonNull TemplateBindingCS csTemplateBinding)
public static boolean isUnique(@NonNull TypedElementCS csTypedElement)
public static void setLastPathElement(@NonNull PathNameCS ownedPathName, @NonNull Element asElement)