Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » OutlineView (setSelection issue)
OutlineView [message #879523] Thu, 31 May 2012 07:11 Go to previous message
Kitesurfer () is currently offline Kitesurfer ()
Messages: 84
Registered: December 2009
Member
Hello,
I have a plugin where I programmatically position the Outline view to the cursorposition in the editor (after a cursormove or mouseposition).
I do this by determining the specific TreeViewItem object, and perform a :
prvTreeViewer.setSelection(new StructuredSelection(lcObjectToSelect), false);

This statement however goes to (and selects) the piece of text where the TreeViewItem relates to ... whereas I want to keep the cursor where it is, and don't have the editor repositioned, or redrawn etc at all.
I already tried :
prvTreeViewer.setSelection(new StructuredSelection(lcObjectToSelect), true);
and
prvTreeViewer.setSelection(new StructuredSelection(lcObjectToSelect);
result is the same.

I already tried saving the offset, and after the setSelection position again on the offset ... this also result in "movements" on the editor (it sometimes goes up or down) ... so not ideal.

So ... how do I select a TreeViewItem programmatically with the editor NOT changing at all (regarding cursorposition and visible lines of code) ?

Thanks.
 
Read Message
Read Message
Previous Topic:Run eclipse quickfix on a java source code using java program
Next Topic:.xcarchive and .app files are shown as folders in Package explorer.
Goto Forum:
  


Current Time: Sat May 18 05:50:26 EDT 2013

Powered by FUDForum. Page generated in 0.02906 seconds