Skip to main content



      Home
Home » Newcomers » Newcomers » Newbie plugin development question(View placement in perspective)
Newbie plugin development question [message #1061564] Sun, 02 June 2013 20:14 Go to next message
Eclipse UserFriend
Hello,
I'm just starting to learn how to write an eclipse plugin and want to create a perspective with four views, with the editor window in the middle. I want two views on the left, one above the other and two on the right, also one above the other.

I've managed to create the perspective and views but my left to right ratio is not 25%, 50%, 25% as I defined it; it's more like 25%, 20% and the rest. The top to bottom is as I want it.

Here is my perspective code; the view definitions are as per template.

<code>
public void createInitialLayout(IPageLayout layout) {
// Get the editor area.
String editorArea = layout.getEditorArea();

IFolderLayout topLeftFolder = layout.createFolder("topLeftFolder",
IPageLayout.LEFT, 0.25f, editorArea);

topLeftFolder.addView(PluginConstants.PLANNING_VIEW);

IFolderLayout bottomLeftFolder = layout.createFolder(
"bottomLeftFolder", IPageLayout.BOTTOM, 0.50f, "topLeftFolder");

bottomLeftFolder.addView(PluginConstants.FILTERS_VIEW);

IFolderLayout topRightFolder = layout.createFolder("topRightFolder",
IPageLayout.RIGHT, 0.25f, editorArea);

topRightFolder.addView(PluginConstants.EXECUTION_VIEW);

IFolderLayout bottomRightFolder = layout.createFolder(
"bottomRightFolder", IPageLayout.BOTTOM, 0.50f,
"topRightFolder");
</code>

Can anyone explain why this doesn't work, or what I need to do to fix it? It seems to be ignoring the 0.25f in the topRightFolder.

Thanks,

Steven.
Re: Newbie plugin development question [message #1061679 is a reply to message #1061564] Mon, 03 June 2013 09:21 Go to previous messageGo to next message
Eclipse UserFriend
OK, it's not exactly what I want but changing the 0.25f in the topRightFolder to 0.75f gives me something in the order of 25%, 55% and 20%.

If it is less than 0.50f, I get topRight > 50%, greater then 0.50f, it is about 20%. Doesn't seem to be any in-between.
Re: Newbie plugin development question [message #1064677 is a reply to message #1061679] Thu, 20 June 2013 10:00 Go to previous message
Eclipse UserFriend
Thank you for this thread. I'm another newbie, and this code help me to understand some simple things
Previous Topic:setup remote app server
Next Topic:Conversion of RCP plugin based to RCP feature based
Goto Forum:
  


Current Time: Fri Jul 25 03:55:32 EDT 2025

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

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

Back to the top