OpenOffice/NetBeans Integration from a Warsaw NetBeans Platform Student

Michał Woźniak, one of the students at the NetBeans Platform Certified Training in Warsaw, delivered by Toni, Karol, and myself, has created a pretty intense looking plugin:

Its aim is to copy the content of the NetBeans editor to RTF documents. Michał reports that he has tested it with NetBeans IDE 6.5, together with several of the popular RTF editors: OpenOffice Writer, Impress, and Microsoft Word. He also tells me the following:

After installation of this module the following will be added: (1) new option "Copy as RTF format" in popup menu, when you select editor content, (2) new options panel, where you can choose the profile formatting for copy, paste, font and size, while there are also two options for copying, either with highlighting or with only static formatting.

The plugin can be downloaded here:

http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=16089

I must say it works really well! Select something in the editor, right-click, choose "Copy as RTF format", and then paste into one of the aforementioned document types. That gets you the following, in the case of OpenOffice Writer:

You can also customize what happens when you paste the text:

What's interesting when you look in the layer file is that many different types of editors are supported, including Python, for example. I especially recommend the TransferHandler, for anyone who is interested in drag and drop behavior.

One thing I would change is: the popup menu item in the editor should be disabled, if the user hasn't selected anything. Even better, if no text is selected at all, the menu item should be disabled.

But, great work, Mike! You've definitely qualified as a NetBeans Platform Certified Engineer!

Comments:

Hi, great work.

Suggestion, how about right click context menu for "select all" too.

Neil

Posted by Neil Hathaway on February 17, 2009 at 05:35 PM PST #

Very interesting. I also had to implement RTF copy action for an in-house project a few months ago and I noticed a really old bug report for this ( http://www.netbeans.org/issues/show_bug.cgi?id=95146 ). Will this ever be added to the NetBeans codebase ?

Anyhow, what I would \*really\* like to see is a \*HTML\* copy action. I've reached the conclusion that some JDK bug makes it impossible to build HTML transferables programatically.

Posted by Emilian Bold on February 18, 2009 at 07:32 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
24
25
26
27
28
29
30
   
       
Today