Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [CommonNavigator] Customizing the ViewPart
[CommonNavigator] Customizing the ViewPart [message #330696] Sat, 09 August 2008 02:31 Go to next message
Thomas Fritz is currently offline Thomas FritzFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

I would like to have a viewer with a layout similar to the Type Hierarchy
View in Eclipse, i.e. one view on the top and a different view on the
bottom, using the common navigator framework. My intention is to have a
common viewer on top and a common viewer on the bottom that both display
different trees, e.g. the top displays one model and the bottom displays
another one. Is there an easy way using the Common Navigator Framework to
create a viewpart like this and/or would I have to adapt the
CommonNavigator class?

Kind regards,
Thomas
Re: [CommonNavigator] Customizing the ViewPart [message #330697 is a reply to message #330696] Sat, 09 August 2008 20:32 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
You can have as many instances of the Common Navigator as you like, just
create a normal view and then associated the navigator with that view.
You configure the placement of the view just as you do with any other view.

Just define two views using the org.eclipse.ui.views extension point,
and for each of those, define the configuration for the CN using two
org.eclipse.ui.navigator.viewer instances.

You may want to subclass the getInitialInput() method of the
CommonNavigator class to have it get the input from where you want it,
the default gets the input this way:

return getSite().getPage().getInput();


Francis



Thomas wrote:
> Hi,
>
> I would like to have a viewer with a layout similar to the Type
> Hierarchy View in Eclipse, i.e. one view on the top and a different view
> on the bottom, using the common navigator framework. My intention is to
> have a common viewer on top and a common viewer on the bottom that both
> display different trees, e.g. the top displays one model and the bottom
> displays another one. Is there an easy way using the Common Navigator
> Framework to create a viewpart like this and/or would I have to adapt
> the CommonNavigator class?
>
> Kind regards,
> Thomas
>


--
*new* Common Navigator Framework section in:
3.4RC4 Platform Plugin Developer Guide (Programmer's Guide)
http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.isv/guide/cnf.htm
http://dev.eclipse.org/blogs/francis
http://wiki.eclipse.org/Common_Navigator_Framework
http://wiki.eclipse.org/Common_Navigator_Framework_Use_Cases


You have brains in your head.
You have feet in your shoes.
- Dr Seuss, Oh the Places You'll Go


Re: [CommonNavigator] Customizing the ViewPart [message #330714 is a reply to message #330697] Mon, 11 August 2008 17:10 Go to previous message
Thomas Fritz is currently offline Thomas FritzFriend
Messages: 2
Registered: July 2009
Junior Member
Hi Francis,

thanks a lot for your answer. I might be wrong, but I think we are talking
about two different things and I think it's because I wasn't clear enough
in my first post.
If I define two views using the org.eclipse.ui.views extension point, as
you suggest, I thought I would get two separate views, which is not
exactly what I want.
What I would like is one single viewer that contains two parts inside like
the type hierarchy view: on the top it would show a tree and on the bottom
it shows another tree. However, I would like each of those two
parts/controls being a common viewer and have the support of the common
navigator framework with it.
So I thought I need to have one viewer that has a createPartControl method
in which both parts, the top and the bottom are defined and then using
some layout put on top of each other, and both of those would be common
viewers. However, this seems a little more tedious as I would have to copy
quite a bit of the CommonNavigator code, and I was wondering if there is
an easier solution to this.

It would be great if you could give me some advice and let me know if I am
wrong.

Thank you,
Thomas
Previous Topic:Out of heap space when exporting plugin
Next Topic:Event on Maximizing a Viewpart
Goto Forum:
  


Current Time: Sun Jun 30 13:46:26 GMT 2024

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

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

Back to the top