File Dialog opens default path all the time [message #870251] |
Mon, 07 May 2012 09:09  |
Eclipse User |
|
|
|
Hi,
I am using eclipse 3.7 in solaris environment.
I am trying to open one directory using SWT FileDialog.
// here is my code snippet to open directory
FileDialog fd = new FileDialog(new Shell(), SWT.OPEN);
fd.setText("Open");
fd.setFilterPath(File.separator+"net"+File.separator+"vajra"+File.separator+"axeiv");
String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
System.out.println(fd.getFilterPath());
String selected = fd.open();
But what ever may be the path it opening default path.
FileDialog.open is calling openChooserDialog () method in eclipse 3.7.
Can some one tell me why my FileDialog is not opening the filterPath.
Regards,
Abbas.
|
|
|
Re: File Dialog opens default path all the time [message #873608 is a reply to message #870251] |
Fri, 18 May 2012 12:36  |
Eclipse User |
|
|
|
Hi, sorry for the late reply,
I thought this used to work on Solaris, but I see the same as you. I've
logged https://bugs.eclipse.org/bugs/show_bug.cgi?id=380000 .
Grant
On 5/7/2012 9:09 AM, Abbas Mohd wrote:
> Hi,
> I am using eclipse 3.7 in solaris environment.
>
> I am trying to open one directory using SWT FileDialog.
>
> // here is my code snippet to open directory
> FileDialog fd = new FileDialog(new Shell(), SWT.OPEN);
> fd.setText("Open");
> fd.setFilterPath(File.separator+"net"+File.separator+"vajra"+File.separator+"axeiv");
>
> String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
> System.out.println(fd.getFilterPath());
> String selected = fd.open();
>
> But what ever may be the path it opening default path.
> FileDialog.open is calling openChooserDialog () method in eclipse 3.7.
>
> Can some one tell me why my FileDialog is not opening the filterPath.
>
> Regards,
> Abbas.
|
|
|
Powered by
FUDForum. Page generated in 0.03910 seconds