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.
Difference between revisions of "Eclipse4/RCP/Modeled UI/Modifying the Model"
< Eclipse4 | RCP | Modeled UI
(New page: The Eclipse 4 application model is backed by interfaces exposing simple POJO methods. Please see below for some sample code. <source lang="java"> // change the label of a menu item menuIt...) |
|||
Line 10: | Line 10: | ||
// get a list of child windows | // get a list of child windows | ||
List<MWindow> childWindows = mainWindow.getWindows(); | List<MWindow> childWindows = mainWindow.getWindows(); | ||
+ | </source> | ||
+ | |||
+ | ==Reparenting an Element== | ||
+ | When a drag-and-drop operation has been performed, one part may be moved from one stack to another stack. This can be executed with the code below. | ||
+ | |||
+ | <source lang="java"> | ||
+ | List<MStackElement> children = otherStack.getChildren(); | ||
+ | children.add(draggedPart); | ||
</source> | </source> |
Revision as of 13:50, 11 April 2011
The Eclipse 4 application model is backed by interfaces exposing simple POJO methods. Please see below for some sample code.
// change the label of a menu item menuItem.setLabel("New Name"); // mark a part as being dirty part.setDirty(true); // get a list of child windows List<MWindow> childWindows = mainWindow.getWindows();
Reparenting an Element
When a drag-and-drop operation has been performed, one part may be moved from one stack to another stack. This can be executed with the code below.
List<MStackElement> children = otherStack.getChildren(); children.add(draggedPart);