How to link opened file with project tree in NetBeans
Asked Answered
C

4

30

I feel dumb asking this question, but I can't find solution to this myself.

When I open several files in editor and switch between them, I have problem finding currently opened file in project or files tree.

I used Eclipse before and every time I changed a tab with file, the project tree set focus for the same file. Is there a way to do something like this in NetBeans?

Consanguineous answered 26/2, 2009 at 12:16 Comment(0)
A
18

from http://forums.netbeans.org/topic3732.html :

You can do this from the navigate menu, I believe. There are entries for going to the file in the project tab or the file tab. I didn't see an option that allows you to do this automatically, like there is in Eclipse, but this menu entry allows you to do it upon request.

[edit]: also working: in the file > right mouse button > select in > projects | files | classes | favourites

[edit 2]: http://forums.netbeans.org/topic8420.html : This feature is not available till NetBeans IDE 6.5. This feature is added in the new version and may be available in NetBeans IDE 7.0M1 and after and you can find it in the View Menu.

Answer answered 26/2, 2009 at 12:43 Comment(0)
R
33

Just thought of adding what ax said:

The keyboard shortcuts in Windows are:

  • Select in Projects : Ctrl+Shift+1
  • Select in Files : Ctrl+Shift+2

The keyboard shortcuts in OS X are:

  • Select in Projects : CMD+Shift+1
  • Select in Files : CMD+Shift+2
Ripp answered 30/5, 2009 at 19:46 Comment(2)
Yeah, the keyboard shortcuts are more "the answer" than the menus, though both are helpful.Ingathering
This should be accepted answer. Curently accepted answer state that there is no way to do it automaticaly which is not true as we see in the above. Ps. shortcuts are working as expectedContemptible
A
25

As described in NetBeans "link with editor" feature, if you want the link to be permanent or persistent, use View | Synchronize Editor with Views. (In NetBeans >= 6.7.1, at least.)

Adrien answered 19/8, 2009 at 10:31 Comment(1)
Don't have this option in my NB6.5Brocklin
A
18

from http://forums.netbeans.org/topic3732.html :

You can do this from the navigate menu, I believe. There are entries for going to the file in the project tab or the file tab. I didn't see an option that allows you to do this automatically, like there is in Eclipse, but this menu entry allows you to do it upon request.

[edit]: also working: in the file > right mouse button > select in > projects | files | classes | favourites

[edit 2]: http://forums.netbeans.org/topic8420.html : This feature is not available till NetBeans IDE 6.5. This feature is added in the new version and may be available in NetBeans IDE 7.0M1 and after and you can find it in the View Menu.

Answer answered 26/2, 2009 at 12:43 Comment(0)
I
1

Navigate->Select in Files or Projects

Isobelisocheim answered 2/9, 2020 at 14:21 Comment(1)
yeah, for some reason in my case in the newer versions of NetBeans the Ctrl+Shift+1/2 shortcuts have no effect anymore - maybe this has something to do with global Windows shortcuts overriding the NetBeans? I am using the ZIP version of NetBeans with no admin rights. but Navigate -> Select in Projects works fine.Arnuad

© 2022 - 2024 — McMap. All rights reserved.