Bug 473842 - Line suppression does not suppress all cells of the tables causing problems
Summary: Line suppression does not suppress all cells of the tables causing problems
Status: CLOSED DUPLICATE of bug 492634
Alias: None
Product: Sirius
Classification: Modeling
Component: Table (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-07-29 09:39 EDT by Pierre Guilet CLA
Modified: 2017-03-21 09:08 EDT (History)
1 user (show)

See Also:


Attachments
A table to reproduce the bug (2.20 KB, application/zip)
2015-07-29 09:39 EDT, Pierre Guilet CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Guilet CLA 2015-07-29 09:39:13 EDT
Created attachment 255510 [details]
A table to reproduce the bug

With certain condition, the Sirius generic line suppression does not remove all cells of the line from the table with columns. The line is removed but not all the cells even if we don't see the cell not deleted.

This can provoks a bug were in other view like diagram one, property descriptor for references with the type of the deleted element  still provides the possibility to reference the deleted element because references are not cleaned in this descriptors.

The attached model allows the reproduction of the problem.

The scenario to reproduce is the following :
I initialize a class table from the metamodel.

I delete the A element. I save.

With the interpreter I look at the cells with the expression [self.eContainer(DTable).columns.cells/] and I see the cell that should have been deleted with the A element suppression.
Comment 1 Maxime Porhel CLA 2015-07-29 09:42:50 EDT
It seems that the delete tasks and/or the dangling ref removal trigger might be improved to better clean some parts of the Sirius model. 

This could also come from the Table/Tree refresh which does not seem to clean the cells  list.
Comment 2 Maxime Porhel CLA 2015-07-29 09:50:38 EDT
See org.eclipse.sirius.table.business.internal.refresh.DTableSynchronizerImpl.fillTableDCells(LineContainer)

It iterates over the lines feature but in this scenario: a line has been deleted, some cells are still referenced from the features. 

We might have to: 
 . add a columns.cells clean step
 . override org.eclipse.sirius.business.internal.helper.task.DeleteDRepresentationElementsTask.addDialectSpecificAdditionalDeleteSubTasks(DSemanticDecorator, List<ICommandTask>) in the table command factory
Comment 3 Maxime Porhel CLA 2015-07-29 09:55:01 EDT
Step 1.1 and 1.2 might also have to be updated to do different things as told in the comments: org.eclipse.sirius.business.api.helper.task.DeleteEObjectTask.execute()
Comment 4 Pierre Guilet CLA 2017-03-21 09:08:32 EDT

*** This bug has been marked as a duplicate of bug 492634 ***