Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Add new prespective : createInitialLayout never gets called.
Add new prespective : createInitialLayout never gets called. [message #574352] Fri, 25 July 2008 12:30
Prasanna K is currently offline Prasanna KFriend
Messages: 78
Registered: July 2009
Member
I have created a new perspective called TestPerspective.
When I run the application and switch to my new perspective, the switch
happens but the views I have added do not show up. Instead an empty page
appears.
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:Using PDE and Maven2 to create OSGi bundle
Next Topic:accessing another plugins preferences
Goto Forum:
  


Current Time: Thu Sep 19 09:12:28 GMT 2024

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

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

Back to the top