Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.core.expressions
Class PropertyTester  view PropertyTester download PropertyTester.java

java.lang.Object
  extended byorg.eclipse.core.expressions.PropertyTester
All Implemented Interfaces:
IPropertyTester

public abstract class PropertyTester
extends java.lang.Object
implements IPropertyTester

Abstract superclass of all property testers. Implementation classes of the extension point org.eclipse.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

   <propertyTester
     	 namespace="org.eclipse.jdt.core"
       id="org.eclipse.jdt.core.IPackageFragmentTester"
       properties="isDefaultPackage"
       type="org.eclipse.jdt.core.IPackageFragment"
       class="org.eclipse.demo.MyPackageFragmentTester">
     </propertyTester>
 
the corresponding implemenation class looks like:
   public class MyPackageFragmentTester {
       public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
           IPackageFragment fragement= (IPackageFragment)receiver;
	         if ("isDefaultPackage".equals(method)) { 
               return fragement.isDefaultPackage();
           }
           Assert.isTrue(false);
           return false;
       }
   }
 
The property can then be used in a test expression as follows:
   <instanceof value="org.eclipse.core.IPackageFragment"/>
   <test property="org.eclipse.jdt.core.isDefaultPackage"/>
 

Since:
3.0

Field Summary
private  org.eclipse.core.runtime.IConfigurationElement fConfigElement
           
private  java.lang.String fNamespace
           
private  java.lang.String fProperties
           
 
Constructor Summary
PropertyTester()
           
 
Method Summary
 boolean handles(java.lang.String namespace, java.lang.String property)
          null
 IPropertyTester instantiate()
          null
 org.eclipse.core.internal.expressions.PropertyTesterDescriptor internalCreateDescriptor()
          Note: this method is for internal use only.
 void internalInitialize(org.eclipse.core.internal.expressions.PropertyTesterDescriptor descriptor)
          Initialize the property tester with the given name space and property.
 boolean isDeclaringPluginActive()
          null
 boolean isInstantiated()
          null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.expressions.IPropertyTester
test
 

Field Detail

fConfigElement

private org.eclipse.core.runtime.IConfigurationElement fConfigElement

fNamespace

private java.lang.String fNamespace

fProperties

private java.lang.String fProperties
Constructor Detail

PropertyTester

public PropertyTester()
Method Detail

internalInitialize

public final void internalInitialize(org.eclipse.core.internal.expressions.PropertyTesterDescriptor 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.


internalCreateDescriptor

public final org.eclipse.core.internal.expressions.PropertyTesterDescriptor internalCreateDescriptor()
Note: this method is for internal use only. Clients must not call this method.


handles

public final boolean handles(java.lang.String namespace,
                             java.lang.String property)
null

Specified by:
handles in interface IPropertyTester

isInstantiated

public final boolean isInstantiated()
null

Specified by:
isInstantiated in interface IPropertyTester

isDeclaringPluginActive

public boolean isDeclaringPluginActive()
null

Specified by:
isDeclaringPluginActive in interface IPropertyTester

instantiate

public final IPropertyTester instantiate()
null

Specified by:
instantiate in interface IPropertyTester