| <html> |
| <head> |
| <meta name="copyright" content="Copyright Technical University Berlin and others 2004, 2010. This page is made available under the Eclipse Public License v1.0. For full details see http://www.eclipse.org/legal/epl-v10.html" /> |
| <link rel=stylesheet type="text/css" href="../css/book.css"> |
| <link rel=stylesheet type="text/css" href="otjld/css/ot.css"> |
| <link rel=stylesheet type="text/css" href="otguide.css"> |
| <title>Java editor with Object Teams capability</title> |
| <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| </head> |
| <body> |
| <h1>Java editor with Object Teams capability</h1> |
| The extended Java editor provides specialized features for editing |
| OT/J code. The original <a href="/help/topic/org.eclipse.jdt.doc.user/concepts/concepts-java-editor.htm">Java editor</a> |
| has been extended for the following features: |
| <ul> |
| <li><b>Navigation</b> support for Object Teams elements (F3 = <span class="ui">Open Declaration</span>, see below)</li> |
| <li><b>Syntax highlighting</b> for OT/J keywords and modifiers.<br /> |
| OT/J keywords are enabled based on the contents of the file being edited. |
| This way the same editor still handles plain Java sources <i>without</i> interpreting OT/J keywords.<br/> |
| However, within an OT/J file syntax highlighting is determined in a context-free manner, |
| which means that scoped keywords |
| (<a href="otjld/def/sA.html#sA.0.1"><img src="../images/ot_paragraph.png"> A.0.1</a>) |
| like <code class="keyword">after, base, before, get, result, set</code> are highlighted, |
| even in situations where they have no special meaning. |
| </li> |
| <li><a href="contentassist.html"><b>Content/code assist</b> (code completions)</a> for Object Teams program elements. |
| </li> |
| <li><b>Templates (source patterns)</b> for Object Teams specific language constructs |
| using content assist (<b>Ctrl+Space</b>), |
| e.g. <code class="keyword">within</code> (<i>Expression</i>) <i>Statement</i> |
| </li> |
| <li>New <a href="callinmarker.html"><b>binding marker</b></a> annotations in the vertical ruler (for base classes/methods bound using playedBy/callin/callout) |
| allowing navigation to the affecting role. |
| </li> |
| </ul> |
| <h2><a name="navigation">Navigation</a></h2> |
| Obvious enhancements for the normal F3 navigation regard the following: |
| <ul> |
| <li>Go to a role's base class using the <code class="keyword">playedBy</code> clause.</li> |
| <li>Go to a bound base method or a bound field using a callout or callin binding<br /> |
| (the opposite direction is supported by <a href="callinmarker.html">binding markers</a>).</li> |
| </ul> |
| Navigating <strong>role files</strong> |
| (<a href="otjld/def/s1.html#s1.2.5"><img src="../images/ot_paragraph.png"> 1.2.5</a>): |
| <ul> |
| <li>Hitting F3 on the <code class="keyword">team package</code> declarations jumps to the enclosing team.</li> |
| <li>In order to navigate from a team to its role file use the quick outline |
| by hitting <code>Ctrl-O</code> twice:<br /> |
| role files will be offered for selection along inline members.</li> |
| <li>If javadoc <code>@role</code> tags are used as recommended for listing all role files of the current team |
| (<a href="otjld/def/s1.html#s1.2.5.d"><img src="../images/ot_paragraph.png"> 1.2.5(d)</a>), |
| the role names in these tags support F3-navigation to the corresponding roles, too.</li> |
| </ul> |
| Navigating the <strong>implicit role hierarchy</strong> (<a href="otjld/def/s1.html#s1.3.1"><img src="../images/ot_paragraph.png"> 1.3.1</a>): |
| <ul> |
| <li>A role class that overrides a corresponding role from the super team is decorated with an override marker (<img src="images/over_co.gif">) in the vertical ruler, |
| which supports the <span class="ui">Open Super Implementation</span> action.</li> |
| <li>A role method overriding a corresponding method from any explicit or implicit super role |
| are also decorated with an override marker (<img src="images/over_co.gif">) supporting navigation to the overridden method.</li> |
| </ul> |
| </body> |
| </html> |