J-Dizzle
J-Dizzle

Reputation: 5153

Eclipse Perspective Development - Extend CDT Perspective?

Will keep the question simple, but its implications are much broader.

Goal

Create a 'My C/C++' perspective plugin.

Need

Essentially just a way to share a customized C/C++ perspective

Notes

This is a very helpful perspective-plugin tutorial:

There must be a simple 'man/example/etc' out there. I've browsed all over the CDT plug-in manual to no avail:

Perhaps it has to do with the org.eclipse.ui.perspectiveExtensions, but it is not clear to me how that would work.

Upvotes: 0

Views: 506

Answers (1)

greg-449
greg-449

Reputation: 111142

org.eclipse.ui.perspectiveExtensions on its own just lets you add new views, menu items, tool bar items and new wizard items to an existing perspective (such as the C/C++ perspective).

If you want to create a new perspective you will have to declare it with org.eclipse.ui.perspectives and then use the perspective factory class and org.eclipse.ui.perspectiveExtensions to declare all the views, menu items and so on that you want in the perspective. This will mean finding out the ids of the C/C++ items you want to include - which probably means looking at the CDT plugin.xml files and their perspective factory source.

Update: The C/C++ Perspective will be declared in one the CDT plugin plugin.xml files using the org.eclipse.ui.perspectives extension point. That declaration will give the name of the existing perspective factory class used. You may be able to extend this class (but if it is in an internal package this is not officially supported).

Upvotes: 1

Related Questions