Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Eclipse4/RCP/Modeled UI/Tags"
(Add known tags) |
|||
Line 3: | Line 3: | ||
== MPart == | == MPart == | ||
− | A part can be annotated with a "NoMove" tag to indicate that the | + | A part can be annotated with a <code>"NoMove"</code> tag to indicate that the drag-and-drop system should not allow the user to move this part. (Defined by <code>IPresentationEngine.NO_MOVE</code>) |
== MPartStack == | == MPartStack == | ||
− | Parts within a part stack can be annotated with a | + | Parts within a part stack can be annotated with a <code>"NoClose"</code> tag to indicate that the part should not be closeable. The SWT renderer will configure the corresponding <code>CTabFolder</code> to not display an "X" to close the part. (Defined by <code>IPresentationEngine.NO_CLOSE</code>) |
− | Parts within a part stack can be annotated with a | + | Parts within a part stack can be annotated with a <code>"NoTitle"</code> tag to indicate that the part should not have a rendered title. (Defined by <code>IPresentationEngine.NO_TITLE</code>) |
== MTrimBar == | == MTrimBar == | ||
− | A TrimBar will replace | + | A <code>TrimBar</code> will replace <code>ToolControl</code>s with a <code>"stretch"</code> tag with stretchable space. A ToolControl with <code>"glue"</code> will ensure its siblings are kept together on the same line. The following example will cause the <code>"find"</code> control to be placed flush right: |
− | < | + | |
+ | <source lang="xml"> | ||
<menu:TrimBars> | <menu:TrimBars> | ||
<menu:ToolControl contributionURI="platform:/plugin/blah/blah"> | <menu:ToolControl contributionURI="platform:/plugin/blah/blah"> | ||
Line 21: | Line 22: | ||
<menu:ToolControl elementId="com.example.find" contributionURI="platform:/plugin/com.example.find/com.example.FindTextField"/> | <menu:ToolControl elementId="com.example.find" contributionURI="platform:/plugin/com.example.find/com.example.FindTextField"/> | ||
</menu:TrimBars> | </menu:TrimBars> | ||
− | </ | + | </source> |
(defined by TrimBarLayout) | (defined by TrimBarLayout) |
Revision as of 11:40, 21 June 2011
Most model elements support additional annotations called "tags". These tags are free-form strings; the model renderer may interpret certain tags to configure how an element is to be rendered. Several of these tags are defined on IPresentationEngine.
MPart
A part can be annotated with a "NoMove"
tag to indicate that the drag-and-drop system should not allow the user to move this part. (Defined by IPresentationEngine.NO_MOVE
)
MPartStack
Parts within a part stack can be annotated with a "NoClose"
tag to indicate that the part should not be closeable. The SWT renderer will configure the corresponding CTabFolder
to not display an "X" to close the part. (Defined by IPresentationEngine.NO_CLOSE
)
Parts within a part stack can be annotated with a "NoTitle"
tag to indicate that the part should not have a rendered title. (Defined by IPresentationEngine.NO_TITLE
)
MTrimBar
A TrimBar
will replace ToolControl
s with a "stretch"
tag with stretchable space. A ToolControl with "glue"
will ensure its siblings are kept together on the same line. The following example will cause the "find"
control to be placed flush right:
<menu:TrimBars> <menu:ToolControl contributionURI="platform:/plugin/blah/blah"> <tags>stretch</tags> </menu:ToolControl> <menu:ToolControl elementId="com.example.find" contributionURI="platform:/plugin/com.example.find/com.example.FindTextField"/> </menu:TrimBars>
(defined by TrimBarLayout)