org.eclipse.ocl.common
Class OCLCommon

java.lang.Object
  extended by org.eclipse.ocl.common.OCLCommon
All Implemented Interfaces:
OCLConstants

public class OCLCommon
extends java.lang.Object
implements OCLConstants

The Facade for common Eclipse OCL facilities.


Field Summary
static java.lang.String PLUGIN_ID
           
 
Fields inherited from interface org.eclipse.ocl.common.OCLConstants
OCL_DELEGATE_URI, OCL_DELEGATE_URI_LPG, OCL_DELEGATE_URI_SLASH
 
Constructor Summary
OCLCommon()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUGIN_ID

public static final java.lang.String PLUGIN_ID
See Also:
Constant Field Values
Constructor Detail

OCLCommon

public OCLCommon()
Method Detail

getDefaultDefaultDelegationMode

public static java.lang.String getDefaultDefaultDelegationMode()
Return the default value of the "default.delegation.mode" preference, returning the LPG value for now. .

Since:
1.1

getDelegateAnnotation

public 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/


getDelegateAnnotation

public 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/


getPreference

public static <T> T getPreference(PreferenceableOption<T> option,
                                  org.eclipse.core.runtime.preferences.IScopeContext[] contexts)
Return the preference value for

Parameters:
option -
contexts -

installListener

public static <T> void installListener(PreferenceableOption<T> option)
Install an IPreferenceChangeListener so that option.fireChanged() is notified of any change in the Eclipse preference.

Since:
1.1

isDelegateURI

public 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.