Search code examples
eclipse-gefwindowbuilderdraw2d

draw2d and gef classes in windowbuilder implementation


I'm browsing the source code of windowbuilder. In the org.eclipse.wb.core plug-in, beside the src folder, there exists src-draw2d and src-gef folders which contains an identical (or at least very similar) implementation of eclipse.gef and eclipse.gef.draw2d.

Why don't they just import these plugins but do this code duplication?


Solution

  • If you check the source code in those directories, you will find that it is NOT draw2d or GEF, but their own implementation of the same functionality in a more simple way. For example, the GEF abstract Command class has 11 methods and two constructors, while the "new" WB abstract Command has only one method: execute.

    I think they probably did this because although GEF is incredible, it is also big and complex, so they decided to re-implement a watered down version of it.