Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Create File Browser
Create File Browser [message #1036086] Sun, 07 April 2013 23:43 Go to next message
Fatla 777 is currently offline Fatla 777Friend
Messages: 13
Registered: April 2013
Junior Member
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: Mon, 08 April 2013 00:05]

Report message to a moderator

Re: Create File Browser [message #1036223 is a reply to message #1036086] Mon, 08 April 2013 05:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26237
Registered: July 2009
Senior Member
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 15:54 Go to previous message
Fatla 777 is currently offline Fatla 777Friend
Messages: 13
Registered: April 2013
Junior Member
Thanks Ed.

It works.

ResourceDialog resourceDialog=
      new ResourceDialog(Display.getCurrent().getActiveShell(),
                               "Select your file", SWT.OPEN);
      resourceDialog.create();
      resourceDialog.open();
      String path=resourceDialog.getURIText();
Previous Topic:[CDO] Dirty transactions
Next Topic:Loading an encrypted emf resource
Goto Forum:
  


Current Time: Fri Nov 28 10:03:25 GMT 2014

Powered by FUDForum. Page generated in 0.04132 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software