Eclipse f3 not opening declaration - eclipse

I have Eclipse (Mars) web development tools installed on a MacBook Air. Recently, hitting f3 stopped opening the declaration.
The key mapping in Eclipse (Mars) - web development tools:
In another Eclipse install (Luna) - Android development tools, where the f3 function is working, the key mapping is:
What is wrong with the Mars version? What do I need to add to get it to work in the Java editor?
I have seen this post, but I don't have the exact same issue. Nothing happens when I hit f3.
Additionally
Other short cut keys work.
Opening the declaration with the context menu does work.
But there is no key short cut listed in the context menu.
Did this key mapping change with Mars? In my Luna verion, the context menu has the key map listed:

I've the same issue. You can use "Ctrl + Left mouse click" instead.

Make sure your function lock key is not pressed. I apparently hit mine and didn't notice given that F3 is the only function key I use.
Seems stupid but this literally happened to me and the other suggestion didn't help.

In eclipse mars goto:
window
preferences
General
Keys to open the key mapping view.
type 'open declaration' in the filter text.
copy one of the commands that are already there Copy Command
Enter 'F3' in the Binding.
In the drop down menu of the combo box of 'When' select Editing
Then whatever Language You Are Using
Source
Apply
and press Ok

I had the same issue after installing Apache Directory Studio.
Go to Window->Preferences, General->Keys. Filter for F3 and you'll see all the different ways that F3 is bound. I got it to work again by disabling F3 in the LDAP windows (i.e. deleting the binding).

Some suggestions to try:
1) Try creating a new workspace, and check if F3 works
2) Try switching to a different perspective
3) Try downloading a different eclipse release, maybe the java developers release, check that F3 works, then install whatever you need for web development.
Good luck :)

Right Click on the project -> Properties -> Project Facets -> Click on the Configuration Link -> Click on Apply Button -> Click on OK button.
The above steps should set your project as a Java project.

Looking at the comparison of the preferences that work vs what does not work, the issue is clear.
Go to: Window/preferences/General/Keys to open the key mapping view.
Type 'Open declaration' in the search box
Enter 'F3' in the Binding textbox.
If you are editing for C++, Java any language, you need to have a specific F3 binding for that language!
Example for Java source code select 'Editing Java Source' in the 'When' dropbox.
Apply and press Ok

Even I faced the same issue in windows,I was using cucumber and was unable to navigate using F3. I solved by doing the following:
Click on Help in Eclipse >
Eclipse MarketPlace
type "Natural" in search and press enter
Install "Natural 0.9" plugin
Restart Eclipse
This should work, if not working even after that, uninstall cucumber plugin in Eclipse Marketplace
You will be able to navigate from Gherkins, even after this if you are finding issues do the following:
Go to Window ->Preferences, General->Keys > Click on "Restore Defaults"

I had a similar problem today - Unable to open Declarations in Java Editor using F3 or CTRL+Left Click.
Solution :
STEP1: Selected any java file in Eclipse Explorer.
STEP2: Clicked the - sign at the top of the Eclipse explorer. This compressed view of all modules in Eclipse.
STEP3: Right click on the empty space on the Eclipse Java Explorer and chose Refresh Option (F5) .
STPE4 : Happily the navigate options like F3, F2 , CTRL + Right Click all started working.

Solution :
1. Download and install this eclipse
eclipse-jee-2019-12-R-win32-x86_64
F3 shortcut key is worked for java file and Testng.xml.
i am able see package name and class name and also it navigate methods.

Related

Changing Eclipse Exit Shortcut

I'm using eclipse on Ubuntu 12.04 and Ctrl+x closes my Eclipse. I tested Ctrl+x in other applications and it cuts text, which is what I want, so it must be an eclipse shortcut binding.
I checked my Preferences>General>Keys settings and couldn't find an exit/quit/explode eclipse command and when I search for Ctrl+x I only see 'Cut' binded to that key combo.
It has been driving me crazy so any help will be appriciated, you go to cut and omg eclipse is closing lol.
I had a similar problem. Here's how to solve it:
When you open Eclipse, go to Window -> Preferences -> General -> Keys.
Search for the 'Cut' command. The Binding option should show 'Ctrl+X'. Change the When option from 'In Dialogs and Windows' to 'Editing Text'.
I checked my Eclipse environment, I don't have this problem. Ctrl+ X is for cut.
I can suggest to go where you did, and look inside the bindings column, if there is any ctrl+x and change it.
Look also for other programs you are running, maybe they listen to shortcuts.
Cheers
I had the exact same problem on Windows 8. The CTRL+x binding closed Eclipse but in the bindings dialog the only binding for CTRL+x was for the cut action. Finally, I have found the solution in the Arch Linux Wiki. See https://wiki.archlinux.org/index.php/eclipse#Ctrl.2BX_closes_Eclipse . It's a bug in Eclipse which can be solved by editing a metadata file by hand.

Why can't I type an asterisk in Eclipse?

I just upgraded Eclipse from Juno to Kepler, and suddenly I can no longer type asterisks. I have to open up a text editor, type the asterisk there, then copy-paste it into Eclipse. I can type an asterisk in Eclipse when I am using Find/Replace, but I am unable to when I am editing a python or Java file.
As shown in the image, the shortcut key shift+8 was assigned for the import command. You have to change this assignment by specifying a new one or removing it using the unbind command button.
Do the same for all the commands, click apply and then restart Eclipse.
If you'd rather not hand-edit your workbench.xmi, you can also reassign the bindings by going to Eclipse > Preferences... > General > Keys. The two culprits in this case are "Import" and "Add to Working Set". (Scan the list of search results for the ones with ⇧8 in them, then reassign or unassign them entirely.)
Close eclipse. grep your workspace for SHIFT+8; it should return matches in workbench.xmi:
workspace/.metadata/.plugins > grep -R "SHIFT+8" *
org.eclipse.e4.workbench/workbench.xmi: <bindings xmi:id="_aLHQwCaAEeOBOe4lOFe2qQ" keySequence="SHIFT+8 W" command="_eZ-6uoZrEeKW-cnY0IziBw">
org.eclipse.e4.workbench/workbench.xmi: <bindings xmi:id="_aLH30CaAEeOBOe4lOFe2qQ" keySequence="SHIFT+8 I" command="_eZucD4ZrEeKW-cnY0IziBw">
Edit the workbench.xmi file and remove the binding elements.
Restart eclipse and it should be fixed.
I had this same issue with Eclipse Photon, and fixed it by uninstalling the Eclipse SDK Test plugin. The fix was originally reported in this eclipse bug report.
Go to Help -> About Eclipse IDE -> Installation Details
Search for Eclipse * Test
Select the Eclipse SDK Tests
Uninstall
Restart Eclipse
Found a related post on Eclipse forums: http://www.eclipse.org/forums/index.php/m/1072966/?srch=asterisk#msg_1072966

Eclipse Rename - Refactor hotkey inserts registered trademark symbol

Previously, using the ALT+COMMAND+R key combination after highlighting a variable name in a Java file would go into the rename refactor mode. Now, the key combination replaces the highlighted text with a registered trademark symbol. How can I get the key combination to go into the rename refactor mode instead of inserting the symbol?
The current file encoding is set to MacRoman, which is the default setting inherited from container. As far as I know, nothing here has changed.
I am using Eclipse Indigo (Build id: 20110615-0604) on Mac OS X 10.7.5. Eclipse IDE for Java EE Developers 1.4.0.20110615-0550 and FreeMarker IDE SDK 1.1.0.v201006011046R-H111-GA are installed. I don't think there are any non-standard plugins.
The only recent change I can remember making is installing PyDev a few weeks ago. With the default PyDev installed, ALT+COMMAND+R opens a context menu in the lower right corner with 2 option: rename and set next symbol (this is in addition to replace the text with the symbol). I disabled the Set Next Symbol key binding in my preferences, restarted eclipse, and tried the key combo again. The text was still replaced by the symbol but the rename refactor mode was not entered did not open. I uninstalled PyDev, restarted eclipse, and tried the key combo again. The text was still replaced by the symbol.
Update (December, 2012): Another user on eclipse forums is having a similar issue: http://www.eclipse.org/forums/index.php?t=rview&goto=990973
Update (January, 2013): I have opened APSTUD-7664 in PyDev's Jira. Hopefully, a developer will pick it up and find a solution.
Same problem here (OS X 10.7.5, Eclipse Juno for Java, build 20120614-1722, PyDev recently installed). The following solution worked for me:
Eclipse > Preferences... > General > Keys
Choose Rename - Refactoring (Category: Refactor - Java)
Click Unbind Command
Click Binding field and type Command-Option-R
Click OK
A possible clue as to what's going on (I don't know): the User column is set to "C" before fixing the binding, and set to "U" afterward.
Ed's unbind/rebind trick didn't work for me, but changing "When" from "In Windows" to the more specific "Editing Java Source" seems to have done the trick.
I guess it's a bit more restrictive, but for my workflow Java is really the only place I'll be doing any refactoring.
If anyone is still having this issue (and it is still an issue with the most recent Eclipse Kepler when you install PyDev), this is the solution that worked for me. It's very similar to Ed's, but I had to unbind on the PyDev command specifically.
Go into Preferences > General > Keys menu:
Filter by the word "refactor" in the filter box. What you'll see is that there's a conflict ("C" in user column):
You need to sort by the highlight the Rename - Refactoring command and sort by binding. Then remove the filter. This will show all conflicts (including the PyDev one that is fouling things up)
Click the PyDev command bound to the same key combination click "Unbind Command"
Now nothing will be bound to that key combination, so just go back up to the correct command, "Rename - Refactoring" and rebind Command-Option-R to it.
When you're finished, it will show as a User defined command (U in user column), but it will work properly in both the project menu and in the code editor. The only thing that won't work is the PyDev command that was bound to it. If you want, feel free to bind that command to an alternative key combination.
I think .. the solution is full resetting. So i do as follow.
My environment is Eclipse kepller and Mac Mountain lion.
Terminate eclipse.
Copy workspace for safety. (Maybe its useless, but for safety...)
Delete .metadata hidden folder from workspace.
Start eclipse, then you see whole new workbench without projects!
Now, import existing project from your workspace folder.
That's all. Your default rename key is restored. And you have refreshed environment.
It's simple.
Have a nice development time.

Is there an IntelliJ Keymapping plugin for Eclipse?

I am an old IntelliJ user, now working on a project that requires Eclipse.
I don't mind learning the Eclipse default keyboard shortcuts where they exist, but so many operations don't have shortcuts assigned (grrrr!)
I was wondering if there is any plugin that would automatically assign the IntelliJ defaults to any action that does not already have a mapping?
As an alternative I guess I could also use a plugin that just wipes out all of the Eclipse defaults and replaces them with the IntelliJ versions.
Or do I have to just go and manually replace them all one by one :( ?
The IdeaKeyScheme plugin was just developed by one guy that wanted the same thing. Source and binary are available. I haven't tried it myself, but many people use it with great success. It seems to be the only thing out there.
If you're concerned about keyboard mappings, the Key Promoter plugin for Eclipse (known as MouseFeed) will be a big help, too. There's also an IntelliJ version. I highly recommend this plugin for productivity enhancement.
Installation and enabling IdeaKeyScheme plugin
For Eclipse: add jar file to eclipse/dropins/plugins folder.
Restart Eclipse.
Open Window → Preferences → General → Keys and select the scheme "Intellij Idea".
I wanted the same thing since I predominantly use IntelliJ IDEA. Found this on the eclipse market place and up to now it has the same keymappings.
Activate it by going to :
Window >> Preferences >> General >> Keys : change the scheme to : IntelliJ IDEA
https://marketplace.eclipse.org/content/intellij-idea-keymap-eclipse
You may add a key map as described here:
http://www.jroller.com/santhosh/entry/intellij_idea_key_scheme_for
The plugin itself is:
http://jroller.com/santhosh/resource/IdeaKeyScheme.jar
You need just to put the jar file into eclipse/plugins and restart IDE. It works on Luna just fine!
Open your eclipse software
Drag and drop Installer button from
https://marketplace.eclipse.org/content/intellij-idea-keymap-eclipse
in your always open eclipse
and that's all
It turns out that in IntelliJ, by default you can choose a keymap scheme. So you can just apply the Eclipse Shortcuts without any plugin.
Just press CTRl + `
Details here
http://zeroturnaround.com/rebellabs/getting-started-with-intellij-idea-as-an-eclipse-user/4/

Eclipse Indigo "Save Actions" are not being applied

I'm new to Eclipse and downloaded the following version:
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604
[edit] Eclipse Platform Version 3.7
I have edited Java > Editor > Save Actions to do the following: Remove trailing white spaces on all lines, Correct indentation
When I save the .java file, those actions are not applied... is this a bug?
Found this that might be related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350475
Assuming that this relates to JavaScript files, then the related Eclipse bug could be helpful.
The problem (as I've just experienced) is that you can edit the JavaScript -> Save Actions preferences via the context menu when editing a JavaScript file, but the actions will not be run.
The solution is to right click on the project containing the .js file, and select Configure -> Convert to JavaScript project.
The bad news is that this will then will also enable Eclipse's not-so-great JavaScript validation, therefore telling you that libraries such as moment.min.js are broken.
Well for those of you who have found this topic... I did find 2 solutions, no thanks to Eclipse, other than the fact that it is open source and people can write plugins.
Eclipse Platform Version 3.7
AnyEdit - plugin that does it for you when you Save file (I believe this is what eclipse SHOULD be doing)
Go to: Window > Preferences. Then under General > Keys. Make sure drop down for Scheme: is Default and enter 'remove trailing' in the filter. You should then see "Remove Trailing Whitespace" under the command column. Bind it to your own key command.
The only drawback to #2 is that you have to actually press the key binding while editing the file, kindof like a cleanup action.
Too bad Eclipse hasn't taken the approach that ALL file types should be configurable in this way... sometimes I miss TextPad.
Old question, but at least for newer Eclipse versions there's a better solution: Go to the project properties, then to Project Facets. If it tells you that your project isn't in faceted form yet, then convert it. Afterwards (or if it already was faceted), just enable the JavaScript checkbox.
I had the same issue with Eclipse 4.4 (Luna) and this fixed it for me, the save actions are now executed on save.
Adding to jlh's answer, I also had to configure the JavaScript include path of the project to enable save actions. Before that even a manual "Clean Up ..." from the source menu wouldn't work.