Skip to main content



      Home
Home » Newcomers » Newcomers » createInitialLayout doesn't get called
createInitialLayout doesn't get called [message #262072] Mon, 28 July 2008 02:31
Eclipse UserFriend
I want to add a application specific perspective in my plug-in.
I have followed the steps provided in the API specification for
org.eclipse.ui.IPerspectiveFactory.
Inside the perspective, I have added standard views like resources and
outline views.
When I run the application and switch to my new perspective, the switch
happens. The new perspective shows up. But the views I have added do not
show up.
Here is my extension :
<extension
point="org.eclipse.ui.perspectives">
<perspective
class="my.plugin.perspectives.MyPerspective"
icon="icons/mylogo.gif"
id="my.plugin.perspectives.main"
name="My Perspective">
</perspective>
</extension>

And here is the class

package my.plugin.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class MyPerspective implements IPerspectiveFactory {

@Override
public void createInitialLayout(IPageLayout layout) {
System.out.println("--------------Inside perspective-------");
String editorArea = layout.getEditorArea();
// place a view on the left
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
(float)0.26, editorArea);
left.addView(IPageLayout.ID_RES_NAV);
left.addView(IPageLayout.ID_OUTLINE);
}
}

The println statement inside createInitialLayout method also doesn't show
up on the console.

Google search led me to a previous thread which suggested me to clear
metadata directory which I did with no results.
What should I be doing?
Thanks in advance.
Previous Topic:JUnit tests not running!
Next Topic:User_Library variable..
Goto Forum:
  


Current Time: Sun May 04 01:51:38 EDT 2025

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

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

Back to the top