Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » FileDialog Tree (Browse Workspace)
FileDialog Tree (Browse Workspace) [message #325198] Tue, 12 February 2008 14:33 Go to next message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
Hello,

i have a normal FileDialog with the code at the bottom. But i want the
FileDialog like the Browse Workspace in the EMF Plugin. I think its a
standard dialog, so i am asking here. This Dialog is available in the
new EMF Project wizard. It is like a tree only with the workspace as
content.

Greetings
Jörg


Code:

FileDialog fd = new FileDialog(getViewSite().getShell(), SWT.OPEN);
fd.setText("Open");
fd.setFilterPath(Platform.getLocation().toOSString());
String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
fd.setFilterExtensions(filterExt);
String selected = fd.open();
System.out.println(selected);
Re: FileDialog Tree (Browse Workspace) [message #325236 is a reply to message #325198] Tue, 12 February 2008 23:08 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
I think ElementTreeSelectionDialog is what you want.

Francis

Jörg wrote:
> Hello,
>
> i have a normal FileDialog with the code at the bottom. But i want the
> FileDialog like the Browse Workspace in the EMF Plugin. I think its a
> standard dialog, so i am asking here. This Dialog is available in the
> new EMF Project wizard. It is like a tree only with the workspace as
> content.
>
> Greetings
> Jörg
>
>
> Code:
>
> FileDialog fd = new FileDialog(getViewSite().getShell(), SWT.OPEN);
> fd.setText("Open");
> fd.setFilterPath(Platform.getLocation().toOSString());
> String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
> fd.setFilterExtensions(filterExt);
> String selected = fd.open();
> System.out.println(selected);


Re: FileDialog Tree (Browse Workspace) [message #325475 is a reply to message #325236] Tue, 19 February 2008 16:51 Go to previous message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
thx this helps me a lot.

Francis Upton schrieb:
> I think ElementTreeSelectionDialog is what you want.
>
> Francis
>
> Jörg wrote:
>> Hello,
>>
>> i have a normal FileDialog with the code at the bottom. But i want the
>> FileDialog like the Browse Workspace in the EMF Plugin. I think its a
>> standard dialog, so i am asking here. This Dialog is available in the
>> new EMF Project wizard. It is like a tree only with the workspace as
>> content.
>>
>> Greetings
>> Jörg
>>
>>
>> Code:
>>
>> FileDialog fd = new FileDialog(getViewSite().getShell(), SWT.OPEN);
>> fd.setText("Open");
>> fd.setFilterPath(Platform.getLocation().toOSString());
>> String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
>> fd.setFilterExtensions(filterExt);
>> String selected = fd.open();
>> System.out.println(selected);
Previous Topic:[Viewers] Re: Widgets and style bits
Next Topic:Run in background when idle ?
Goto Forum:
  


Current Time: Fri Jul 05 02:24:49 GMT 2024

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

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

Back to the top