Gerd's Blog

eclipsecon: A deep dive into the platform resource model

Not the sexiest part of the eclipse ecosystem, but everyone who is doing something useful with the eclipse RCP has to deal with the eclipse resource framework. The resources in the workspace are represented as tree. Eclipse makes a big effort to make the cost (eg. for rebuilding the source code) proportional to the changes and not proportional to the size of the workspace. This is done by tracking the differences.

What I missed (or ignored) so far was the concurrency issue. The resource tree only exists once, so you have to deal with concurrent read and write access. For read access you don’t have to aquire a lock. Write access uses the “copy-on-wirte” pattern. For a more advanced locking you have to use the ILock interface from the eclipse jobs framework.

Share and Enjoy:
  • Digg
  • del.icio.us