4.1.2. Walkthrough

The first step for implementing your accessibility plug-in is to create identifiers for each type of GEF component that you wish to make accessible for tests. An identifier is a Java class that implements IEditPartIdentifier from the package named org.eclipse.jubula.rc.rcp.e3.gef.identifier and provides additional and/or more precise information about a specific EditPart from the package named org.eclipse.gef. The granularity of your identifier classes will depend on the class hierarchy of the edit parts in the AUT. For example, if many of the edit parts share a common superclass, then you can write a single Identifier for that superclass that will be able to provide accessibility for all edit parts that inherit from that superclass. See the example in Section 4.2, “Accessibility plug-in example”, which shows a sample implementation.

The next step is to create an adapter factory. This extension provides information regarding which identifier to use for each edit part.

  1. Open the plugin.xml file from your accessibility plug-in and select the Extension tab.

  2. Add an instance of the org.eclipse.core.runtime.adapters extension.

  3. Add a factory to the new extension for each type of GEF component for which you wish to provide accessibility. Each factory must implement IEditPartIdentifier from the package named org.eclipse.jubula.rc.rcp.e3.gef.identifier to provide adapters from the GEF component that implements EditPart from org.eclipse.gef. If you want to use the check Anchor count Action to differentiate between incoming and outgoing connections you must implement IExtendedEditPartIdentifier from the package named org.eclipse.jubula.rc.rcp.e3.gef.identifier.

  4. Once you have defined your adapter factory, you will need to implement it. Your adapter factory, which must implement IAdapaterFactory from the package named org.eclipse.core.runtime, provides appropriate instances of your created identifiers for a given edit part. See Section 4.2, “Accessibility plug-in example” for a sample implementation.

  5. Once you have created your identifiers
    and adapter factories, you can export and deploy your plug-in to use it in your AUT.

    When starting your AUT after adding or replacing your accessibility plug-in, it is recommended that the AUT starts with the -clean parameter.



Copyright BREDEX GmbH 2015. Made available under the Eclipse Public License v1.0.