FileFieldEditor Help [message #665128] |
Wed, 13 April 2011 07:45  |
Eclipse User |
|
|
|
Hello,
I'm using a FileFieldEditor form jface plugin in a preference page to
allow user to select an executable file within her or his file system.
A problem comes when I select an "app" executable file in Mac OSX.
As it is actually a Folder, it is not considered to be a valid file
in "checkState" method of FileFieldEditor : the test "if
(file.isFile())" on line 137 obviously returns false and goes through
an error "value must be an existing file". As a result, "Apply" and "OK"
buttons are not enabled.
Am I misusing FileFieldEditor ? Is there another more suitable class ?
Is there a workaround for app mac "files" ?
Thks a lot,
frank
PS : org.eclipse.jface_3.5.2.M20100120-0800.jar
|
|
|
|
Re: FileFieldEditor Help [message #665671 is a reply to message #665561] |
Fri, 15 April 2011 08:08  |
Eclipse User |
|
|
|
Le 15/04/11 08:09, Lakshmi Shanmugam a écrit :
> Hi,
>
> The SWT FileDialog shows and treats the .app correctly, but as you
> mentioned the check in the checkState() is causing this.
> You should try asking this in the JFace forum if FileFieldEditor should
> work with .app.
> If you want to provide the user with a list of programs to select from,
> you can use Program.getPrograms(). The Editor Selection dialog uses this
> mechanism.(Preferences > Editors > File Associations, click on 'Add'
> next to the 'Associated Editors:' )
Ok, thanks for your reply and idea. And sorry : I will post the
question in JFace forum
|
|
|
Powered by
FUDForum. Page generated in 0.04853 seconds