Create File Browser [message #1036086] |
Sun, 07 April 2013 19:43  |
Eclipse User |
|
|
|
Hello,
I am trying to create a file browser when the user clicks on a button at the property I have generated.
The following code I use,it fetches the whole files at my workspace.
However,I need to browse over all my PC.
IFile[] files = WorkspaceResourceDialog.openFileSelection(null, "File selection", "Please select any file", false, null, null);
Any ideas!
[Updated on: Sun, 07 April 2013 20:05] by Moderator
|
|
|
Re: Create File Browser [message #1036223 is a reply to message #1036086] |
Mon, 08 April 2013 01:10   |
Eclipse User |
|
|
|
Fatla,
Have a look at org.eclipse.emf.common.ui.dialogs.ResourceDialog.
On 08/04/2013 1:43 AM, Fatla 777 wrote:
> Hello,
> I am trying to create a file browser when the user clicks on a button
> at the property I have generated.
> The following code I use,it fetches the whole files at my workspace.
> However,I need to browse over all my PC.
>
> IFile[] files = WorkspaceResourceDialog.openFileSelection(null, "File
> selection", "Please select any file", false, null, null);
>
>
> Any ideas!
|
|
|
Re: Create File Browser [message #1036607 is a reply to message #1036223] |
Mon, 08 April 2013 11:54  |
Eclipse User |
|
|
|
Thanks Ed.
It works.
ResourceDialog resourceDialog=
new ResourceDialog(Display.getCurrent().getActiveShell(),
"Select your file", SWT.OPEN);
resourceDialog.create();
resourceDialog.open();
String path=resourceDialog.getURIText();
|
|
|
Powered by
FUDForum. Page generated in 0.36773 seconds