Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Newbie plugin development question(View placement in perspective)
Newbie plugin development question [message #1061564] Mon, 03 June 2013 00:14 Go to next message
Steven Hughes is currently offline Steven HughesFriend
Messages: 2
Registered: June 2013
Junior Member
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 13:21 Go to previous messageGo to next message
Steven Hughes is currently offline Steven HughesFriend
Messages: 2
Registered: June 2013
Junior Member
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 14:00 Go to previous message
Juan Nicolau is currently offline Juan NicolauFriend
Messages: 1
Registered: June 2013
Junior Member
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: Thu Apr 18 07:24:22 GMT 2024

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

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

Back to the top