public class TaurusMetaModelUtilities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
METADATA_ANNOTATION_URI
Annotation URI used in ecore file to specify additional AWM specific meta
data.
|
static java.lang.String |
METADATAKEY_AWMTYPE
Key for the "AWM type" attribute which is used to specific attribute
types which have e.g.
|
static java.lang.String |
METADATAKEY_HELPCONTEXTID
Key for the "help context id" annotation which is used to show the help
content when F1 help is invoked with the object selected in the model
editor.
|
static java.lang.String |
METADATAKEY_TOOL_EXECUTOR_VERSION
The tool execution interface version an attribute or object is relevant
for.
|
| Constructor and Description |
|---|
TaurusMetaModelUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Collection<?> |
getAvailableToolTypes()
Deprecated.
tool types are not used anymore with the introduction of
function packages
|
static org.eclipse.emf.ecore.EAnnotation |
getAWMMetaDataAnnotation(org.eclipse.emf.ecore.EModelElement pElement)
Attempts to get the AWM meta data annotation from an EModelElement.
|
static java.lang.String |
getAWMMetadataAnnotationValue(org.eclipse.emf.ecore.EModelElement pElement,
java.lang.String pKey)
Gets an annotation value of the AWM meta data annotation.
|
static org.eclipse.emf.ecore.EClass |
getBaseEClass(org.eclipse.emf.ecore.EClass pEClass)
Gets the
EClass of the first non-dynamic super class. |
static java.lang.String |
getBaseEClassName(org.eclipse.emf.ecore.EObject pEObject)
Gets the
EClass name of the first non-dynamic super class. |
static org.eclipse.emf.ecore.EStructuralFeature |
getIDFeature(org.eclipse.emf.ecore.EObject pObject)
Gets the "iD" feature for the given object (if available).
|
static IFunctionPackageDefinable |
getObjectWithExtensionID(java.lang.String pExtensionID,
java.util.Collection<org.eclipse.emf.ecore.EObject> pObjectToCheck)
Returns the first object in the given list which contains the desired
extension ID.
|
static java.util.Collection<Property> |
getPropertiesFromStructure(IStructure pStructure)
Returns a collection of all
Propertys which are referenced in an
IStructure by parsing all subcomponents
(IStructure.getComponents() /
IStructureComponent.getChildren()). |
static org.eclipse.emf.ecore.EStructuralFeature |
getSequenceNumberFeature(org.eclipse.emf.ecore.EObject pObject)
Gets the "seqNo" feature for the given object (if available).
|
static boolean |
isTaurusForEclipseInstalled()
Deprecated.
only used by deprecated features. Might be removed or not
work in the future.
|
static java.lang.String |
trimAndRemoveQuotes(java.lang.String pString)
Trims the string and removes surrounding quotes.
|
static boolean |
validateSelectionCount(java.lang.String pSelCountCond)
Validates whether the selection count string is valid.
|
public static final java.lang.String METADATA_ANNOTATION_URI
public static final java.lang.String METADATAKEY_AWMTYPE
public static final java.lang.String METADATAKEY_HELPCONTEXTID
public static final java.lang.String METADATAKEY_TOOL_EXECUTOR_VERSION
With AWM V5.0 a new tool execution interface has been introduced, which
rendered many tool descriptor and tool parameter attributes deprecated
(most of them have been deprecated before). This annotation controls
whether attributes of ToolDescriptors or RToolParameters
should be displayed in the model editor, depending on the annotation
value.
Currently there are two three possible annotation states:
1 - The attribute will be displayed for tool descriptors
(and parameters) implementing the old execution interface.
2 - The attribute will be displayed for tool descriptors
(and parameters) implementing the new execution interface.
@Deprecated public static boolean isTaurusForEclipseInstalled()
true if the AWM for Eclipse bundle is installed@Deprecated public static java.util.Collection<?> getAvailableToolTypes()
public static java.lang.String trimAndRemoveQuotes(java.lang.String pString)
Example:
"abc"
Will be returned as
abc
pString - the string to be trimmedpublic static boolean validateSelectionCount(java.lang.String pSelCountCond)
pSelCountCond - the selection count attribute of an enabled condition.true if the given selection count attribute is
valid.ISelectionCondition.getSelectionCount()public static org.eclipse.emf.ecore.EStructuralFeature getSequenceNumberFeature(org.eclipse.emf.ecore.EObject pObject)
pObject - the object to get the sequence number feature fromnull if the given object does
not contain it (or is null itself)public static org.eclipse.emf.ecore.EStructuralFeature getIDFeature(org.eclipse.emf.ecore.EObject pObject)
pObject - the object to get the ID feature fromnull if the given object does
not contain it (or is null itself)public static java.lang.String getBaseEClassName(org.eclipse.emf.ecore.EObject pEObject)
EClass name of the first non-dynamic super class.
Returns the given classe's name, if it's not dynamic.pEObject - the object to get the base EClass name fromDynamicAWMPackage,
EClass.getESuperTypes()public static org.eclipse.emf.ecore.EClass getBaseEClass(org.eclipse.emf.ecore.EClass pEClass)
EClass of the first non-dynamic super class. Returns the
given class, if it's not dynamic.pEClass - the class to get the base class fromDynamicAWMPackage,
EClass.getESuperTypes()public static IFunctionPackageDefinable getObjectWithExtensionID(java.lang.String pExtensionID, java.util.Collection<org.eclipse.emf.ecore.EObject> pObjectToCheck)
pExtensionID - the extension ID to checkpObjectToCheck - a collection of objects to checknull if none of the given
objects has the desired extension IDIFunctionPackageDefinable.getExtensionID()public static java.util.Collection<Property> getPropertiesFromStructure(IStructure pStructure)
Propertys which are referenced in an
IStructure by parsing all subcomponents
(IStructure.getComponents() /
IStructureComponent.getChildren()).pStructure - the IStructure which should be parsed for the
PropertysCollection containing all Propertys referenced
in the subcomponents of the IStructure.public static org.eclipse.emf.ecore.EAnnotation getAWMMetaDataAnnotation(org.eclipse.emf.ecore.EModelElement pElement)
pElement - the element to get the annotation fromnull if the element does not have
itMETADATA_ANNOTATION_URIpublic static java.lang.String getAWMMetadataAnnotationValue(org.eclipse.emf.ecore.EModelElement pElement,
java.lang.String pKey)
pElement - the element to get the annotation frompKey - the desired annotation value keynull if the key is not
defined or no AWM meta data annotation is defined for the elementgetAWMMetaDataAnnotation(EModelElement)Copyright © 2015 Micro Focus GmbH. All rights reserved.