public class OCLCommon extends java.lang.Object implements OCLConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PLUGIN_ID |
OCL_DELEGATE_URI, OCL_DELEGATE_URI_LPG, OCL_DELEGATE_URI_SLASH
Constructor and Description |
---|
OCLCommon() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDefaultDefaultDelegationMode()
Return the default value of the "default.delegation.mode" preference, returning the LPG value for now.
|
static org.eclipse.emf.ecore.EAnnotation |
getDelegateAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement)
Return the OCL Delegate EAnnotation, which is an EAnnotation with
OCLConstants.OCL_DELEGATE_URI
as its source, or if no such EAnnotation is present, then the first EAnnotation with a source
whose URI starts with OCLConstants.OCL_DELEGATE_URI and a / character/ |
static java.lang.String |
getDelegateAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement,
java.lang.String key)
Return the keyed detail of an OCL Delegate EAnnotation, which is an EAnnotation with
OCLConstants.OCL_DELEGATE_URI
as its source, or if no such EAnnotation is present, then the first EAnnotation with a source
whose URI starts with OCLConstants.OCL_DELEGATE_URI and a / character/ |
static <T> T |
getPreference(PreferenceableOption<T> option,
org.eclipse.core.runtime.preferences.IScopeContext[] contexts)
Return the preference value for
|
static <T> void |
installListener(PreferenceableOption<T> option)
Install an IPreferenceChangeListener so that option.fireChanged() is notified of any change in the Eclipse preference.
|
static boolean |
isDelegateURI(java.lang.String string)
Return true if string denotes an OCL Delegate, which is the string
OCLConstants.OCL_DELEGATE_URI ,
or a string starting with OCLConstants.OCL_DELEGATE_URI and a / character. |
public static final java.lang.String PLUGIN_ID
public static java.lang.String getDefaultDefaultDelegationMode()
public static org.eclipse.emf.ecore.EAnnotation getDelegateAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement)
OCLConstants.OCL_DELEGATE_URI
as its source, or if no such EAnnotation is present, then the first EAnnotation with a source
whose URI starts with OCLConstants.OCL_DELEGATE_URI
and a / character/public static java.lang.String getDelegateAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement, java.lang.String key)
OCLConstants.OCL_DELEGATE_URI
as its source, or if no such EAnnotation is present, then the first EAnnotation with a source
whose URI starts with OCLConstants.OCL_DELEGATE_URI
and a / character/public static <T> T getPreference(PreferenceableOption<T> option, org.eclipse.core.runtime.preferences.IScopeContext[] contexts)
option
- contexts
- public static <T> void installListener(PreferenceableOption<T> option)
public static boolean isDelegateURI(java.lang.String string)
OCLConstants.OCL_DELEGATE_URI
,
or a string starting with OCLConstants.OCL_DELEGATE_URI
and a / character.