Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355460 - Convenient way to create editparts at runtime
Summary: Convenient way to create editparts at runtime
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-23 02:48 EDT by Ralph Gerbig CLA
Modified: 2011-08-23 02:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Gerbig CLA 2011-08-23 02:48:01 EDT
Build Identifier: Convenient way to create editparts at runtime

In the forums I see very often that users need to create editparts at runtime. These editparts do not be connected to domain elements. Currently there is no way to create such an editpart at runtime. My use case for example:

I need to dynamicaly add labels to a line. These labels need to be able to be moved. Manipulating a figure is not enough in this case, because the labels cannot be moved to. The user cann display any information he likes in these labels. So I do not always present the same things in these labels. The user can define own mappings at runtime. As the number of labels and their content is arbitray I cannot predefine these labels in the gmfmap. The solution to my problem would be a EditPartFactory that can be used like this: 
Wrapping Label wl = EditPartFactory.createEditPart(WrappingLabel.class)
wl.setTex("My Text").

Reproducible: Always