Change or switch to different editor quickly in eclipse ? ( not tabs) - eclipse

Hi i many html editors in eclipse. each one provides different features.
Is there a way i can quickly switch the editor of current opened tab, ( other than open with option in the project explorer).
Lets say abc.html is currently open. but i want to open it in different editor. Now i have to search that file in the project explorer and then right click > open with. option.
OR
I use ctrl+shift+r to open any resource , it always opens in default editor. But i want to choose there which editor to open with" option there. :(. is there any shortcut for that?

I can well understand wanting to open stuff just using the keyboard.
I can think of 2 solutions:
1: CTRL + SHIFT + R (select file as normal) then (still in the Open Resource dialog) TAB, TAB, ENTER and then press the down arrow key until you get the right editor
2: Keep the Project Explorer 'Link with Editor' toggle on (a button on the top right of the Project Explorer View)
Now you can easily get from the file open in the editor to the correct place in the Project Explorer view (so you can right click on it).
Hope this helps!
(I also find CTRL + F7 a useful way of switching to the Project Explorer view from an editor)

Related

VS Code editor, unlinking explorer pane and editor tabs

When I click on an editor tab the focus in the explorer pane shifts to the file in question. This seems pointless to me. Can I stop this from happening? Obviously I want to continue being able to click on a file in the explorer pane and for the relevant tab to open or come up in the editor.
You may be wondering why I want this. It's because one of my open files is way down the explorer pane list and the files I want to see in the pane are up at the top of the list.

What is the IntelliJ equivalent from Eclipse, show file in the package explorer view

I am more familiar in Eclipse and need the IntelliJ equivalent. In Eclipse, I could open a java class, right click, show file in package explorer and it would highlight the file on the left. What is the IntelliJ equivalent.
You can highlight a file you have open in the editor in a number of views using the Select In...menu that can be opened using ALT-F1 when the editor window has the cursor.
The most usual ones (Project/Packages) are found under the menu opened by ALT-F1 and then right arrow.
You can also double click the circle/cross button ontop of the Project view
it will show you the current active file in the project structure
You can turn on Autoscroll from source in Project Tool Window so that the file/class to the left is scrolled to as soon as you open a file for edit.
If this option is on, IntelliJ IDEA automatically navigates from a file in the editor to the corresponding node (file, class, field, method, etc.) in the Project tool window.
Note that selecting this option makes the Scroll to Source button unavailable.
It is called "select in project view".
You'd better edit your keymap ! (alt+F1 right arrow is not very efficient...)
file > settings > keymap > select in project view : alt+E for example
You can press Alt-Home, it goes to the navigation bar.
Go to or select the package by pressing left arrow.
Press F4 now to see it in the project view.

How do I show an open file in eclipse Package Explorer?

When a file (.java for example) is open in Eclipse, how do I get the Package Explorer to show the file that I am working on?
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.
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).
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.
There is a double arrow icon at the top of the Package Explorer that toggles this behaviour. click on It
In your Eclipse .java file editor, right-click anywhere, then "Show In-> Package Explorer".
As shown:
As you can see, you can also open file in Navigator, Outline and so on with this.
Above project 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 .

How to open the 'Projects' panel in Netbeans

In Netbeans, to the top left of where the code is, there used to be two panels, one called 'Projects' where you could click a project name to open a tree of all the directories and files in it, and you could double click a file to edit it.
Below it is the navigation panel which shows the class names, methods, etc contained in the file you're viewing.
I accidently clicked the close button on the projects panel and can't figure out how to get it to open again, any ideas?
In Netbeans 6.8 on Windows, going to Window -> Projects brings it back for me. CTRL + 1 works as the shortcut.
Click Window > Reset Windows will give you back the old state of all windows!
just go to Window in menu bar and select Projects
Window -> Projects
In NetBeans 8.2 Go to Window->Navigator in menu bar or press Ctrl+7 and select Projects
it will open a folder as work space .

Eclipse: Files opened by multiple searches using same editor tab

When using the "file search" function in eclipse to find a bit of text in a ".java" file, I may get a list of several search results. Let's say I double click on the file "A.java" which then opens A.java in a new editor tab. If I then use the "file search" function again to find some other bit of text and this time double click on the file "B.java", this file will replace "A.java" in the editor.
I'd like Eclipse to open a new editor for B.java so that both A.java and B.java are available in my editor tabs. Is this possible? I've had a look around in the preferences but I'm not sure what option would give me this bit of functionality.
Disable the option
Preferences > General > Search > Reuse editors to show matches
Above is the best answer. But since I don't always want to open the search result in a new tab I usually use something like this.
right click on the result -> Show In -> Package Explorer ->(file is now automatically selected)->Press 'Enter'
More simply
Select the result -> alt + shift + w -> Package Explorer -> press 'Enter' twice