| Summary: | [General] Delete from Model on a compartment, remove only the compartment | ||
|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Vincent Lorenzo <vincent.lorenzo> |
| Component: | Core | Assignee: | Vincent Lorenzo <vincent.lorenzo> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | yann.tanguy |
| Version: | 0.7.0 | ||
| Target Milestone: | 0.7.0 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Vincent Lorenzo
in DeleteFromModelAction Replace
while(editParts.hasNext()) {
EditPart editPart = (EditPart)editParts.next();
Command curCommand = editPart.getCommand(request);
if(curCommand != null) {
command.compose(new CommandProxy(curCommand));
}
}
by
while(editParts.hasNext()) {
EditPart editPart = (EditPart)editParts.next();
//Delete From Model on a compartment, remove the editpart owning the parent.
if((editPart instanceof CompartmentEditPart)) {
editPart = editPart.getParent();
}
Command curCommand = editPart.getCommand(request);
if(curCommand != null) {
command.compose(new CommandProxy(curCommand));
}
}
We remove the semantic element associated to the compartment (the first solution) Done in r2372 Reopen because in class diagram a property is a CompartmentEditPart, also, when we want to delete a property, we remove the compartment! see bug 320384 The behavior should be delegated to the compartment itself (the ItemSemanticEditPolicy of the Compartment). Tested on Papyrus 0.10 M5. I can't reproduce the bug. it seems be fixed, so I close it. |