1 Reply Latest reply on Nov 19, 2019 7:31 AM by Sai Narasimha Prasad Rebba

    Creation of custom perspective

    Amit Jaiswal Active Member

      Hi All,

      How to create a custom perspective in PIM desktop?


        • 1. Re: Creation of custom perspective
          Sai Narasimha Prasad Rebba Guru

          Creating perspectives

          To create a custom perspective it is necessary to add a new java class to a custom plugin containing the new perspective with a perspective identifier.



          Custom perspective class

          public class MyCustomPerspective implements IPerspectiveFactory


            public static String PERSPECTIVE_ID = "hlr.custom.ui.perspective.MyCustomPerspective"; //$NON-NLS-1$



            public void createInitialLayout( IPageLayout layout )


              layout.setEditorAreaVisible( false );





          Now add a contribution to the org.eclipse.ui.perspectives extension point and fill the mandatory properties marked with a *.


          Properties of "Extension Element Details"


          id: PERSPECTIVE_ID of the created perspective class

          name: Translatable name for the perspective.

          *When starting the name with the % sign it is indicating that a variable in a properties file in the plugin directory is used.

          class: Java class reference which implements the IPerspectiveFactory.

          icon (optional): Relative path to the icon which will be used besides the name of the perspective.


          An example custom perspective is provided in the SDK package "com.heiler.ppm.customizing.ui".



          To add a view to a perspective it it necessary to first add a contribution to the org.eclipse.ui.perspectiveExtensions extension point.


          The targetID has to be the ID from the perspective where the views should be added.

          After creating the perspectiveExtension a view can be added to it.


          Properties of "Extension Element Details" of a view in a perspectiveExtension.


          id: The ID of the view you want to add.

          relationship: Defines how the current view is displayed to the view given at "relative" (stated below), for example "left", "right", "bottom", "stack"

          relative: The view which is the reference for the relationship above

          ratio: The percentage ratio [0.01 -1] of space between the relative and the current view


          When choosing relationship "stack", no ratio can be given

          An example custom perspective is provided in the SDK package "com.heiler.ppm.customizing.ui".


          Thank you

          Sai Prasad