Community
Participate
Working Groups
Hi, In method org.eclipse.cdt.internal.ui.cview.CView.saveState(IMemento), called when exiting the workbench, line 1284, the selected elements of the tree viewer is systematically casted into ICElement, which causes an exception if for example, an a.txt file is selected. Object elements[] = ((IStructuredSelection)viewer.getSelection()).toArray(); if(elements.length > 0) { IMemento selectionMem = memento.createChild(TAG_SELECTION); for (int i = 0; i < elements.length; i++) { ICElement e = (ICElement)elements[i]; // ClassCastException !!! It looks to me that a test with instanceof before casting would be required, although I do not catch everything what is made there and so, do not know what to do in the else branch. Thanks in advance Martin
You are right. This is a bug, Will fix this. Busy now will get back to you. Sorry for the delays.
Nice cath, martin. It is fix in the cvs head. Will close this PR once the patch is move in the cdt_1_1 branch. Thanks
Fix in head and CDT_1_1 Pr Fixed Thanks