Note that there are some explanatory texts on larger screens.

plurals
  1. POEclipse RCP: How to order perspective buttons belonging to different plugins?
    text
    copied!<p>My application has 5 plugins. Each plugin has a perspective of it's own and hence each perspective extension definition is under individual plugin's plugin.xml. </p> <p>Now, I want to control the order in which these perspectives appear in my application. How to do it?</p> <p>There is one main plugin that holds "ApplicationWorkBenchAdvisor.java". This has initialize() method in which I am iterating through the perspective registry using</p> <pre><code>PlatformUI.getWorkbench().getPerspectiveRegistry().getPerspectives(); </code></pre> <p>and then appending perspective ids in a comma separated fashion to a String variable (pbar) which is used later like this.</p> <pre><code>PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS, pbar); PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS, pbar); </code></pre> <p>When iterating thourgh the perspective registry, I can compare perspective ids and sort it(when adding to 'pbar' by comparing ids) the way I want it to appear but, I don't want to do this ordering here as it appears like a dirty way.</p> <p>Is there any other place where we can fix the order in which perspectives appear? (Each perspective resides in different plugin).</p> <h2>ADDED</h2> <p>1) Could we also control the ordering in the perspective switcher?</p> <p>2) Is there a way to control entry into perspective registry to in inflict the desired order. If not could we write back into perspective registry?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload