Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » createInitialLayout method not called when initializing a new perspective
createInitialLayout method not called when initializing a new perspective [message #326482] Thu, 20 March 2008 12:29 Go to next message
Eclipse UserFriend
Originally posted by: massimiliano.fanciulli.intecs.it

Hi all,

i have added a new perspective to my plugin, following those steps
described into the documentation. i have added the following to the
plugin.xml file:

<extension
point="org.eclipse.ui.perspectives">
<perspective

class="it.intecs.pisa.develenv.ui.perspectives.developPerspective "
fixed="false"
icon="icons/Toolbox_gear_blue.jpg"
id="com.intecs.ToolboxScript.ui.developPerspective"
name="TOOLBOX_develop">
<description/>
</perspective>
</extension>

Then i have created the class
it.intecs.pisa.develenv.ui.perspectives.developPerspective and populated
the method createInitialLayout as follows:

public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();


// Top left: Resource Navigator view and Bookmarks view placeholder
IFolderLayout topLeft = layout.createFolder("topLeft",
IPageLayout.LEFT, 0.25f,editorArea);
topLeft.addView(IPageLayout.ID_RES_NAV);
topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);

// Bottom left: Outline view and Property Sheet view
IFolderLayout bottomLeft = layout.createFolder("bottomLeft",
IPageLayout.BOTTOM, 0.50f,"topLeft");
bottomLeft.addView(IPageLayout.ID_OUTLINE);
bottomLeft.addView(IPageLayout.ID_PROP_SHEET);

// Bottom right: Task List view
layout.addView(IPageLayout.ID_OUTLINE,
IPageLayout.TOP|IPageLayout.LEFT, 0.33f, editorArea);

}

When running the plugin, the perspective is listed but, when selected,
it doesn't show any view. Do you know why? Do you have any tutorial that
i can read? Unfortunately i haven't found good documentation about it yet.

Thank you in advance.
Regards,
Massimiliano Fanciulli
Re: createInitialLayout method not called when initializing a new perspective [message #326616 is a reply to message #326482] Wed, 26 March 2008 10:47 Go to previous messageGo to next message
Eclipse UserFriend
If you run it once it will never call that method again ... unless you
reset your perspective or delete your workspace on launch.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: createInitialLayout method not called when initializing a new perspective [message #326637 is a reply to message #326616] Thu, 27 March 2008 04:02 Go to previous message
Eclipse UserFriend
Originally posted by: massimiliano.fanciulli.intecs.it

Thank you very much Paul! Now it works properly..


Massimiliano

Paul Webster wrote:
> If you run it once it will never call that method again ... unless you
> reset your perspective or delete your workspace on launch.
>
> PW
>
Previous Topic:implementing my own contentmergeviewer
Next Topic:JFace Treeviewer refresh collapses the tree nodes
Goto Forum:
  


Current Time: Tue Apr 15 02:00:18 EDT 2025

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

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

Back to the top