Skip to main content



      Home
Home » Newcomers » Newcomers » Best way to open file in same dir as currently open file
Best way to open file in same dir as currently open file [message #164813] Wed, 09 August 2006 14:25 Go to next message
Eclipse UserFriend
Very often while in Eclipse, I'm viewing a file in my project, and realize
that I want to now view another file in the same directory as that file,
but which I do not have an open tab for yet.

As far as I can tell, there is no shortcut for this sort of thing. I have
to go into the package explorer and navigate into the directory where the
file resides, and open the other file.

Although the value of Eclipse is obvious, this is a simple thing that
Emacs does very well, and Eclipse is still awkward with.

That is, unless I'm missing something.

I know about "Open File", but that seems to assume the file is not in my
project, so the file browser starts at the "root" of the filesystem, not
in my project.
Re: Best way to open file in same dir as currently open file [message #164837 is a reply to message #164813] Wed, 09 August 2006 14:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

David,

If you want to open a Java class, Open Type (Ctrl-Shift-T) is great. If
you want to open another type of file, Open Resource (Ctrl-Shift-R) works.

Hope this helps,
- Jeff

David Karr wrote:
> Very often while in Eclipse, I'm viewing a file in my project, and
> realize that I want to now view another file in the same directory as
> that file, but which I do not have an open tab for yet.
>
> As far as I can tell, there is no shortcut for this sort of thing. I
> have to go into the package explorer and navigate into the directory
> where the file resides, and open the other file.
>
> Although the value of Eclipse is obvious, this is a simple thing that
> Emacs does very well, and Eclipse is still awkward with.
>
> That is, unless I'm missing something.
>
> I know about "Open File", but that seems to assume the file is not in my
> project, so the file browser starts at the "root" of the filesystem, not
> in my project.
>
Re: Best way to open file in same dir as currently open file [message #164920 is a reply to message #164813] Thu, 10 August 2006 01:51 Go to previous messageGo to next message
Eclipse UserFriend
David,

The Package Explorer view has a very nice feature called "link with
editor". You activate this feature by clicking the "two-arrows" button
in the view's toolbar. After you activate this feature, the Package
Explporer will always highlight the file you currently editing. This
will save you the need to drill down to the file's directory and make
all other files in this directory easily accessible.

HTH,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: Best way to open file in same dir as currently open file [message #165228 is a reply to message #164837] Fri, 11 August 2006 12:00 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

Jeff Myers wrote:
> David,
>
> If you want to open a Java class, Open Type (Ctrl-Shift-T) is great. If
> you want to open another type of file, Open Resource (Ctrl-Shift-R) works.

Note that those commands are, by default, not enables in all
perspectives. For example, Open Type is not available in the Resource
Navigator perspective and Open Resource is not available in the Java or
Java Browsing perspectives.
The good news is that you can configure what commands are available in a
perspective by choosing Window > Customize Perspective (Commands tab).

Hope this helps,
Eric


>
> David Karr wrote:
>> Very often while in Eclipse, I'm viewing a file in my project, and
>> realize that I want to now view another file in the same directory as
>> that file, but which I do not have an open tab for yet.
>>
>> As far as I can tell, there is no shortcut for this sort of thing. I
>> have to go into the package explorer and navigate into the directory
>> where the file resides, and open the other file.
>>
>> Although the value of Eclipse is obvious, this is a simple thing that
>> Emacs does very well, and Eclipse is still awkward with.
>>
>> That is, unless I'm missing something.
>>
>> I know about "Open File", but that seems to assume the file is not in
>> my project, so the file browser starts at the "root" of the
>> filesystem, not in my project.
>>
Previous Topic:Adding Eclipse Newsgroup to My Google Groups
Next Topic:Applet doesn't run
Goto Forum:
  


Current Time: Sun Jun 08 07:23:08 EDT 2025

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

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

Back to the top