view size in perspective [message #146653] |
Mon, 01 March 2004 17:49  |
Eclipse User |
|
|
|
Originally posted by: sg.media-style.removeme.com
Hi,
i wrinting a plugin with a own perspective.
My plugin is a kind of monitor so it has a huge set of views i have to
show in the perspective.
I wish to splitt my perspective to 3 horizonatal and 3 verstial areas
(like #)and add to each area a view.
Until folder creation i can only provide a size related to the
allignment i.e. IPageLayout.LEFT.
IFolderLayout folder2 = layout.createFolder("MS", IPageLayout.LEFT,
0.3F, layout.getEditorArea());
folder2.addView(IHmcViewIds.MS_VIEW_ID);
Any hints?
Thanks
Stefan
|
|
|
Re: view size in perspective [message #146671 is a reply to message #146653] |
Mon, 01 March 2004 18:53   |
Eclipse User |
|
|
|
Hi Stefan,
> i wrinting a plugin with a own perspective.
> My plugin is a kind of monitor so it has a huge set of views i have to
> show in the perspective.
> I wish to splitt my perspective to 3 horizonatal and 3 verstial areas
> (like #)and add to each area a view.
>
> Until folder creation i can only provide a size related to the
> allignment i.e. IPageLayout.LEFT.
>
>
> IFolderLayout folder2 = layout.createFolder("MS", IPageLayout.LEFT,
> 0.3F, layout.getEditorArea());
> folder2.addView(IHmcViewIds.MS_VIEW_ID);
>
>
> Any hints?
Contribute the perspective using the org.eclipse.ui.perspectives
extension point. Extension needs to implement IPerspectiveFactory.
Implement the createInitialLayout method and manipulate the
IPageLayout object (argument of createInitialLayout).
Examples:
pageLayout.addView(ID_OF_VIEW,
IPageLayout.LEFT/RIGHT/TOP/BOTTOM,0.xxf,editorArea);
Ok this is what you should already do. What you can do now is
to create a perspective within your workbench, which looks
exactly the same way, you want want your perspective to look.
Now save the perspective as 'MyLovlyPerspective'. Save it and
exit the workbench. Now search for any file containing the string
'MyLovlyPerspective' within the .metadata directory of your
workbench directory. You will found some files like workbench.xml
or pref_store.ini. These files store the structure of the perspective
MyLovlyPerspective and you can look at the xml tags and how
they are structured. You can replicate the xml structure using
pageLayout methods. (should be easy though).
Think that will keeps you on track. You wont need to design
your perspective on paper, which is surly a pain.
Bye,
Martin (Kersten)
|
|
|
|
|
|
|
Re: view size in perspective [message #146755 is a reply to message #146731] |
Tue, 02 March 2004 08:49  |
Eclipse User |
|
|
|
> Sorry i think we are not on the same page.
> I cant find a method that allows me to add a folder to the layout with
> just 50% high and 50% width. I just can say 50 % from a angel.
> The other demension is 100 % filled.
Well thats the good old flow layout style. There is no way to fill a folder
like this. Remember what a perspective is composed of. You can split
it the way you like using two seperate splits with diffrent orrientations.
>
>
> I wish to splitt my perspective layout like this.
Again try to take a view and move it around within a perspective. You
will notice that every perspective is composed of a tree like hierarchy of
horizontal or vertical splits.
> Tab style is definitly not what i'm searhing for.
>
> Greetings from Halle to Magdeburg
Magdeburg hails Halle :-)
Martin (Kersten)
> > > I allready use a PerspectiveFactory that setup the layout of my
> > > perspective.
> > > The problem is that you can't setup folders / views with coordinates.
> > > You just can says fill n% of the free space from the top or left angel
> > > with this folder. ;(
> > Yeah so you can use multiply objects. To split you may use folders
> > having 0.33f in width or good old table style. Thats why I suggested
> > to look at the xml definition of saved perspectives. Coordinates are
> > not needed. Its the you can do everything with FlowLayout awt discussion
:)
>
> > Thanks,
>
> > Martin (Kersten)
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03041 seconds