Updating The Outline View [message #44787] |
Fri, 30 May 2003 10:42  |
Eclipse User |
|
|
|
Originally posted by: Danny.Collins.libertymutual.com
Hello,
I am working on a plugin that alters the source file for a java class.
Inserting methods, reorganizing methods and fields, etc. I am having
trouble getting the Outline View to sync up with the actual source.
Especially when reordering the methods.
Thank you,
Danny
|
|
|
|
|
|
Re: Updating The Outline View [message #47283 is a reply to message #47008] |
Tue, 03 June 2003 08:53   |
Eclipse User |
|
|
|
That looks ok. Can you try to only add a method and see if this works.
Could be that a move does not generate a delta (what would be a bug)
Note that the outliner updates in a background thread, so there should
be no need to call reconcile to update the viewer.
Danny Collins wrote:
> Adam Kiezun wrote:
>
>
>>the outline works on working copies
>>if you modify java files, then you will need to reconcile the working copy
>
> with the file
>
>>try calling IWorkingCopy::reconcile()
>
>
>>a.
>>eclipse.org
>
>
>
> I tried that didn't seem to work, but I may not have the 'correct' working
> copy,
>
> Here is a snippet, the editor is gotten because I am an editor context
> menu item.
>
> ICompilationUnit icu =
>
> JavaUI.getWorkingCopyManager().getWorkingCopy(editor.getEdit orInput());
>
> // manipulate the compilation unit
>
> icu.reconcile(true,null);
>
> // this doesn't seem to update the outline view, but the outline still
> works, so if I move a method from the top to the bottom of the source, the
> outline stays the same but it will go to the correct place in the source
> if double clicked.
>
> Thansk for the help!
> Danny
>
>
>
|
|
|
Re: Updating The Outline View [message #49536 is a reply to message #47283] |
Wed, 04 June 2003 21:38  |
Eclipse User |
|
|
|
Originally posted by: danny.collins.libertymutual.com
OK, tried that, added a new method. It showed up in the Outline view, but
when I reorganized the rest of the source the outline view didn't change.
Although I am using eclispe 2.0 not 2.1 .
The only thing that seems to catch the outline up to the current source is
closing and reopening the file.
TIA.
Martin Aeschlimann wrote:
> That looks ok. Can you try to only add a method and see if this works.
> Could be that a move does not generate a delta (what would be a bug)
> Note that the outliner updates in a background thread, so there should
> be no need to call reconcile to update the viewer.
> Danny Collins wrote:
> > Adam Kiezun wrote:
> >
> >
> >>the outline works on working copies
> >>if you modify java files, then you will need to reconcile the working copy
> >
> > with the file
> >
> >>try calling IWorkingCopy::reconcile()
> >
> >
> >>a.
> >>eclipse.org
> >
> >
> >
> > I tried that didn't seem to work, but I may not have the 'correct' working
> > copy,
> >
> > Here is a snippet, the editor is gotten because I am an editor context
> > menu item.
> >
> > ICompilationUnit icu =
> >
> > JavaUI.getWorkingCopyManager().getWorkingCopy(editor.getEdit orInput());
> >
> > // manipulate the compilation unit
> >
> > icu.reconcile(true,null);
> >
> > // this doesn't seem to update the outline view, but the outline still
> > works, so if I move a method from the top to the bottom of the source, the
> > outline stays the same but it will go to the correct place in the source
> > if double clicked.
> >
> > Thansk for the help!
> > Danny
> >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.04890 seconds