Alok
Alok

Reputation: 949

How to programmatically load a desired plugin on eclipse start up

Is there any method in SWT to programmatically set my plugin as default whenever the eclipse IDE starts i.e. when the eclipse starts a desired plugin is set as perspective.

Upvotes: 0

Views: 619

Answers (1)

Baz
Baz

Reputation: 36904

If I remember correctly, it should be possible with setDefaultPerspective(String id).

You can access this via:

PlatformUI.getWorkbench().getPerspectiveRegistry().setDefaultPerspective(id);

However, be careful when doing this. I can imagine that a lot of people might uninstall your plugin, just because they are annoyed by this small change.

Upvotes: 2

Related Questions