Bug 157498 - CView project selection disappears when switching from open to closed
Summary: CView project selection disappears when switching from open to closed
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-15 12:20 EDT by Wieant CLA
Modified: 2020-09-04 15:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wieant CLA 2006-09-15 12:20:35 EDT
When a project state is changed from open to closed or vice versa its
selection disappears in the CView. This affects all views, actions,
etc. depending on the project selection state.

The CView tries to preserve the current selection (see StructuredViewer.preservingSelection), but that seems to fail because
a closed project appears in the tree as an IProject, while an open project
appears as a CProject (even though the closed project is still a CProject).

This effect on its turn seems to be caused by the DeltaProcessor.elementClosed()/elementOpened() methods that convert
project closure/opening into removal/addition deltas.

solution 1 might be to convince the selection preserver that an IProject is
the same as its CProject.

solution 2 might be to change the DeltaProcessor elementOpened/Closed()
methods to just generate opened/closed deltas (instead of add/remove).