Sawsen
Sawsen

Reputation: 83

How to include Switch Workspace in File menu

I am trying to develop an Eclipse RCP application but I have a problem. I don't know how to implement "switch workspace " in file menu.

Can somebody please help me?

Upvotes: 0

Views: 239

Answers (1)

greg-449
greg-449

Reputation: 111142

In your RCP ActionBarAdvisor derived class you can create the Switch Workspace action with:

IWorkbenchAction switchWorkspaceAction = IDEActionFactory.OPEN_WORKSPACE.create(window);
register(switchWorkspaceAction);

and then add it to a menu manager.

You will need to have the org.eclipse.ui.ide plugin as a dependency.

Upvotes: 3

Related Questions