Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365112 - [model explorer] queries freeze the model explorer with big models
Summary: [model explorer] queries freeze the model explorer with big models
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tristan Faure CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 363835
Blocks:
  Show dependency tree
 
Reported: 2011-11-29 12:59 EST by Tristan Faure CLA
Modified: 2012-02-10 09:29 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Faure CLA 2011-11-29 12:59:10 EST
The queries getDiagram,isDiagramContainer and their equivalent for tables freeze the model explorer when the model is huge.
This problem occurs because all the pages are browsed to find corresponding diagrams.
Comment 1 Tristan Faure CLA 2011-11-29 13:08:15 EST
change the diagram and table search using cross referencer. For UML the CacheAdapter is used but if it does not exist a new one is created.

Google collect API is used to search elements

Improvements are obvious with big models
Comment 2 Tristan Faure CLA 2011-11-29 13:19:21 EST
backported to the trunk
Comment 3 Patrick Tessier CLA 2011-12-02 08:49:54 EST
the backport to the trunk has introduced compilation Error so I have fixed it.
done in the revision 6342
Comment 4 Camille Letavernier CLA 2012-01-11 09:14:16 EST
Added an explicit dependency to com.google.collect in oep.views.modelexplorer, to avoid errors when X-Text is not installed (For partial installations or builds of Papyrus).

Done in r6800 (Trunk only)
Comment 5 Camille Letavernier CLA 2012-01-11 09:50:12 EST
Also applied to the following plug-ins in r6804 (Trunk only) :

oep.infra.table.modelexplorer
oep.uml.diagram.clazz
oep.uml.diagram.common.palette.customaction
oep.uml.diagram.common
oep.uml.modelexplorer
Comment 6 Alain Le Guennec CLA 2012-02-09 12:43:52 EST
(In reply to comment #1)
> change the diagram and table search using cross referencer. For UML the
> CacheAdapter is used but if it does not exist a new one is created.
> 
> Google collect API is used to search elements
> 
> Improvements are obvious with big models

I suspect that this improvement introduced a serious regression:
Now if I delete a Table or a Diagram in the model explorer,
it does not disappear from the model explorer (the editor is closed, though).
If you then right-click on any dangling table or diagram, you gets loads of NullPointerExceptions.
Maybe the CacheAdapter is not notified of the deletion, or something like that,
and so is keeping dangling references to deleted diagrams/tables?...

I think this issue should be REOPENED.
Comment 7 Mathieu Velten CLA 2012-02-10 08:48:11 EST
I can't reproduce on the 0.8.X branch, anyone with a trunk compatible platform can confirm ?
Is anything available in the error log ?
Comment 8 Alain Le Guennec CLA 2012-02-10 09:29:30 EST
(In reply to comment #7)
> I can't reproduce on the 0.8.X branch, anyone with a trunk compatible platform
> can confirm ?
> Is anything available in the error log ?

I am using the 0.8.2 build from the 1st of February. To reproduce:
-Create a new model
-Create a SysML block
-Create an IBD in that Block (the IBD editor opens automatically)
-Right click on the IBD in the model-explorer, and choose delete
=> The IBD editor closes, but the diagram remains in the model explorer.
-Right click on the IBD in the model-explorer again.
=> A nullpointer exception is raised in the Error Log.