Bug 486811 - [Activity Explorer] Model change triggers session load
Summary: [Activity Explorer] Model change triggers session load
Status: NEW
Alias: None
Product: Amalgam
Classification: Modeling
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows NT
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-29 07:16 EST by Felix Dorner CLA
Modified: 2016-02-08 08:46 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Dorner CLA 2016-01-29 07:16:48 EST
I use capella as an example, it's the only project that I now of...

To reproduce:

- Create new Capella Project a
- Create new Capella Project b
- Restart Capella

(Now session b is open, and Session a is closed, and there is one 'active' ActivityExplorer for b, and one 'inactive' ActivityExplorer for a)

- Now change the model a by adding a new element or renaming an existing element.

=> This opens a session for project a.
Comment 1 Felix Dorner CLA 2016-01-29 07:23:15 EST
Bumping severity since this affects performance
Comment 2 Eclipse Genie CLA 2016-01-29 07:47:59 EST
New Gerrit change created: https://git.eclipse.org/r/65460
Comment 3 Matthieu Helleboid CLA 2016-02-03 13:42:18 EST
As stated on the gerrit change, the proposed patch doesn't seem to solve the scenario.
Comment 4 Felix Dorner CLA 2016-02-03 13:53:12 EST
Hmm, it seemed to fix it when I tested, but that was before you rebased it. I have another look.
Comment 5 Felix Dorner CLA 2016-02-03 15:57:40 EST
Matthieu, I have just tested again with the rebased patch and for me it still solves the problem. I am testing this against Capella 1.0.0.
Comment 6 Felix Dorner CLA 2016-02-03 16:21:38 EST
I don't know how to write an automated test for this since it involves restarting capella.

In any case, since I found about https://bugs.eclipse.org/bugs/show_bug.cgi?id=486814 I think there is a design issue with ActivityExplorerEditorInput. See my comments on the other bug. If we can fix that one, this one here should be fixed automatically.
Comment 7 Matthieu Helleboid CLA 2016-02-04 03:33:26 EST
Hello Felix, 

(In reply to Felix Dorner from comment #5)
> Matthieu, I have just tested again with the rebased patch and for me it
> still solves the problem. I am testing this against Capella 1.0.0.

I tested both changeset (the first one and the rebased one) with a soon to be released capella (https://hudson.polarsys.org/capella/job/capella-v1.0.x/64/) and it doesn't seem to work in my case. The stack is 

Thread [main] (Suspended (breakpoint at line 79 in OpenSessionAction))	
	OpenSessionAction.doOpenSessions() line: 79	
	OpenSessionAction$1.run(IProgressMonitor) line: 141	
	OpenSessionAction.run() line: 152	
	ActivityExplorerEditorInput.loadState(IMemento) line: 254	
	ActivityExplorerEditorInput.<init>(IMemento) line: 70	
	ActivityExplorerEditorInput.create(IMemento) line: 311	
	ActivityExplorerEditorInputFactory.createElement(IMemento) line: 32	
	EditorReference.getRestoredInput() line: 402	
	EditorReference.getEditorInput() line: 365	
	EditingSession.reorderEditorsIfNeeded(DialectEditor) line: 163	
	EditingSession.attachEditor(DialectEditor) line: 141	
	DDiagramEditorImpl.init(IEditorSite, IEditorInput) line: 451	

(In reply to Felix Dorner from comment #6)
> I don't know how to write an automated test for this since it involves
> restarting capella.

Very good question. Maybe with rcptt and a workbench context with both editors, but I think I remember that rcptt workbench context doesn't work well with the activity explorer (and yes we should investigate this and open a bug here)

> In any case, since I found about
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=486814 I think there is a
> design issue with ActivityExplorerEditorInput. See my comments on the other
> bug. If we can fix that one, this one here should be fixed automatically.

Yes, I think this is a good road to follow.

Thanks
Comment 8 Felix Dorner CLA 2016-02-04 03:43:56 EST
(In reply to Matthieu Helleboid from comment #7)
> Hello Felix, 


 
> (In reply to Felix Dorner from comment #5)
> > Matthieu, I have just tested again with the rebased patch and for me it
> > still solves the problem. I am testing this against Capella 1.0.0.
> 
> I tested both changeset (the first one and the rebased one) with a soon to
> be released capella
> (https://hudson.polarsys.org/capella/job/capella-v1.0.x/64/) and it doesn't
> seem to work in my case. The stack is 

It would be good to fix this in 1.0.x...

> Thread [main] (Suspended (breakpoint at line 79 in OpenSessionAction))	
> 	OpenSessionAction.doOpenSessions() line: 79	
> 	OpenSessionAction$1.run(IProgressMonitor) line: 141	
> 	OpenSessionAction.run() line: 152	
> 	ActivityExplorerEditorInput.loadState(IMemento) line: 254	
> 	ActivityExplorerEditorInput.<init>(IMemento) line: 70	
> 	ActivityExplorerEditorInput.create(IMemento) line: 311	
> 	ActivityExplorerEditorInputFactory.createElement(IMemento) line: 32	
> 	EditorReference.getRestoredInput() line: 402	
> 	EditorReference.getEditorInput() line: 365	
> 	EditingSession.reorderEditorsIfNeeded(DialectEditor) line: 163	
> 	EditingSession.attachEditor(DialectEditor) line: 141	
> 	DDiagramEditorImpl.init(IEditorSite, IEditorInput) line: 451	

I see you have another diagram open somewhere. In my test, I only have the two activity explorers. But still a useful stacktrace, as it shows another case where a session is opened too early. When the input is created from a memento, this shouldn't open a session.
Comment 9 Aurelien Didier CLA 2016-02-08 08:46:44 EST
Hello Felix and Matthieu,

We already have some RCPTT tests on Capella (capella\tests\plugins\org.polarsys.capella.test.rcptt\ActivityExplorer) concerning the Activity Explorer. However, it only tests the activity explorer version used in capella but it would be nice if you could add your tests here. 

Thanks,

Aurélien