Monday, March 27, 2006

Wasting of time

Last Friday is a bad day for me. I spent three hours in deploying an Eclipse plugin. The plugin was written by another developer. I copied it into my Eclipse plugin directory, everything is fine. Then I made some source code changes and recompiled the package using "javac" and "ant jar" commands. Copied the new jar to plugin directory. It just did not work. Giving me "class not found" exception when Eclipse tried to load the plugin.

AfterI read some online guides about writing Eclipse plugins, I figured out how. Seems I have to create an eclipse plugin project, write the source file, test the plugin using Eclipse runtime test environment, then export the plugin. The magical thing is in the export phase, some meta data is generated for the plugin and saved in a property file, which will be used in plugin deployment. Also I noticed potentially there are two ways of organization of eclipse plugin file, possibly depending on the Eclipse version. I still haven't figured out why my original way of compiling and packaging failed. Because I manually inserted some meta data too.

One lesson, when you are new to something, better stick with a tutorial first. Don't think you know how things work and waste time.

No comments: