[oXygen-user] How to turn of file filtering when using workspace.chooseFile method?

Michael Anthony Smith
Fri Jun 24 05:57:34 CDT 2011

Hi Radu,

Thanks for your quick response.

It would be convenient to be able to specify a 'null' value (or empty array) to the file selection filters, in order to have no filtering applied (which is our use case).
The alternative of having the '*' filter consistently selecting all available files would also be acceptable for this purpose, though not quite as tidy.

For 12.1 and 12.2 releases of oXygen I will follow your suggestion and add some more types to the filtering (the problem is I do not know what the extensions will be).


-- -------------------------------------------------------------------------
Michael Anthony Smith, DeltaXML Ltd "Change control for XML"
T: +44 1684 578751   E:    http://www.deltaxml.com
Registered in England 02528681 Reg. Office: Monsell House, WR8 0QN, UK

On 24/06/2011 11:02, Radu Coravu wrote:
> Hi Michael,
> The "*" file extension does not seem to properly work on Windows if the
> file chooser used in Oxygen is the swing JFileChooser.
> By default on Windows Oxygen shows a native file chooser (which properly
> supports the wildcard) but there are situations in which the native file
> chooser has crashed in a previous session and Oxygen shows a swing
> JFileChooser instead (this was also my case when I reported the problem
> with your plugin). The JFileChooser is also shown on Linux.
> So my advice to you would be to specify specific extensions like "xml",
> "dita", etc... which are properly supported.
> What we can do on our side would be to properly support the wildcard
> file filter also in the JFileChooser.
> We can also allow you to set a NULL "allowedExtensions" array to the
> method if you want the file chooser to show the "All files" by default.
> Regards,
> Radu
> Radu Coravu
> <oXygen/>   XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
> On 6/24/2011 12:18 PM, Michael Anthony Smith wrote:
>> I have been developing an oXygen plugin and am using oXygen's 'workspace.chooseFile' filter to provide the functionality for locating a file on disk.
>> The aim is to have no filtering at all, so the user can see all the files in a directory. However, I have yet to workout the correct list of filter extensions to achieve this result on all operating systems (e.g. Windows 2008 R2, Windows 7, and Mac OS X.6).
>> The current plugin is issuing the following command is:
>> workspace.chooseFile("Choose file", new String[]{"*", "*.*"}, "Any file", ioArg == IOArg.OUTPUT);
>> Therefore, the current filters are "*" and "*.*".
>> Any suggestions appreciated.
>> Anthony.
> _______________________________________________
> oXygen-user mailing list
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user

More information about the oXygen-user mailing list