public class XbaseUtils extends Object
Constructor and Description |
---|
XbaseUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getActionName(org.eclipse.xtext.xbase.XMemberFeatureCall actionCall)
Returns the name of the action corresponding to the provided
actionCall . |
static String |
getPlatformName(org.eclipse.xtext.xbase.XMemberFeatureCall actionCall)
Returns the name of the platform corresponding to the provided
actionCall . |
static boolean |
isPlatformActionCall(org.eclipse.xtext.xbase.XMemberFeatureCall featureCall,
RuntimePlatformRegistry registry)
Returns
true if the provided featureCall is a platform's action call, false otherwise. |
public static boolean isPlatformActionCall(org.eclipse.xtext.xbase.XMemberFeatureCall featureCall, RuntimePlatformRegistry registry)
true
if the provided featureCall
is a platform's action call, false
otherwise.featureCall
- the XMemberFeatureCall
to checkregistry
- the RuntimePlatformRegistry
containing the loaded
PlatformDefinition
s.true
if the provided featureCall
is a platform's action call, false
otherwisepublic static String getPlatformName(org.eclipse.xtext.xbase.XMemberFeatureCall actionCall)
actionCall
.
The qualified name of the provided actionCall
matches the following pattern: Platform.Action
.
This method extracts the name of the platform and returns it as a String
.
actionCall
- the XMemberFeatureCall
representing the action call to retrieve the platform name fromNullPointerException
- if the provided actionCall
is null
IllegalStateException
- if the actionCall
's qualified name doesn't follow the Platform
.Action
templatepublic static String getActionName(org.eclipse.xtext.xbase.XMemberFeatureCall actionCall)
actionCall
.
The qualified name of the provided actionCall
matches the following pattern: Platform.Action
.
This method extracts the name of the action and returns it as a String
.
actionCall
- the XMemberFeatureCall
representing the action call to retrieve the action name fromNullPointerException
- if the provided actionCall
is null
IllegalStateException
- if the actionCall
's qualified name doesn't follow the Platform
.Action
templateCopyright © 2020 SOM Research Lab. All rights reserved.