| FileDialog Tree (Browse Workspace) [message #325198] | 
Tue, 12 February 2008 09:33   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 11:51   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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);
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.03735 seconds