Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <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" /> |
| 4 | <link rel=stylesheet type="text/css" href="../css/book.css"> |
| 5 | <link rel=stylesheet type="text/css" href="otjld/css/ot.css"> |
| 6 | <link rel=stylesheet type="text/css" href="otguide.css"> |
| 7 | <style type="text/css"> |
| 8 | body { margin:10px; } |
| 9 | .high { background-color:#a5b7bd;color:white; } |
| 10 | .low { background-color:#fff0c8; padding:2px; } |
| 11 | .caption { text-decoration:underline; vertical-align:top;position:relative;top:20px; margin-top:10px;} |
| 12 | </style> |
| 13 | <title>Binding markers</title> |
| 14 | <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| 15 | </head> |
| 16 | <body> |
| 17 | <h1>Binding markers</h1> |
Stephan Herrmann | 1e73ed0 | 2014-06-09 19:51:54 +0200 | [diff] [blame] | 18 | <p><b>Binding</b> <a href="PLUGINS_ROOT/org.eclipse.platform.doc.user/concepts/concepts-11.htm"> |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 19 | markers</a> are OT/J specific annotations on the vertical ruler (marker bar) left of the |
| 20 | extended <a href="editor.html">Java Editor</a>. These markers come in three flavors: |
| 21 | <ul> |
| 22 | <li>A <b>playedBy marker</b> <img src="../images/playedBy_obj.gif"> signals that one or more roles is bound |
Stephan Herrmann | 8740b76 | 2011-08-28 21:42:36 +0000 | [diff] [blame] | 23 | to the current class using <code class="keyword">playedBy</code> (<a href="otjld/def/s2.html#s2.1"><img src="../images/ot_paragraph.png"> 2.1</a>).</li> |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 24 | <li>A <b>callin marker</b> <img src="../images/callinbinding_obj.gif"> signals that one or more callin bindings |
Stephan Herrmann | 8740b76 | 2011-08-28 21:42:36 +0000 | [diff] [blame] | 25 | (<a href="otjld/def/s4.html#s4"><img src="../images/ot_paragraph.png"> 4</a>) affect the given base method. |
| 26 | <li>A <b>callout marker</b> <img src="../images/callout_marker.gif"> signals that one or more callout bindings (<a href="otjld/def/s3.html#s3"><img src="../images/ot_paragraph.png"> 3</a>) |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 27 | affect the given base method <b>and</b> that these callout bindings apply decapsulation |
Stephan Herrmann | 8740b76 | 2011-08-28 21:42:36 +0000 | [diff] [blame] | 28 | (<a href="otjld/def/s3.html#s3.4"><img src="../images/ot_paragraph.png"> 3.4</a>) |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 29 | — (callout bindings <em>without</em> decapsulation are ranked like regular method calls |
| 30 | and thus not considered relevant for marking in the ruler). |
| 31 | </ul> |
| 32 | <table> |
| 33 | <tr><td class="caption">PlayedBy and callin markers</td> |
| 34 | <td><img src="images/screenshots/callinmarkers.png" |
| 35 | alt="Callin marker annotation in vertical ruler (marker bar)"> |
| 36 | </tr> |
| 37 | <tr><td class="caption">Callout decapsulation marker</td> |
| 38 | <td><img src="images/screenshots/calloutmarker.png" |
| 39 | alt="Callout decapsulation marker annotation in vertical ruler (marker bar)"> |
| 40 | </tr> |
| 41 | </table> |
| 42 | <p> |
| 43 | Aside from raising awareness of these bindings, the markers can also be used to directly |
| 44 | navigate to the corresponding role or callin/callout binding. |
| 45 | When right clicking on a binding marker a pop-up menu will open which contains |
| 46 | a corresponding submenu <span class="ui">OT/J bound roles</span>, or <span class="ui">OT/J callin bindings</span>, or <span class="ui">OT/J callout decapsulation</span>. |
| 47 | This submenu in turn holds all bindings relevant at the current position, |
| 48 | sorted by teams. |
| 49 | </p> |
| 50 | <table> |
| 51 | <tr><td class="caption">PlayedBy marker menu |
| 52 | <td><img src="images/screenshots/callinmarker-menu.png" |
| 53 | alt="PlayedBy marker menu"> |
| 54 | </tr> |
| 55 | <tr><td class="caption">Callin marker menu |
| 56 | <td><img src="images/screenshots/callinmarker-menu3.png" |
| 57 | alt="Callin marker menu"> |
| 58 | </tr> |
| 59 | </table> |
| 60 | <p> |
| 61 | Binding markers are enabled/disabled globally on the <span class="ui">Object Teams</span> preference page.<br> |
| 62 | Detailed configuration is possible via <span class="ui">Window->Preferences->General->Editors->Text Editors->Annotations</span> |
| 63 | </p> |
Stephan Herrmann | 1ef445d | 2012-06-09 01:02:42 +0200 | [diff] [blame] | 64 | <p> |
| 65 | Whenever the same base method is affected by multiple callin bindings of the same kind (before, replace or after), |
| 66 | the compiler will add a warning marker. This should help to prevent situations where different callin bindings |
| 67 | could potentiall interfere with each other. |
| 68 | </p> |
| 69 | <table> |
| 70 | <tr><td class="caption">Multiple-callins marker |
| 71 | <td><img src="images/screenshots/NN21/MultipleCallins.png" |
| 72 | alt="Warning marker for multiple callin bindings"> |
| 73 | </tr> |
| 74 | </table> </body> |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 75 | </html> |