| 
| [CommonNavigator] Customizing the ViewPart [message #330696] | Fri, 08 August 2008 22:31  |  | 
| Eclipse User  |  |  |  |  | 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 16:32   |  | 
| Eclipse User  |  |  |  |  | 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 13:10  |  | 
| Eclipse User  |  |  |  |  | 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
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03810 seconds