4

How do I start to develop a plugin for Eclipse? I need a tool which isn't out there yet for my further development... so my main concerns are:

  • How to add a perspective?
  • How to add menu items?
  • How to add a view into the "Show Views" menu?
  • How to add to the preference pane?
  • How do I get information, like:
    • Where is the workspace?
    • Which files are open in the editor?
    • Which projects are collapsed / expanded in the left projects view?
    • .....
  • Which conventions (naming...) should I consider?
  • How to set up update site/deployment?

Can you give me some hints, links, tutorials, etc?

Don't get me wrong. I am using Eclipse RCP for developing standalone apps for quite some time, so I am familiar with the techniques, but I never started to develop a plugin for Eclipse itself. Thanks.

Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
Raven
  • 561
  • 6
  • 19

1 Answers1

8

The simplest way is still to download and installed the RCP edition of eclipse (that you are using).

With it comes a series of project templates which will illustrate precisely the topics you want to explore, both for RCP standalone but also for Eclipse contribution itself.

http://www.vogella.com/articles/EclipsePlugIn/images/xeclipseideplugin40.png.pagespeed.ic.MhPsqStO7i.png

See this article and its next part for instance to add contributions to eclipse.

Contribution

One of the key innovations of e4 is the separation between the application model and the implementation of the application’s parts, such as view.

The application model can be extended using fragments.
A fragment is a small application model itself and defines elements which need to be added to the root application model. Fragments can add anything that can be part of the application model, for example handlers, menu items or even windows.

app model


Regarding the default Eclipse Plugin Development Templates, which are in org.eclipse.pde.ui.templates, Mr_and_Mrs_D reports in the coments:

They are in New Project > Plug-in Project (give it a name !) > ...Next > Templates.
They are present to the Eclipse IDE for Eclipse Committers - and they belong indeed to org.eclipse.pde.ui.templates plugin.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hmm - the article you link to is deprecated: http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html - dunno when the tag was added or if really important - it would be great though if you could link to a similar non "deprecated" one - thanks – Mr_and_Mrs_D Apr 12 '15 at 23:54
  • @Mr_and_Mrs_D I have updated the answer to link to e4-related articles, and not e3. – VonC Apr 13 '15 at 06:42
  • Sorry to bother you again - according to: http://stackoverflow.com/questions/6845190/where-are-the-default-eclipse-plugin-development-templates the default project templates are in `org.eclipse.pde.ui.templates` plugin. I have this in my Eclipse IDE for Eclipse Committers 4.4.2 (see https://bugs.eclipse.org/441957) but can't seem to find them to import them in the workspace. Do I need to download the RCP 'package solution' (Eclipse for RCP and RAP Developers) ? Where exactly are those template plugin projects (from inside eclipse) ? – Mr_and_Mrs_D Apr 14 '15 at 16:54
  • @Mr_and_Mrs_D I don't have the specifics on those templates, but downloading an RCP edition is always a good idea, to check in that distribution if what you are looking for is there. – VonC Apr 14 '15 at 16:55
  • Alright found it `New Project > Plug-in Project (give it a name !) > ...Next > Templates !` - and yes they are present to the `Eclipse IDE for Eclipse Committers` - and they belong indeed to `org.eclipse.pde.ui.templates` plugin - tmp link: https://www.dropbox.com/s/jmqdmrl1bn8k8s2/plugins.jpg?dl=0 - you may want to add this info to the answer – Mr_and_Mrs_D Apr 15 '15 at 04:44