How to use the IntelliJ FileDialog?

Hi,

In my plugin I need to display the IntelliJ file dialog to prompt the user to provide a SaveAs location.
How should I do this?

thanks
dk

3 comments
Comment actions Permalink

I am not sure if my question seems too naive but I did look around in the documentation for any probable names of relevant classes. For instance I looked for FileDialog that eclipse uses, or SaveAsDialog nad saveas .... I haven't been able to locate any thing useful. Please at least provide a pointer if I am missing something.

The other option that I have is to use plain old JFileChooser. But in that case its look and feel will be different from that of IntelliJ. Please help.

thanks
dk

0
Comment actions Permalink

Hi Dhwani,

try using FileChooserFactory.createFileChooser(...). You need to define a FileChooserDescriptor. Not sure if you can change the name of the "Open" button to "Save". There is nothing such as "Save as..." in intelij afaik.

And you're in the wrong forum here. You should try the "Open API" forum.
http://intellij.net/forums/forum.jspa?forumID=23

Regards,
Dan

1
Comment actions Permalink

If SaveDialog is what you are looking for, then use this: 

FileChooserFactory.getInstance().createSaveFileDialog()

 

1

Please sign in to leave a comment.