Newbie plugin development question [message #1061564] |
Sun, 02 June 2013 20:14  |
Eclipse User |
|
|
|
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.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13451 seconds