Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Outline View
Outline View [message #242611] Mon, 09 April 2007 17:07 Go to next message
Eclipse UserFriend
Does anybody know what happens with the ContentOutlinePage that the editor
provides when the Outline view is closed? And why it doesn't react to
selection changes?
Thank you very much in advance.
Re: Outline View [message #242640 is a reply to message #242611] Tue, 10 April 2007 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Ioana Verebi wrote:

> Does anybody know what happens with the ContentOutlinePage that the
> editor provides when the Outline view is closed?

It gets disposed.

> And why it doesn't react to selection changes?

Not sure what you mean.

Dani

> Thank you very much in advance.
>
Re: Outline View [message #242648 is a reply to message #242640] Tue, 10 April 2007 09:36 Go to previous messageGo to next message
Eclipse UserFriend
Daniel Megert wrote:

> Ioana Verebi wrote:

>> Does anybody know what happens with the ContentOutlinePage that the
>> editor provides when the Outline view is closed?

> It gets disposed.
What if the Outline View is closed when Eclipse starts and you do
something like this :

IEditorPart editor = page.getActiveEditor();//page = the active page

IContentOutlinePage outlinePage = (IContentOutlinePage)
editor.getAdapter(IContentOutlinePage.class);

outlinePage.addSelectionChangedListener(selectionListener);



Why isn't the editor able to provide an OutlinePage to any object that
asks for it, not just the OutlineView ?

>> And why it doesn't react to selection changes?

> Not sure what you mean.

When the user moves the cursor in the editor from one method to another,
for example, the selection in the outlinePage changes.

Thanks,
Ioana
> Dani

>> Thank you very much in advance.
>>
Re: Outline View [message #242653 is a reply to message #242648] Tue, 10 April 2007 09:42 Go to previous message
Eclipse UserFriend
Ioana Verebi wrote:

> Daniel Megert wrote:
>
>> Ioana Verebi wrote:
>
>
>>> Does anybody know what happens with the ContentOutlinePage that the
>>> editor provides when the Outline view is closed?
>>
>
>> It gets disposed.
>
> What if the Outline View is closed when Eclipse starts and you do
> something like this :
>
> IEditorPart editor = page.getActiveEditor();//page = the active page
>
> IContentOutlinePage outlinePage = (IContentOutlinePage)
> editor.getAdapter(IContentOutlinePage.class);
>
> outlinePage.addSelectionChangedListener(selectionListener);
>
>
>
> Why isn't the editor able to provide an OutlinePage to any object that
> asks for it, not just the OutlineView ?

The editor provides the current selection which you can use to get the
element from the compilation unit. There's no need to maintain a UI
element for that.

Dani

>
>>> And why it doesn't react to selection changes?
>>
>
>> Not sure what you mean.
>
>
> When the user moves the cursor in the editor from one method to
> another, for example, the selection in the outlinePage changes.
>
> Thanks,
> Ioana
>
>> Dani
>
>
>>> Thank you very much in advance.
>>>
>
Previous Topic:Short freezes when dialogs appear/disappear in 3.3M6
Next Topic:Using SearchEngine to scope by package visibility
Goto Forum:
  


Current Time: Thu Jul 17 23:19:13 EDT 2025

Powered by FUDForum. Page generated in 0.03865 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top