| Summary: | CanonicalEditPolicy deletes Notes and Text per default | ||
|---|---|---|---|
| Product: | [Modeling] GMF-Runtime | Reporter: | Andreas Muelder <Andreas.Muelder> |
| Component: | General | Assignee: | Project Inbox <gmf-runtime-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | markus.muehlbrandt |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
shall I provide a patch for this? |
Build Identifier: When I use a CanonicalEditPolicy or a ConnectionCanonicalEditPolicy, Notes and Text elements are deleted, because the default behaviour is to delete all views where the semantic model element is null. I think it would be better to check for these view types in the #shouldDeleteView() method, instead of simply returning true as the default. Possible default implementation could be someting like this: protected boolean shouldDeleteView(View view) { if (ViewType.NOTE.equals(view.getType()) | ViewType.NOTEATTACHMENT.equals(view.getType()) || ViewType.TEXT.equals(view.getType())) { return false; } return true; } Reproducible: Always