Download NetBeans!

20060123 Monday January 23, 2006

Drag and Drop from Component Palette to Multiview Editor

Right now there are so many small, useful plug-ins coming in that it's a bit overwhelming (at least, from where I'm sitting). The main question I'd like to ask plug-in module authors is: What specific support would you like, in terms of advice or doc support or suggestions? In other words, what would make your life (even) better?

And, FYI, my favorite plug-in module for today (by the way, notice that word "today", and think about it, and then think about how a few weeks ago I would definitely have written "my favorite plug-in module for this month") is Martin Adamek's Autoupdate Descriptor Transformer. When you install this module, a loader is added for the autoupdate descriptor. (By the way, the autoupdate descriptor is the XML file that describes your NBM files and that your users need to register in the Options window in order to be able to access your NBM files from their Update Center wizard). Then, you can right-click the autoupdate descriptor and choose "Transform to HTML". When you do this, you get a beautiful HTML file that lists all your modules. (You can change the CSS of the module, so that a different result is produced.). For an example, click here to see mine. Wonderful, right? (If you want to check out another plug-in, one that was announced a few minutes ago, check out FindBugs Plug-in for NetBeans.)

Now, on to other things. For those who're interested in the Component Palette, here's a question from Dave Havrda (he's been mentioned once or twice in this blog): "Do you have any examples of drag and drop from the common palette to a multiview editor? When my source (text) view is up I dont have a problem. But when I want to drag to my diagram view I cant get anything to work."

I asked NetBeans developer Stanislav Aubrecht to provide a sample for this scenario. And here's the result, a textarea that lets you drag and drop items from the palette onto the text (you can also drag text from the textarea into the palette, and then you will have created a new item in the palette):

To inspect the sources of the above plug-in module, go to my Update Center:

http://blogs.sun.com/roller/resources/geertjan/updates_geertjan.xml

And there you'll find the plug-in module that will install the sample:

You'll then find the sample in the New Project wizard:

A tutorial on this will follow. In the meantime, happy drag and dropping!

Jan 23 2006, 10:53:30 AM PST Permalink