createInitialLayout doesn't get called [message #262072] |
Mon, 28 July 2008 02:31 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.07219 seconds