I want to register to get notified of all Java changes in Eclipse. I can do this by calling JavaCore.addElementChangedListener(). However, I don't want my plugin to be loaded until org.eclipse.jdt.core is loaded. My hack attempt to do this was declare a dummy extension to an org.eclipse.jdt.core extension point, but it doesn't work on all versions of Eclipse. Plus it's ugly. How can I cleanly ensure that my plugin is loaded when another plugin is loaded?
views:
802answers:
2
+2
A:
It turns out there is no built-in way to load my plugin when another plugin is loaded. The most general way to solve the problem is to force my plugin to load on startup and setup a listener for other plugins getting loaded. Then, when jdt.core loads I can add my element changed listener. However, even though it seems theoretically possible I can't figure out how to force my plugin to load on startup. I went with the ugly hack.
Kent Beck
2008-12-03 14:27:06
That was the best I could come up with. But you asked for clean. Thanks for JUnit and agile btw.
jamesh
2008-12-04 20:55:39