| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <title>4.1.2. Walkthrough</title> |
| <link rel="stylesheet" type="text/css" href="../../css/style.css"> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> |
| <link rel="home" href="../index.html" title="Jubula Developer Manual"> |
| <link rel="up" href="creating-an-accessibility-plug-in.html" title="4.1. Creating an accessibility plug-in"> |
| <link rel="prev" href="setting-up-your-workspace.html" title="4.1.1. Setting up your Workspace"> |
| <link rel="next" href="gefreference.html" title="4.2. Accessibility plug-in example"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <div class="navheader"> |
| <table width="100%" summary="Navigation header"> |
| <tr><th colspan="3" align="center">4.1.2. Walkthrough</th></tr> |
| <tr> |
| <td width="20%" align="left"> |
| <a accesskey="p" href="setting-up-your-workspace.html">Prev</a> </td> |
| <th width="60%" align="center">4.1. Creating an accessibility plug-in</th> |
| <td width="20%" align="right"> <a accesskey="n" href="gefreference.html">Next</a> |
| </td> |
| </tr> |
| </table> |
| <hr> |
| </div> |
| <div xmlns:d="http://docbook.org/ns/docbook" class="breadcrumbs"> |
| <span class="breadcrumb-link"><a href="../index.html">Jubula Developer Manual</a></span> > <span class="breadcrumb-link"><a href="creating-gef-toolkit-extensions.html">Creating GEF toolkit extensions</a></span> > <span class="breadcrumb-link"><a href="creating-an-accessibility-plug-in.html">Creating an accessibility plug-in</a></span> > <span class="breadcrumb-node">Walkthrough</span> |
| </div> |
| <div class="section"> |
| <div class="titlepage"><div><div><h3 class="title"> |
| <a name="walkthrough"></a>4.1.2. Walkthrough</h3></div></div></div> |
| <p> |
| 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 <span class="input">IEditPartIdentifier</span> from the package |
| named |
| <span class="emphasis"><em>org.eclipse.jubula.rc.rcp.e3.gef.identifier</em></span> |
| and provides additional and/or more precise information about a |
| specific <span class="input">EditPart</span> from the package named |
| <span class="emphasis"><em>org.eclipse.gef</em></span>. 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 <a class="xref" href="gefreference.html" title="4.2. Accessibility plug-in example">Section 4.2, “Accessibility plug-in example”</a>, which |
| shows a sample implementation. |
| </p> |
| <p> |
| The next step is to create an adapter factory. This extension |
| provides information regarding which identifier to use for each |
| edit part. |
| </p> |
| <div class="orderedlist"><ol class="orderedlist" type="1"> |
| <li class="listitem"><p> |
| Open the <span class="input">plugin.xml</span> file from your |
| accessibility plug-in and select the |
| <span class="strong"><strong>Extension</strong></span> tab. |
| </p></li> |
| <li class="listitem"><p> |
| Add an instance of the |
| <span class="emphasis"><em>org.eclipse.core.runtime.adapters</em></span> |
| extension. |
| </p></li> |
| <li class="listitem"><p> |
| Add a <span class="strong"><strong>factory</strong></span> to the new |
| extension for each type of GEF component for which you wish |
| to provide accessibility. Each factory must implement |
| <span class="input">IEditPartIdentifier</span> from the package named |
| <span class="emphasis"><em>org.eclipse.jubula.rc.rcp.e3.gef.identifier</em></span> |
| to provide adapters from the GEF component that implements |
| <span class="input">EditPart</span> from |
| <span class="emphasis"><em>org.eclipse.gef</em></span>. |
| </p></li> |
| <li class="listitem"><p> |
| Once you have defined your adapter factory, you will need to |
| implement it. Your adapter factory, which must implement |
| <span class="input">IAdapaterFactory</span> from the package named |
| <span class="emphasis"><em>org.eclipse.core.runtime</em></span>, provides |
| appropriate instances of your created identifiers for a |
| given edit part. See <a class="xref" href="gefreference.html" title="4.2. Accessibility plug-in example">Section 4.2, “Accessibility plug-in example”</a> for a sample |
| implementation. |
| </p></li> |
| <li class="listitem"> |
| <p> |
| Once you have created your identifiers<br xmlns:d="http://docbook.org/ns/docbook"> and adapter |
| factories, you can export and deploy your plug-in to use it |
| in your AUT. |
| </p> |
| <p xmlns:d="http://docbook.org/ns/docbook"><table> |
| <colgroup> |
| <col> |
| <col> |
| </colgroup> |
| <tbody><tr> |
| <td><img align="bottom" width="100" height="91" src="../images/img2.jpg"></td> |
| <td class="topbotline"><span class="strong"><strong> |
| When starting your AUT after adding |
| or replacing your accessibility plug-in, it is recommended |
| that the AUT starts with the <span class="input">-clean</span> |
| parameter. |
| </strong></span></td> |
| </tr></tbody> |
| </table></p> |
| </li> |
| </ol></div> |
| </div> |
| <br xmlns:d="http://docbook.org/ns/docbook"><hr xmlns:d="http://docbook.org/ns/docbook"> |
| <address xmlns:d="http://docbook.org/ns/docbook">Copyright BREDEX GmbH 2015. Made available under the Eclipse Public License v1.0.</address> |
| <br xmlns:d="http://docbook.org/ns/docbook"> |
| </body> |
| </html> |