View in the Eclipse menu Window-> View View

"I created an Eclipse plugin that creates a view in Eclipse. It currently appears in the Eclipse menu as: 'Window-> Show View-> Others'.

I want to show it in "Window β†’ Show View", and not under the "Other" submenu.

I tried this by giving the "Category" view in the plugin.xml file as "org.eclipse.ui", but it still shows the view in the "Other" submenu.

Is there any other way to do this? Any suggestions are helpful in this regard.

Thanks in advance, Abhinav "

+4
source share
2 answers

I think you can do it from an individual point of view.

In your plugin.xml, add an extension point for "org.eclipse.ui.perspectives" and create a new class that implements IPerspectiveFactory.

This class has a method of "createInitialLayout (IPageLayout layout)", and on this layout you can call "layout.addShowViewShortcut (<your view ID>)"

You can also add shortcuts for wizards, etc.

Hope this helps, Andreas

+5
source

You can also read " Perspective Article " on eclipse:

In the example below, you can see how createInitialLayout implemented in the TestPerspective class. For clarity, the algorithm has been divided into two parts that define actions and layout: defineActions and defineLayout .

 public void createInitialLayout(IPageLayout layout) { defineActions(layout); defineLayout(layout); } 

In defineActions , several elements and sets of actions have been added to the window. Vista can add items to the File > New , Show View or Perspective > Open windows menu.
You can also add complete action sets to a menu or window toolbar. In this example, several File > New and Show View elements are added.

 public void defineActions(IPageLayout layout) { // Add "show views". layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); ... } 
+2
source

All Articles