Medical Imaging Interaction Toolkit  2021.02.99-c051ab3b
Medical Imaging Interaction Toolkit
berry::PropertyTester Class Reference

#include <berryPropertyTester.h>

Inheritance diagram for berry::PropertyTester:
Collaboration diagram for berry::PropertyTester:

Public Member Functions

void InternalInitialize (PropertyTesterDescriptor::Pointer descriptor)
PropertyTesterDescriptor::Pointer InternalCreateDescriptor ()
bool Handles (const QString &namespaze, const QString &property) override
bool IsInstantiated () override
bool IsDeclaringPluginActive () override
IPropertyTesterInstantiate () override
- Public Member Functions inherited from berry::IPropertyTester
 berryObjectMacro (berry::IPropertyTester)
 ~IPropertyTester () override
virtual bool Test (Object::ConstPointer receiver, const QString &property, const QList< Object::Pointer > &args, Object::Pointer expectedValue)=0
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
virtual Reflection::TypeInfo GetTypeInfo () const
virtual QList< Reflection::TypeInfoGetSuperclasses () const
virtual void Delete ()
QDebug Print (QDebug os, Indent Indent=0) const
virtual QString ToString () const
virtual uint HashCode () const
virtual bool operator< (const Object *) const
void Register () const
void UnRegister (bool del=true) const
int GetReferenceCount () const
void SetReferenceCount (int)
void AddDestroyListener (const MessageAbstractDelegate<> &delegate) const
void RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const
virtual bool operator== (const Object *) const

Additional Inherited Members

- Public Types inherited from berry::Object
typedef Object Self
typedef berry::SmartPointer< SelfPointer
typedef berry::SmartPointer< const SelfConstPointer
typedef berry::WeakPointer< SelfWeakPtr
typedef berry::WeakPointer< const SelfConstWeakPtr
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
static Reflection::TypeInfo GetStaticTypeInfo ()
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
- 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

Detailed Description

Abstract superclass of all property testers. Implementation classes of the extension point org.blueberry.core.expresssions.propertyTesters must extend PropertyTester.

A property tester implements the property tests enumerated in the property tester extension point. For the following property test extension


the corresponding implementation class looks like:

public class MyPackageFragmentTester {
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
IPackageFragment fragement= (IPackageFragment)receiver;
if ("isDefaultPackage".equals(property)) {
return expectedValue == null
? fragement.isDefaultPackage()
: fragement.isDefaultPackage() == ((Boolean)expectedValue).booleanValue();
return false;

The property can then be used in a test expression as follows:

  <instanceof value="org.blueberry.core.IPackageFragment"/>
  <test property="org.blueberry.jdt.core.isDefaultPackage"/>

There is no guarantee that the same instance of a property tester is used to handle <test property="..."/> requests. So property testers should always be implemented in a stateless fashion.

Definition at line 68 of file berryPropertyTester.h.

Member Function Documentation

◆ Handles()

bool berry::PropertyTester::Handles ( const QString &  namespaze,
const QString &  property 

Returns whether the property tester can handle the given property or not.

namespazethe name space to be considered
propertythe property to test
true if the tester provides an implementation for the given property; otherwise false is returned

Implements berry::IPropertyTester.

◆ Instantiate()

IPropertyTester* berry::PropertyTester::Instantiate ( )

Loads the implementation class for this property tester and returns an instance of this class.

an instance of the implementation class for this property tester
CoreExceptionif the implementation class cannot be loaded

Implements berry::IPropertyTester.

◆ InternalCreateDescriptor()

PropertyTesterDescriptor::Pointer berry::PropertyTester::InternalCreateDescriptor ( )

Note: this method is for internal use only. Clients must not call this method.

the property tester descriptor

◆ InternalInitialize()

void berry::PropertyTester::InternalInitialize ( PropertyTesterDescriptor::Pointer  descriptor)

Initialize the property tester with the given name space and property.

Note: this method is for internal use only. Clients must not call this method.

descriptorthe descriptor object for this tester

◆ IsDeclaringPluginActive()

bool berry::PropertyTester::IsDeclaringPluginActive ( )

Returns true if the implementation class of this property tester can be loaded. This is the case if the plug-in providing the implementation class is active. Returns false otherwise.

whether the implementation class can be loaded or not

Implements berry::IPropertyTester.

◆ IsInstantiated()

bool berry::PropertyTester::IsInstantiated ( )

Returns whether the implementation class for this property tester is loaded or not.

trueif the implementation class is loaded; false otherwise

Implements berry::IPropertyTester.

The documentation for this class was generated from the following file: