Bug 561450 - The DAnalysis Refresher only consider ADD notifications
Summary: The DAnalysis Refresher only consider ADD notifications
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 6.3.0   Edit
Hardware: PC Windows 10
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2020-03-25 09:20 EDT by William Piers CLA
Modified: 2020-05-05 15:03 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Piers CLA 2020-03-25 09:20:40 EDT
The DAnalysisRefresher precommit listener is parametrized using the filter defined in org.eclipse.sirius.business.internal.session.danalysis.DAnalysisRefresher.DANALYSIS_REFRESHER_EVENTS
Which only considers ADD events.

This leads to a different behaviour when only one element is concerned VS many.

The scenario that led me to this is the following, but there could be other (maybe more problematic):
* when opening a diagram which as one hidden element, the aird resource of this element was not yet referenced by the DAnalysis, so the refresher added it making the session dirty
* when opening any diagram with no or several hidden elements, the session was not dirty: the notification was an "ADD_MANY", not considered by the refresher

In my case, I simply had to fix the DAnalysis creation by adding the session ressource. This way it was not resolved later by the refresher.
Comment 1 Pierre-Charles David CLA 2020-05-05 15:02:50 EDT
Marking as triaged, because indeed the code (see DAnalysisRefresher.DANALYSIS_REFRESHER_EVENTS and the getRootSemanticResourceEltsPerRepresentationsResource method below) only handle ADD events.

However you mention:
> when opening a diagram which as one hidden element, the aird resource of this element was not yet referenced by the DAnalysis,

While I have a good idea of how you triggered this, this is clearly a very non-standard way of using Sirius, so I'm reducing the priority, especially since you mention you ha
Comment 2 Pierre-Charles David CLA 2020-05-05 15:03:46 EDT
(finishing my sentence submitted by mistake in the previous comment).

While I have a good idea of how you triggered this, this is clearly a very
non-standard way of using Sirius, so I'm reducing the priority, especially
since you mention you have a workaround on your side.