Monday, March 21, 2011

Eclipse 4.x Compatibility Layer: What's hot? What's not?

A session discussing migrating Eclipse 3.x-based code to Eclipse 4.x. The 4.x org.eclipse.ui.workbench plugin can be used with a 3.x plugin, acting as a "compatibility layer", if the 3.x code makes some adjustments. Specifically these involve how it references workbench code which the 4.x development model injects via annotations when needed.

The presentation suggested one strategy that seems feasible. Though onerous, they suggest combing code to find such workbench references (registering listeners, getting active Shell, etc) and abstracting it out to a set of 3.x-dependant abstract classes that can be abandoned when switching to 4.x.

The presentation went on to describe some of the other probable problem areas:
  • Presentation extension deleted (we don't use it)
  • Theme extension deleted (we might be doing something with this in Properties)
  • Combining ActionSets and Menus extensions can be problematic. I think ActionSets are actually deleted and we don't use them anyway. 
  • He cautioned that Menus contributions may be affected in sort order, placements, etc. Something to watch out for.
  • A few Eclipse implementations of setFocus and dispose had to be fixed with 4.x so they're areas to watch.
  • @noextend, @noimplement and internal packages are off-limits!

No comments:

Post a Comment