Working on plugin for IntelliJ, question about com.intellij.tools.Tool class

Hi!

I'm writing a plugin for IntellJ IDEA to convert Eclipse specific launchers, and one of the functions will be an ability to create external tools configuration. For that I'm using com.intellij.tools.Tools object and com.intellij.tools.ToolManager combination. Unfortunately, Tool class has default accessors on a few methods, such as setName(), setEnabledOnMainMenu() and so on and those attributes are required :)

Right now I have a workaround, with wrapper class, which overrides original getName() and isEnabled() with my implementation, so the object can be saved by ToolManager. All works great, new external tool is created, it is displayed in the menu and works as expected. Yet if the user decides to update configuration immediately after it was created, he/she will be greeted with unwelcoming blank External Tools configuration dialog. It happens because UI panel is using method copyFrom() on Tools object and that method copies field-by-field, wihout accessor methods (doh!), the resulting Tool will have null name and UI panel is not ready for that.

Nevertheless, when someone restarts IDEA and then reopens the dialog, all works just fine, because all tools are saved with ToolsProcessor in XML and then retrieved back, using accessor methods (yay!). That class is also not available outside of the package.

To make the story short, how do I get around it, should I open support ticket or get contributor access and just change it myself?

Thank you,
Andrey

---
Original message URL: http://devnet.jetbrains.net/message/5474585#5474585

1 comment
Comment actions Permalink

Tool.copyFrom() will be use getters in the next EAP.

0

Please sign in to leave a comment.