there is a button in the package explorer view that looks like two yellow arrows pointed at left and right. the tooltip is "link with editor". click that.
explorer window you will see the below image in the red circle , just clicked on this one mean when clicked any file in the project will showing you in project explorer.
if you want to show only one file you can
1 - click right on the file .
2 - select show-in .
3 - select show in project explorer .
4 - done.
the below image explain more about it .
in your eclipse .java file editor, right-click anywhere, then "show in-> package explorer".
as you can see, you can also open file in navigator, outline and so on with this.
from this site:
how to use show in functionality from the popup menu
press alt+shift+w while you’re in an editor. this pops up a menu with a number of choices. the choices will vary depending on what plugins you have installed. select the option you want and press enter.
the fastest way to select an option is to use the first letter of the option, eg. to go to the package explorer, press p (you may have to do this 2 or 3 times depending on how many other options start with p). the press enter. you could also use the arrow keys.
invoke "show in" faster with a keyboard shortcut
if you frequently use one of the options (eg. package explorer), you can map a single keyboard shortcut to invoke it.
- go to windows > preferences > general > keys.
- search for show in. eclipse will list a number of show in options. in our case we want show in (show in target id: package explorer).
- select the command you want, enter a key in binding and you’re done.
always link active source file with package explorer
if you like this feature, you can open the package editor and click on the double yellow arrows to always show the currently selected source file in the package explorer.
i've found that constantly syncing package explorer with editor causes package explorer view eventually to grow too long, especially with large projects. i've instead mapped a keyboard shortcut to sync package explorer with the editor. if you are using mylyn this is of course a smaller problem.
key mappings are available at window ⟶ preferences ⟶ general ⟶ keys ⟶ show in (show in target id: package explorer). mine is ctrl+alt+⟵, be welcome to copy.
in luna command name has changed a little. instead of
show in (show in target id: package explorer) command is now
show in (package explorer).
- How do I show an open file in eclipse Package Explorer?
- How to prevent Eclipse from showing the opened file in package explorer
- How to show maven artifact version in eclipse Package Explorer
- eclipse how to show package explorer in debug perspective
- How to open a project in Package Explorer for Eclipse
- How do you get the Eclipse Package Explorer to show files whose names begins with a . (period)?
- How to get selected file in Package Explorer from Eclipse
- How to remove file system folders from eclipse package explorer view?
- How to open folder of a file not in the project explorer in Eclipse IDE?
- Eclipse does not show error icon in package explorer if xml file is not well formed
- How to view hierarchical package structure in Eclipse package explorer
- Why does Eclipse Java Package Explorer show question mark on some classes?
- How to open windows explorer on selected resource in Eclipse
- What is the IntelliJ equivalent from Eclipse, show file in the package explorer view
- How to create a child package inside a package in eclipse project explorer
- Eclipse package explorer have different icons for each file type: interfaces, abstract classes, etc
- How do you open an external Vim editor containing the active Eclipse editor file
- Eclipse Package Explorer '>' Symbol Before File Names
- How to open a file in Eclipse AND jump to a specific line?
- Eclipse won't show files in package explorer
- How to get the selected node in the package explorer from an Eclipse plugin
- How to open a .launch file in Eclipse
- Show a file in Eclipse in Windows explorer
- how to get eclipse show a folder from file system
- How to open a vcproj file from Eclipse CDT?
- How to add a submenu entry to Eclipse Package Explorer context menu item using org.eclipse.ui.menus?
- How to open a file twice using Eclipse ?
- eclipse plugin how to open file in IDE by code
- How to programmatically select nodes in Package Explorer in Eclipse plugin
- How to show the package explorer in eclipse?
More Query from same tag
- Eclipse: How to disable '!=' token replacement
- java.lang.LinkageError: Error reading class bytes: org.eclipse.e4.ui.model.application.ui.menu.impl.MenuImpl
- Is Eclipse 3.4 (Ganymede) memory usage significantly higher than 3.2?
- Where can I get ADT 0.9.6 for Eclipse 3.5?
- Android - How can I find out where the current thread was created?
- Eclipse Luna Unable to Save Preferences
- how to get the complete "java -cp yyyx com.yyy.class" command issued internally by eclipse?
- Is there a way to find all the locations of implicit type conversions in Eclipse?
- unable to launch Android SDK Manager from eclipse
- Java - sending POST
- Git-replace with HEAD(eclipse) by mistake
- Print to file used jars in an eclipse maven project
- Git Branching in Eclipse
- Eclipse TFS Error when double-clicking file - org.eclipse.ui.PartInitException: Unable to open external editor
- Error Displaying Point on Maps
- Unable to see Glassfish logs in eclipse console
- Maven/Eclipse plugin: easiest way to have new Maven project have dependency on legacy non-Maven project?
- Difference Between Zend Php/Zend server and simple php/Wamp server
- web.xml and pom.xml documentation
- Can't use C library (function)
- Print the sourcecode of a whole java project
- Adding project dependency to web project in Eclipse
- Custom Framework for Writing a Test that Reads a CSV File into a HashMap
- Building workspace(sleeping)
- Why jars added to Deployment Assembly do not show up in Project Explorer (Eclipse Photon) under WebContent/WEB-INF/lib folder?
- why Google play services is not found?
- Unable to see server location while installing apache in eclipse
- eclipse IDE run error read /.metadata/.log
- eclipse: changing the # of spaces to indent/unindent
- Why a "right click->Run as" on any project name in eclipse does not gives normal options sometime?