简体   繁体   中英

Add Eclipse default menu items in Run Menu Item

I have an RCP application with my own custom perspective. When I am in eclipse debug perspective I see all the options under Run Menu, but when I switch to my own perspective I see only "External Tools" under Run menu. How can I enable all the options to be available in Run menu in my custom perspective as well

Here is how it looks in Debug Perspective, I want all these options to be available in my custom perspective

在此处输入图片说明

In your perspective factory add the action sets defined by the debug plugin for these actions:

@Override
public void createInitialLayout(IPageLayout layout) {

    ...

    layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
    layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
}

IDebugUIConstants is org.eclipse.debug.ui.IDebugUIConstants in the org.eclipse.debug.ui plug-in which you will need to add to your plug-ins dependencies.

If your perspective has already been opened you will need to do a perspective reset to get the new definition.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM