Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16: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 14:47 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 08: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: Sat Nov 02 22:49:48 GMT 2024

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

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

Back to the top