Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Dialog to open files in workspace
Dialog to open files in workspace [message #502777] Wed, 09 December 2009 11:42 Go to next message
Vsevolod Sandomirskiy is currently offline Vsevolod Sandomirskiy
Messages: 21
Registered: July 2009
Junior Member
org.eclipse.ui.dialogs.SaveAsDialog provides file selection in the
workspace. Is there a similar OpenDialog? I couldn't find one.
org.eclipse.swt.widgets.FileDialog shows the whole filesystem, not the
workspace.

I could use ElementTreeSelectionDialog with WorkbenchContentProvider,
but there must be an easier way.

Thanks.
Re: Dialog to open files in workspace [message #502798 is a reply to message #502777] Wed, 09 December 2009 12:27 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
On 09/12/09 10:12 PM, Vsevolod Sandomirskiy wrote:
> org.eclipse.ui.dialogs.SaveAsDialog provides file selection in the
> workspace. Is there a similar OpenDialog? I couldn't find one.
> org.eclipse.swt.widgets.FileDialog shows the whole filesystem, not the
> workspace.
>
> I could use ElementTreeSelectionDialog with WorkbenchContentProvider,
> but there must be an easier way.

Open Resource Dialog (Ctrl+Shift+R) is what you looking for?


- Prakash
Platform UI Team, IBM

Blog <http://blog.eclipse-tips.com>
Twitter <http://www.twitter.com/Eclipse_Tips>
Re: Dialog to open files in workspace [message #502995 is a reply to message #502777] Thu, 10 December 2009 09:35 Go to previous message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2108
Registered: July 2009
Senior Member
On 12/9/09 11:42 AM, Vsevolod Sandomirskiy wrote:
> org.eclipse.ui.dialogs.SaveAsDialog provides file selection in the
> workspace. Is there a similar OpenDialog? I couldn't find one.
> org.eclipse.swt.widgets.FileDialog shows the whole filesystem, not the
> workspace.
>
> I could use ElementTreeSelectionDialog with WorkbenchContentProvider,
> but there must be an easier way.

That route is actually pretty simple. Here is an example to give you a
head-start (note, this code is licensed under GPL 3):
< http://www.skywayperspectives.org/fisheye/browse/CVS_OpenSou rce/skyway/common/plugins/org.skyway.core.ui/src/org/skyway/ core/ui/dialogs/ProjectFileSelectionDialog.java>

Hope this helps,
Eric
Previous Topic:new version cvs do not update recursively
Next Topic:ViewerCell.getColumnIndex() Returns Different Values When Detached
Goto Forum:
  


Current Time: Mon Apr 21 00:43:33 EDT 2014

Powered by FUDForum. Page generated in 0.02640 seconds