Working on plugin for IntelliJ, question about class - default access modifier


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 object and 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,

Comment actions Permalink

We've changed the implementation of the Tool class so that the copyFrom() method uses getters now. The new implementation will be available in IntelliJ IDEA 12.1.

Comment actions Permalink

Thank you, Dmitry! You guys rock!


Please sign in to leave a comment.