Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find design patterns, best practices for Eclipse plugin development

Our team is developing a Eclipse based IDE (typically a plugins), currently we are progressing good but I feel somehow we are feeling smell of bad practices in code. Example I can give here is, eventListeners :

Consider we have button named button1 and in the same java file (just below the button) we are adding selection listener to it like:

button1.addSelectionListener(new SelectionListener() {
    //Remaining code here
}

Which I feel is completly bad idea, and my question, is there any design pattern, best practices etc available for eclipse plugin development? Or do you have any small tips/suggestions for the same? I know there are books available like Code Complete 2 etc etc, but I need bit suggestions respect to eclipse plugin development.

I tried in Google and didn't get much good informations regarding same, I got this IBM's article. But I feel it's not very useful, any suggestions or tip is appreciated.

Note: Please let me know if it is not appropriate here or is it good for anyother stackexchange networks (like programmers), I can move it there.

like image 528
Pradeep Simha Avatar asked Apr 04 '13 10:04

Pradeep Simha


2 Answers

After several years of plugin development, I find these resources to be most useful for me when I find myself struggling on how to implement new feature:

  1. Eclipse sources. Nothing will beat this. Try to find some already existing analogic part of what you're just doing and look how Eclipse developers did it - what patterns and extensions they used and so on. Helps to keep you plugins consistent with other parts of Eclipse. Eclipse Plugin Spy is your friend here (Alt + Shift + F1/F2).

  2. Platform Plug-in Developer Guide - will guide you through basic concepts of Eclipse, like how to create menus properly, implement an editor, or save user preferences.

  3. Eclipse Plug-ins (4th Edition) - Well known must-have for plugins developer.

And, of course, Stack overflow :)

like image 90
dreo Avatar answered Nov 15 '22 23:11

dreo


I like to add some more resources that I have found useful to dreo's answer. The eclipse sources are invaluable, if you want to understand something in detail. To understand global concepts however, I suggest to read as much tutorials as you can. I can recommend the following websites:

Eclipse Corner Articles Has a lot of tutorials ranging from basic concepts to plugins specific topics.

Vogella Eclipse Tutorials Also a good tutorial website. It deals with a lot of topics that are important for Eclipse RCP development.

SWT Snippets More than 100 code snippets. Really useful, if you want to learn more about SWT and its capabilities.

The Official Eclipse FAQs Last but not least, I can recommend the official Eclipse FAQs. They provide compact solutions for a variety of topics.

like image 20
Tobias Willig Avatar answered Nov 15 '22 22:11

Tobias Willig