Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Eclipse4/RCP/Modeled UI/Tags"

< Eclipse4‎ | RCP‎ | Modeled UI
Line 4: Line 4:
 
|+ Eclipse E4 Model Tags
 
|+ Eclipse E4 Model Tags
 
|-
 
|-
! style="width: 10%"; Tag  
+
! style="width: 10%"| Tag  
! style="width: 50%"; Description  
+
! style="width: 50%"| Description  
! style="width: 20%"; Applies to  
+
! style="width: 20%"| Applies to  
! style="width: 20%"; |Defined by
+
! style="width: 20%"| |Defined by
 
|-
 
|-
 
| persistState false|true
 
| persistState false|true

Revision as of 10:07, 11 May 2022

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.

Eclipse E4 Model Tags
Tag Description Applies to |Defined by
true Whether the workbench should save and restore

its state. Individual model elements can add it to their persistedState with the value of "false" to declare that they should not be persisted.

 ?? IWorkbench.PERSIST_STATE


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 ToolControls 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)

Back to the top