X

Geertjan's Blog

  • January 23, 2006

Drag and Drop from Component Palette to Multiview Editor

Geertjan Wielenga
Product Manager
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!

Join the discussion

Comments ( 7 )
  • Naoki Kishida Monday, January 23, 2006
    I want to know that how I associate text editor with explorer tree like properties editor.
    For example, in the case of Manifest File, Explorer node shows a element of manifest.
  • Geertjan Thursday, January 26, 2006
    Interesting question, Naoki. Is what you're thinking about something similar to what I blogged about here?
  • Naoki Kishida Friday, January 27, 2006
    Yes, yes, it just likes what I want to do.
    I am going to develop a wiki style editor and I want to implement a outline view in Explorer window. I looking foward to your tutorials:-).



    By the way, I enhanced a Camel Case Completion by modifing NetBeans's code(issue 71143 on issuzila).
    Can I develop the feature as independent module without modifing a original NetBeans code?
  • Geertjan Saturday, January 28, 2006
    If you look right at the end of the NetBeans Manifest File Syntax Highlighting Tutorial, you'll see a screenshot of someone else's syntax hihglighting for Wiki files. Maybe it will inspire you! In response to your question on Camel Case, I think the answer is "yes", but I don't know for sure. Just try it out and see what happens.
  • Geertjan Friday, June 30, 2006
    The sample is not in my update center, but if you go to my blog entry for 30 June 2006, you will find it there.
  • Donald Walters Friday, March 6, 2009

    I have been search for awhile now for a sample or tutorial on using multiview editor with a palette. But, I haven't found anything. I see this tutorial but this doesn't speak of multiview only a editor.

    I have a xml file that I want to represent using graphs in the design view and the xml source in the xml view. In the design view I need to be able to use a palette for the design items. Similar to visual JSF or even when creating swing components. Can you provide me with some examples or tutorial on some specific as this?


  • Donald Walters Friday, March 6, 2009

    I have been search for awhile now for a sample or tutorial on using multiview editor with a palette. But, I haven't found anything. I see this tutorial but this doesn't speak of multiview only a editor.

    I have a xml file that I want to represent using graphs in the design view and the xml source in the xml view. In the design view I need to be able to use a palette for the design items. Similar to visual JSF or even when creating swing components. Can you provide me with some examples or tutorial on some specific as this?


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.