Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Views and Perspectives
Views and Perspectives [message #447664] Wed, 12 April 2006 04:46 Go to next message
Eclipse UserFriend
Originally posted by: randhir.yadav.gmail.com

Hello Everyone!!

I have a very simple query regarding views but I am not able to find a
solution may be it is not supported by Eclipse RCP.

My requirement is I have to show 4 views inside a perspective. All the
views should be expandable with each other.

For ex. in Eclipse window, we have 3 views Package Explorer (left), Editor
Area (top-right) and Console (bottom-right).

What I want is the same structure but also another view inside Package
Explorer i.e. on the left and this view should be expandable with the
Package Explorer and other views.

So my application wil look like this..
view1(TreeViewer) : top-left
view2(TableViewer) : top-right
view3(TreeViewer) : bottom-left
view4(TableViewer) : bottom-right

But I am not able to do this as I have 4 options (Left, Right, Top and
Bottom) for adding a view so my first view will occupy the whole space at
any of these 4 places. and then my next view will use only the remaining
space available. And hence my view1 occupies the whole space on the left
side and I cannot add view3 on bottom-left just below the view1.

So what I did for achievng this is I added only 2 views inside perpective
(top and bottom). And then inside the createPartControl() methods of both
of these views I created 1 treeViewer and 1 tableviewer objects and thus I
got my 4 views. But now the problem over here is I can expand only between
the views which I had defined in my Perspective and not between the
treeViewer and the tabelViewers.

I hope my query is clear. A snapshot would be more clearer but I don't
know how to attach that.

I would appreciate if anyone can help me with this query. Please let me
know if you want some more information to make my doubt clearer.

Thanks in advance,
Randhir Yadav
Re: Views and Perspectives [message #447677 is a reply to message #447664] Wed, 12 April 2006 08:07 Go to previous messageGo to next message
Eclipse UserFriend
perspective layouts are about splitting the area occupied by a view with
another view. Always splitting one area into two.


I'd probably do it like this:

1) add the package explorer view to the left of the editor area at 0.5f

2) add the console view to the bottom of the editor area at 0.5f

3) add the new view to the bottom of the package explorer at 0.5f

Then you should have 2 columns, with 2 views in each column. You can
switch the order of splitting the editor area if you want 2 rows with 2
views each.

Later,
PW
Re: Views and Perspectives [message #447680 is a reply to message #447677] Wed, 12 April 2006 08:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: randhir.yadav.gmail.com

Hi Paul,

Thanks man. It works. Actually I wasn't aware that we can add views with
reference to any other view with the help of the last parameter in the
layout.addStandaloneView() method. I was always creating views with ref.
to the editor area :-)

Regards,
Randhir
Re: Views and Perspectives [message #447681 is a reply to message #447680] Wed, 12 April 2006 09:11 Go to previous message
Eclipse UserFriend
Randhir Yadav wrote:
> Hi Paul,
>
> Thanks man. It works. Actually I wasn't aware that we can add views with
> reference to any other view with the help of the last parameter in the
> layout.addStandaloneView() method. I was always creating views with ref.
> to the editor area :-)
>

It works with regular addView(*) as well.

Later,
PW
Previous Topic:My RCP Application with C/C++ Managed Project Option
Next Topic:[DataBinding] Duplicate data structures in StructuredViewerObservableCollectionWithLabels
Goto Forum:
  


Current Time: Mon Jul 07 01:40:26 EDT 2025

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

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

Back to the top