Rob Williams is a probabilistic Lean coder of Java and Objective-C. Rob is a DZone MVB and is not an employee of DZone and has posted 170 posts at DZone. You can read more from them at their website. View Full User Profile

First Blush Doing Plugin Development in Years

10.09.2008
| 4914 views |
  • submit to reddit
I had a long post I was doing here, but Safari start dribbling all over itself, choking the CPU to death, so I killed it (not thinking I was flushing a pretty much fully baked piece (guess it‘s time to start using some software instead of this browser interface)).

So on the good side, the OOB experience of the PDE is really good now. When I did my first tour, I bought the Gamma/Beck book and went through the examples and got underway. Back then, setting up the environment was a drag. Not a ‘jesus, I want to kill myself and I haven‘t written a line of code‘ nightmare, but still, importing the plugins, and all was kind of a drag. Now you just run the wizard, get your project, then just run the project as an Eclipse app and up comes the other instance of Eclipse.

On the JET side, the two part tutorial is actually good. Of course, there is some sense that you have to go through a lot of crap to get some code generated. Also, the fact that they recommend turning off Build Automatically is kind of a joke (since it turns it off on all the other projects in the workspace). But once you get into the actual writing of code that will write code, you are going to have a plugin with the template and after hooking an action you will then be getting a JETEmitter and generating the code programmatically.

The one part of the process that was a nightmare was hooking the actions. I wanted to just put an item in the context menu so I could right click on a source file and choose ‘Generate/Entity Interface Components.‘ Well that turned out to be hellish? How could that be? There‘s a wizard for making a popup menu. But of course, the code in the tutorial didn‘t match the current state of the PDE. Then, the generated hook didn‘t seem to come up. Kept restarting things, guessing, reading, finally got it to work, but turned out it would only come up in the Navigator view. Still not sure why that is. So, staying true to the now, what 5 year tone of this blog, let me ask the question: did it never occur to these guys that there are much better ways to spend time than learn the arcana of some hooking little language?? Two ancillary thoughts on this: 1. I have been thinking a lot about Lean still lately, and in Lean we would have seen in an early iteration of this thing, that people were spending inordinate amounts of time on this part of the process and the devs would have done something about it, and 2. little languages of this sort, done in XML, are by-and-large, nightmarish torture devices. How hard would it be to provide some kind of in situ means of finding the desired implantation site? Now, the counter to this whiney gripe is that I remember the Gamma/Beck book talking about using the existing code as your guide. I guess part of the quicker OOB was once I was wading in the goo, the quicker OOB also meant that I didn‘t know where the source was for all the existing plugins. Guess I‘ll go look for that.

References
Published at DZone with permission of Rob Williams, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Arek Stryjski replied on Thu, 2008/10/09 - 9:43am

Sorry, but this text is not readable. After reading 4 times first paragraph finally I got it.

Please remember what for some people here English is not first language, so they have no chance to understand you if the text is too poetic. Maybe it is also good idea to wait with publishing to next morning if your computer crash in the middle of writing an article.

Thank you.

Otengi Miloskov replied on Thu, 2008/10/09 - 12:06pm in response to: Arek Stryjski

+1

Rob always writing this style is very hard to understand, He wrote another article and I commented to him that it was hard to read. I have to read again his article to understand but he have good points about JSF issues.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.