Eclipse plugins that tries to support a specific framework such as Hibernate, JPA, servlets, Struts, Spring, Drools, log4j, etc. all have many of the same challenges but somehow they have a tendency to solve it differently and we end up with a fractured IDE from a usability and architectural perspective.
It seems like everyone understands what functionallity that is specific for their framework, but forget to consider issues like multiple version support, classpath libraries, debugging/launching and coexistence with other 3rd party framework plugins.
After working five years with this in context of JBoss Tools and Eclipse itself I came to realize a lot of this fracture is caused by either not using already existing functionallity available in Eclipse API's or simply not realizing how little effort it actually takes to handle these common issues.
This talk will outline the identified issues and present patterns and in some cases implementation for how framework plugins should be done so they work well within the majority of the Eclipse Java ecosystem.
1. HOW TO MAKE A
FRAMEWORK PLUGIN
THAT DOES NOT SUCK
by Max Rydahl Andersen, Red Hat
2. WHICH OF THESE ARE
FRAMEWORK PLUGINS ?
• Hibernate Tools • Seam Tools
• Eclipse JDT • SpringIDE
• JUnit Plugin • TestNG Plugin
• Apache Ant Plugin • CVS Plugin
• SVN Plugin • Eclipse CDT
• GEF • DroolsIDE
3. TYPICAL KEY FUNCTIONS
• Provide support for a (Java) framework
• To be used by new and seasoned developers
• Setup of Libraries/Dependencies
• Wizards to Create Artifacts
• Editors for artifacts with code completion
• “Compile/Validate”
• Navigate between artifacts
• Refactoring
16. GOING BEYOND NATURES
• Natures are “stupid markers” and require custom UI
• Facets
are an API to provide unified enablement and
configuration of frameworks
•Iview Facets as installer/uninstaller of Natures + standardized
Configuration UI
• Facet’s have been around since 2006 (Scary!)
• Start use them!
26. PRACTICE RELATIVITY
Folders/Files should be defined relative to a “root”
Avoid hard coded names/paths
Use logical names instead
Make sure sharable settings are storable in a
project...
27. BECAUSE THEN YOU ARE
SUPPORTING DEVELOPERS
THAT WORK WITH OTHER
DEVELOPERS, AND...
28. ...YOUR PLUGIN WILL NOT
SUCK!
...because you are implementing the key functionalities
...you use selections and good defaults so users doesn’t have
to think, type or read (too much)
...you use the configure menu and/or facets to provide
consistent UI for framework setup
...you support multiple runtimes to allow use of old and new
...you use relative settings to allow for shareable projects/
configuration in teams
29. ...YOUR PLUGIN WILL NOT
SUCK!
...because you are implementing the key functionalities
...you use selections and good defaults so users doesn’t have
to think, type or read (too much)
...you use the configure menu and/or facets to provide
consistent UI for framework setup
...you support multiple runtimes to allow use of old and new
...you use relative settings to allow for shareable projects/
configuration in teams
30. RELATED LINKS
How to report bugs effectively http://bit.ly/cbUW9d
Eclipse Facets Tutorial http://bit.ly/aEf1am
Navel Gazing Classpath Containers http://bit.ly/9q0h7S
Eclipse 2009 Long talk http://bit.ly/cxy61Q
31. QUESTIONS ?
Up Next in Steven’s Creek:
Pimp My
Bug Report
• http://in.relation.to/Bloggers/Max
• http://twitter.com/maxandersen
• http://twitter.com/jbosstools
Notes de l'éditeur
Project Wizards
Class Path containers
New Java Class Wizard, New Servlet, New JPA Mapping
.java, web.ml, .drl, hbm.xml
open-on, find references, open type/resources
compile/validate requires full domain knowledge
refactoring if you are really good
Primary use case for Apache Ant Plugin is not as a framework but as to being used.
CVS plugin and SVN plugin team provider plugins; again for using - not for developers to use.
GEF, a plugin to build other plugins with - relies on pure Java plugin for its framework “features”
Libraries not explicitly defined
Upgrades to plugin magically updates users libraries
Only One Runtime
Libraries not explicitly defined
Upgrades to plugin magically updates users libraries
Only One Runtime
Libraries not explicitly defined
Upgrades to plugin magically updates users libraries
Only One Runtime