Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Setting initial Editor Area Size
Setting initial Editor Area Size [message #449700] Thu, 18 May 2006 03:30 Go to next message
Eclipse UserFriend
Originally posted by: Stephen.Egan.csiro.au

Hi,
I'm having trouble setting the initial editor area size in my =

application. I have a number of views in my perspective defined in my =

org.eclipse.ui.perspectiveExtensions extension. My first view is placed=
=

relative to the editor area, and the remaining views are placed relative=
=

to that. The trouble is that changing the size ratio for the first view=
=

doesn't seem to have much of an effect, and what little it does seems to=
=

have no relationship to the actual value of the ratio.
Any ideas, or are the Code Pixies playing with my mind again?

//Stephen

-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: Setting initial Editor Area Size [message #449747 is a reply to message #449700] Thu, 18 May 2006 17:07 Go to previous messageGo to next message
Eclipse UserFriend
Can you provide a code snippet from your IPerspectiveFactory class so we
can see how you are using IPageLayout?

My only guess at this point is that you are not using the addView API
correctly as it can be a bit tricky at first, especially the ratio paramter:
ratio - a ratio specifying how to divide the space currently occupied by
the reference part, in the range 0.05f to 0.95f. Values outside this
range will be clipped to facilitate direct manipulation. For a vertical
split, the part on top gets the specified ratio of the current space and
the part on bottom gets the rest. Likewise, for a horizontal split, the
part at left gets the specified ratio of the current space and the part
at right gets the rest.

Stephen Egan wrote:
> Hi,
> I'm having trouble setting the initial editor area size in my
> application. I have a number of views in my perspective defined in my
> org.eclipse.ui.perspectiveExtensions extension. My first view is
> placed relative to the editor area, and the remaining views are placed
> relative to that. The trouble is that changing the size ratio for the
> first view doesn't seem to have much of an effect, and what little it
> does seems to have no relationship to the actual value of the ratio.
> Any ideas, or are the Code Pixies playing with my mind again?
>
> //Stephen
>
Re: Setting initial Editor Area Size [message #449777 is a reply to message #449747] Fri, 19 May 2006 01:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Stephen.Egan.csiro.au

I'm defining the perspective declaratively in my plugin.xml file, so my =
=

IPerspectiveFactory is empty. Below is a snippet of the =

perspectiveExtension.

<extension
point=3D"org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension =

targetID=3D"au.csiro.cmit.idcs.crc.workbench.perspective">
<view
closeable=3D"false"
id=3D"au.csiro.cmit.idcs.crc.shapemodel.3dview"
moveable=3D"true"
ratio=3D"0.9f"
relationship=3D"left"
relative=3D"org.eclipse.ui.editorss"
showTitle=3D"true"
standalone=3D"true"
visible=3D"true"/>
<view
closeable=3D"false"
id=3D"org.eclipse.ui.views.ResourceNavigator"
moveable=3D"true"
ratio=3D"0.2f"
relationship=3D"left"
relative=3D"au.csiro.cmit.idcs.crc.shapemodel.3dview"
showTitle=3D"true"
standalone=3D"true"
visible=3D"true"/>
<view
closeable=3D"false"
id=3D"au.csiro.cmit.idcs.crc.viewer.viewerPalette.Viewer=
PaletteView"
moveable=3D"true"
ratio=3D"0.8f"
relationship=3D"bottom"
relative=3D"au.csiro.cmit.idcs.crc.shapemodel.3dview"
showTitle=3D"true"
standalone=3D"true"
visible=3D"true"/>
<view
closeable=3D"false"
id=3D"org.eclipse.ui.views.ProblemView"
moveable=3D"true"
ratio=3D"0.5f"
relationship=3D"left"
relative=3D"au.csiro.cmit.idcs.crc.viewer.viewerPalette.=
ViewerPaletteView"
showTitle=3D"true"
standalone=3D"true"
visible=3D"true"/>
<view
closeable=3D"false"
id=3D"org.eclipse.ui.views.PropertySheet"
moveable=3D"true"
ratio=3D"0.5f"
relationship=3D"bottom"
relative=3D"org.eclipse.ui.views.ResourceNavigator"
showTitle=3D"true"
standalone=3D"true"
visible=3D"true"/>
<view
closeable=3D"true"
id=3D"org.eclipse.ui.views.TaskList"
moveable=3D"true"
relationship=3D"stack"
relative=3D"org.eclipse.ui.views.ProblemView"
showTitle=3D"true"
standalone=3D"true"
visible=3D"true"/>
<viewShortcut id=3D"au.csiro.cmit.idcs.crc.shapemodel.3dview"/=
>
<viewShortcut id=3D"org.eclipse.ui.views.ResourceNavigator"/>
<viewShortcut =

id=3D" au.csiro.cmit.idcs.crc.viewer.viewerPalette.ViewerPaletteVie w "/>
<perspectiveShortcut =

id=3D"au.csiro.cmit.idcs.crc.workbench.perspective"/>
<newWizardShortcut =

id=3D"au.csiro.cmit.idcs.crc.workbench.newCrcProject"/>
<showInPart id=3D"au.csiro.cmit.idcs.crc.shapemodel.3dview"/>
<viewShortcut id=3D"org.eclipse.ui.views.PropertySheet"/>
<viewShortcut id=3D"org.eclipse.ui.views.TaskList"/>
<viewShortcut id=3D"org.eclipse.ui.views.ProblemView"/>
</perspectiveExtension>
</extension>

Thanks,
Stephen
Re: Setting initial Editor Area Size [message #449811 is a reply to message #449777] Fri, 19 May 2006 09:45 Go to previous messageGo to next message
Eclipse UserFriend
How much space do you want the editor area to have? From what I can
tell from your extension definition, its just getting a small section on
the right side of the screen and the 3dview is getting the majority of
your screen real estate.

As a side note, I'm not sure why you are using the perspectiveExtensions
extension. Do you not also own the perspective itself? The
perspectiveExtensions extension is available so that other plug-ins can
contribute to a perspective registered by other plug-ins.
Re: Setting initial Editor Area Size [message #449838 is a reply to message #449811] Sun, 21 May 2006 21:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Stephen.Egan.csiro.au

Hi Amber,
I do only want my Editor area to take up a small proportion of the =

screen. I am only using it as an area for navigating my EMF model, and =
=

the 3dview is the main view for that perspective (The 3dview isn't =

implemented as an editor, as I want to be able to undock it).
I am using perspectiveExtensions, as I want future plugins to be able to=
=

extend it. Some of these future plugins may not be devloped by myself a=
nd =

my team, so I want to allow maximum flexibility. Also, as matter of =

course, I have been using extensions as much as possible in all my RCP =

programming.

Regards,
Stephen.

On Fri, 19 May 2006 23:45:10 +1000, Amber Beerends <abeerends@cerner.com=
> =

wrote:

> How much space do you want the editor area to have? From what I can =

> tell from your extension definition, its just getting a small section =
on =

> the right side of the screen and the 3dview is getting the majority of=
=

> your screen real estate.
>
> As a side note, I'm not sure why you are using the perspectiveExtensio=
ns =

> extension. Do you not also own the perspective itself? The =

> perspectiveExtensions extension is available so that other plug-ins ca=
n =

> contribute to a perspective registered by other plug-ins.



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: Setting initial Editor Area Size [message #449843 is a reply to message #449838] Mon, 22 May 2006 09:52 Go to previous message
Eclipse UserFriend
Other plug-ins can still use the perspectiveExtensions extension even if
you do not. Its there for other plug-ins to use, not for the
perspective author to use.
Previous Topic:Scale
Next Topic:WebStart Issue
Goto Forum:
  


Current Time: Sat Aug 30 21:51:53 EDT 2025

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

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

Back to the top