Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
#include <berryIEvaluationService.h>
Static Public Attributes | |
static const QString | RESULT |
static const QString | PROP_NOTIFYING |
Additional Inherited Members | |
Public Types inherited from berry::Object | |
typedef Object | Self |
typedef berry::SmartPointer< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Static Public Member Functions inherited from berry::Object | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
Protected Member Functions inherited from berry::Object | |
Object () | |
virtual | ~Object () |
virtual QDebug | PrintSelf (QDebug os, Indent indent) const |
virtual QDebug | PrintHeader (QDebug os, Indent indent) const |
virtual QDebug | PrintTrailer (QDebug os, Indent indent) const |
Protected Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
Evaluate a core expression against the workbench application context and report updates using a Boolean property. Clients supply an IPropertyChangeListener
that will be notified as changes occur.
This can be used to implement core expressions in client extension points similar to the <enabledWhen> of org.blueberry.ui.handlers/handler
elements.
The service will fire TRUE
and FALSE
for the oldValue and newValue in the property change events.
Adding the evaluation listener will fire one change with oldValue=null
and newValue="evaluated expression". Remove the IEvaluationReference
will fire one change with oldValue="last evaluated value" and newValue=null
.
Adding a service listener will fire the PROP_NOTIFYING property change event with newValue=TRUE
when a source change causes expression evaluations to update and another PROP_NOTIFYING property change event with newValue=FALSE
when the changes that started with a specific source change have finished. The PROP_NOTIFYING change events will not be fired for source changes caused by the outer most recalculations.
Variable sources can be provided to this service using the org.blueberry.ui.services
Extension Point. This makes the available to <with/> expressions.
This service can be acquired from your service locator:
IEvaluationService::Pointer service = GetSite()->GetService(IEvaluationService::GetManifestName());
Definition at line 76 of file berryIEvaluationService.h.
|
pure virtual |
Add a listener that can be notified when the workbench application context causes the expression evaluation value to change.
Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed.
expression | the core expression to evaluate. |
listener | the listener to be notified. |
property | the property contained in the notification |
|
pure virtual |
Re-add a property change listener that has already been removed by RemoveEvaluationListener.
It will only accept IEvaluationReferences returned from a previous call to AddEvaluationListener on this service.
Note: references should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed.
ref | The listener to re-add. |
|
pure virtual |
When a source change starts recalculating expressions the PROP_NOTIFYING property change is fired with the newValue=TRUE
. This property is not fired for any source changes caused by the outer recalculations.
Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed.
listener | The listener to be notified. Must not be null . Has no effect if the listener has already been added. |
berry::IEvaluationService::berryObjectMacro | ( | berry::IEvaluationService | ) |
|
pure virtual |
Get an IEvaluationContext that contains the current state of the workbench application context. This context changes with the application state, but becomes invalid when the global current selection changes.
Note: This context should not be modified.
|
pure virtual |
Remove the listener represented by the evaluation reference.
ref | the reference to be removed. |
|
pure virtual |
Remove the listener for PROP_NOTIFYING property changes.
listener | The listener to remove. Must not be null . Has no effect if the listener is not currently registered. |
|
pure virtual |
Request that this service re-evaluate all registered core expressions that contain a property tester for the given property name. This will fire a PROP_NOTIFYING property change event to service listeners.
Notes:
propertyName | The fully qualified property name, like org.eclipse.core.resources.name . Must not be null . |
|
static |
The property used to notify any service listeners.
Definition at line 88 of file berryIEvaluationService.h.
|
static |
A general property that can be used.
Definition at line 83 of file berryIEvaluationService.h.