Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 508987

Summary: Support creation and deletion of root content via CreationPolicy and DeletionPolicy.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 1.0.0   
Target Milestone: 5.0.0 (Oxygen) M5   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2016-12-09 08:27:27 EST
Currently, the CreationPolicy and DeletionPolicy only support the creation and deletion of nested content, but do not support the creation and deletion of root content, i.e. changes to the IViewer#contentsProperty() cannot be performed using CreationPolicy and DeletionPolicy.

We should allow the creation and deletion of root content using the CreationPolicy and DeletionPolicy. Therefore, the CreationPolicy should be extended to allow the creation of content for an IRootPart as the parent, and the DeletionPolicy should be extended to allow the deletion of a part whose parent is an IRootPart.
Comment 1 Alexander Nyßen CLA 2016-12-09 09:08:36 EST
I generalized the contract of CreationPolicy and DeletionPolicy to properly handle root content. We should change the logo example to no longer use model part, so this functionality gets used in the example code (up to now I have only roughly tested it with a modified palette example).
Comment 2 Alexander Nyßen CLA 2017-01-02 09:07:18 EST
I pushed the following changes to origin/master:

- Removed GeometricModelPart from logo example so that content creation and deletion is performed using the root part.
- Exposed layers of LayeredRootPart, so content creation can obtain the content layer.

The example thus now makes use of this functionality. Resolving as fixed in 5.0.0 M5.