public class DisplayUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ORDERBY_ANNOTATION |
Constructor and Description |
---|
DisplayUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addOrderByPatternWarning(java.lang.String patternFqn,
java.lang.String message)
Creates a marker with a warning for the given pattern.
|
org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel |
extractPatternModelFromResource(org.eclipse.emf.ecore.resource.Resource resource) |
static org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider |
getAdapterFactoryLabelProvider(org.eclipse.emf.common.util.URI uri)
Returns the
AdapterFactoryLabelProvider instance for the given uri. |
static java.lang.String |
getMessage(org.eclipse.viatra.query.runtime.api.IPatternMatch match)
Get the value of the PatternUI annotation's message attribute for the pattern which name is patternName.
|
static java.lang.String |
getMessage(org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<? extends org.eclipse.viatra.query.runtime.api.IPatternMatch> matcher,
int matchesSize,
java.lang.String patternFqn)
Returns a text message for a generated, not filtered matcher about the current match size.
|
static java.lang.String |
getMessage(org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<? extends org.eclipse.viatra.query.runtime.api.IPatternMatch> matcher,
int matchesSize,
java.lang.String patternFqn,
boolean isGenerated,
boolean isFiltered,
java.lang.String exceptionMessage,
org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory backend)
Returns a text message about the matches size for the given matcher.
|
static java.lang.String |
getMessage(org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<? extends org.eclipse.viatra.query.runtime.api.IPatternMatch> matcher,
int matchesSize,
java.lang.String patternFqn,
org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory backend)
Returns a text message for a generated, not filtered matcher about the current match size.
|
static java.lang.String |
getQueryBackendName(org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory backend) |
org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel |
parseEPM(org.eclipse.core.resources.IFile file)
Parses the given .vql file into a
PatternModel . |
static void |
removeOrderByPatternWarning(java.lang.String patternFqn)
Removes the marker for the given pattern if it is present.
|
public static final java.lang.String ORDERBY_ANNOTATION
public static void addOrderByPatternWarning(java.lang.String patternFqn, java.lang.String message)
patternFqn
- the fully qualified name of the patternmessage
- the warning message for the markerpublic static void removeOrderByPatternWarning(java.lang.String patternFqn)
patternFqn
- the fully qualified name of the patternpublic static org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider getAdapterFactoryLabelProvider(org.eclipse.emf.common.util.URI uri)
AdapterFactoryLabelProvider
instance for the given uri.uri
- the uriAdapterFactoryLabelProvider
instancepublic static java.lang.String getMessage(org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<? extends org.eclipse.viatra.query.runtime.api.IPatternMatch> matcher, int matchesSize, java.lang.String patternFqn)
matcher
- matchesSize
- patternFqn
- public static java.lang.String getMessage(org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<? extends org.eclipse.viatra.query.runtime.api.IPatternMatch> matcher, int matchesSize, java.lang.String patternFqn, org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory backend)
matcher
- matchesSize
- patternFqn
- backend
- public static java.lang.String getMessage(org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<? extends org.eclipse.viatra.query.runtime.api.IPatternMatch> matcher, int matchesSize, java.lang.String patternFqn, boolean isGenerated, boolean isFiltered, java.lang.String exceptionMessage, org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory backend)
matcher
- the ViatraQueryMatcher
instancematchesSize
- the size of the matchsetpatternFqn
- the pattern fqnisGenerated
- true, if the matcher is generated, false if genericisFiltered
- true, if the matcher is filtered, false otherwisepublic static java.lang.String getQueryBackendName(org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory backend)
backend
- IQueryBackend
implementation.public static java.lang.String getMessage(org.eclipse.viatra.query.runtime.api.IPatternMatch match)
patternName
- the name of the patternpublic org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel extractPatternModelFromResource(org.eclipse.emf.ecore.resource.Resource resource)
public org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel parseEPM(org.eclipse.core.resources.IFile file)
PatternModel
.file
- the .vql file instance