Bug 106902 - selection update on text viewer's dispose causes NPE and performance loss
Summary: selection update on text viewer's dispose causes NPE and performance loss
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 0.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: wst.sse CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-08-12 17:17 EDT by Amy Wu CLA
Modified: 2013-07-18 14:26 EDT (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 Amy Wu CLA 2005-08-12 17:17:02 EDT
selection update on text viewer's dispose causes NPE and performance loss

Now StructuredTextViewer sets empty selection on disposing (handleDispose() 
method).
But it causes many visual cue updatation when it work with some editors.
This means performance loss of close editor action.
And during the visual cue updatation some NPE occurres in some editors' code 
because some objects in the editor are already disposed before the text viewer.

How about disconnecting ViewerSelectionManager from StructuredTextViewer 
before setting empty selection?
Comment 1 Amy Wu CLA 2005-08-12 17:17:57 EDT
<from David>
Nitin, *not* doing this was special, final null check was causing memory leak 
on 
previous version, and fixed that, but causes this problem, and, I believe, 
eliminates the ability to use the "go to last edit postioin" after editor is 
closed (there's another bug on that). Can you please look at fixing all? :)
Comment 2 Ian Tewksbury CLA 2010-02-16 12:49:37 EST
Not sure how to reproduce this one based on the given information but from the results it seems to me that if this was still happening it would not be a 5 year old back burner bug.  Vote to resolve.
Comment 3 Nitin Dahyabhai CLA 2010-02-23 11:57:04 EST
Ian, if we can't close an editor and use the toolbar to go back to the last editor position, opening the editor, it's still a problem.
Comment 4 Ian Tewksbury CLA 2010-02-23 12:24:14 EST
(In reply to comment #3)
> Ian, if we can't close an editor and use the toolbar to go back to the last
> editor position, opening the editor, it's still a problem.

Ahh, ok.  Well it seems this functionality is intermittent.  That is when I use Alt-LEFT it will always re-open a closed editor but only put the cursor in the correct location sometimes, other times the cursor will be placed at the start of the document.