I used to press Ctrl + 1 in Eclipse (4.3) to access refactorings such as "assign statement to local variable".
Unfortunately this refactoring is not offered anymore. When I press Ctrl + 1, the only proposition I see is "rename in file".
I went in Preferences > Editor to try to find some bad configuration but couldn't find anything.
Did I break something?
edit:
- The file a is Java file, in a Java project, opened in the Java editor.
This is an alternate solution. I'm not sure whether it will solve your problem but you may try using the following configuration:
Window --> Preferences --> Java (select your programming language) --> Editor --> Light bulb for quick assists.
Mark this option as checked & then click on OK.
After doing this, you should be able to see a light bulb on the current line. Clicking on this bulb should give you the same options as you get by Ctrl + 1.
I had the same experience. Eclipse Version: 2019-12 (4.14.0), it is build automatically. I unchecked this in order to speed up eclipse, then I noticed the quick fix only has "rename in this file" left. After I had build automatically back, the quick fix works like a fancy.
I had the exact same problem.
The solution for me was to reinstall some plugins from the Marketplace. The Darkest Dark Theme from DevStyle was the issue. (don't ask me why)
Related
A few years ago i set up my first Eclipse IDE env at work to begin studying the language. As i remember, it was some Luna build and it had a specific and really addictive code completion, which understood skipping some letters... like "p l n" would find "println".
Now i'w installed Mars build(the Luna's one has gone with the past harddrive), and cant find this option. Some code completion works, but it looks only by the current character.
Could someone tell me where to look.
Eclipse does understand skipping some letters in code complete, for example, if I have:
System.out.pln
with my cursor after the n and I press Ctrl+Space I am presented with all the println choices:
If it is not working for you I suspect that you don't have Code Recommenders installed or enabled. It should come by default with Eclipse IDE for Java Developers.
To check to see if it is installed and enabled, in Preferences, choose Java -> Editor -> Code Assist -> Advanced and see if Java Proposals (Code Recommenders) is listed and checked:
If it is not installed, install it from the Mars update site:
From Help menu, choose Install New Software
Choose Work With: as Mars - http://download.eclipse.org/releases/mars . from the drop-down list.
Choose Code Recommenders for Java Developers from the list. You may need to uncheck Group items by category to find it.
Complete the wizard, restart, check setting about and away you go.
In Eclipse just press ctrl + space bar. to auto code completion
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.
My problem is that the content assist window won't pop up after clicking Ctrl + Space. I checked my shortcuts and the content assist is bound to Ctrl + Space. Sometimes the window automatically pops up making suggestion after typing dot e.g., but this won't happen when using the keys combination.
Eclipse version:
Eclipse Java EE IDE for Web Developers.
Version: Kepler Service Release 1 Build id: 20130919-0819
My OS is Ubuntu 12.04 if that matters.
In my case;
Window>Preferences>Java>Editor>Content Assist>Advanced
Make sure Select the proposal>Template Proposals,SWT Template Proposals,Java Proposals ,Content assist cycling>Template Proposals,SWT Template Proposals,Java Proposals is ticked.
Go to Windows > Preferences > Java > Editor > Content Assist > Advanced > select all Java only. If you select all, then multiple occurrence of same instance would be shown in Suggestion list. which might be annoying some times.
I managed to fix it finally. The problem was that the ibus was overriding the shortcut so I deleted this shortcut configuration.
Type ibus in the dash:
Then select Keyboard Input Methods. From there click on the first three dots next to the Enable or disable textfield. This windows should appear:
If there is something bound to Ctrl + Space simply delete it.
For that Go to
Eclipse --> Windows --> Preferences --> Java --> Editor --> Content Assist --> Advanced --> select all Java & Java Type Proposals.
and check mark : Java Proposals(Code Recommenders)
To enable Ctrl+Space.
Go to Control Panel --> Region and Language --> select Keyboard and Languages tab --> Change Keyboard button --> select General tab --> Under Installed Services --> Remove all languages except English(United States). click apply and ok.
Eclipse --> Windows --> Preferences --> Java --> Editor --> Content Assist --> Advanced --> select all Java & Java Type Proposals.
Eclipse --> Windows --> Preferences --> General keys --> Type Content Assist in right side search box --> Select command Content Assist --> click on Restore To Default --> Apply --> ok
Now you are ready to use ctrl + space feature for content assist.
Earlier I was also facing the same issue : I just followed below steps :
Go to Windows --> Preferences --> Java --> Editor --> Content Assist --> Advanced --> select all Java & Java Type Proposals.
Click on Apply and close it.
Restart the eclipse.
For mac:
By default ˆ+space is assigned for switching inputs of the keyboard.
You can deselect that option by going to
System preference > Keyboard > Shortcuts > Input Sources
check for shortcut that using your key and disable it
It happened to me also,
What I have done is change the workspace folder to
Another folder and problem solved!
Ctrl+space was not working in my eclipse.Somehow it got disabled.
I have tried many options and didnt worked any options.
Finally this was work out
Go to Preferences > Java > Editor > Content Assist > The "Auto activation triggers for Java:" field.
Paste "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz." (note the dot after z) .This is the best solution and no need to even press ctrl+space.
This issue happened to me and none of the stack solutions seemed to resolve it. I finally figured that some other windows task was stealing my hotkey press. If nothing else works, I recommend that you downloaded a free software 'Windows Hotkey Explorer' that reported the registered hotkeys.
In my particular situation, I found ctrl+space was seized by 'blackboard collaborate' (a unpalatable java application for webcasts used by some of my courses).
I closed Eclipse killed all java processes (which included blackboard). Restarted eclipse and my autocomplete was back!
(Note: Hotkey Explorer was incredibly buggy and crashed every time I used it. I was able to get the information I needed before it crashed though so it was useful. Another (shareware) application that I didn't use but noticed online is: Hotkey Commander.
Though I have eclipse proposal settings configured properly it was not working for me. In my case Ctrl+space key combination was hijacked by another background running process (I was running AllwaysOnTop utility for windows). it worked after exit that process. :)
I was facing the same issue. If you use OS X Eclipse Ctrl+Space shortcut can be interfering with OS X system's "Selecting previous input source" using Ctrl+Space shortcut as default.
It is necessary to edit System Preferencies/Keyboard/Shortcuts/Input Source and uncheck the "Selecting previous input source" or change the shortcut on something else. Eclipse should work after that even without restart.
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/
Every time I start Eclipse and press Ctrl + Space I get the following 3 warning popups.
http://imgur.com/a/2pKdm
They are only appearing the first time I press Ctrl + Space.
I get these warnings since i reinstalled the jdk.
I already tried to re-install eclipse, but as soon as I import my old projects the warnings seems to reappear. I currently have the following java versions installed:
JVE 7_u7 32bit;
JVE 7_u7 64bit;
JDK 7_u7 64bit;
JDK 7_u7 32bit.
I added all of them in the PATH variable in the same order as listed above.
I also have eclipse set to use the JDK 7_u7 64bit (btw I'm using eclipse 64bit).
I hope somebody knows a solution for my problem and excuse me for my bad english, I am not an native English speaker. ;)
You can resolve this issue by turning off Subwords-Completion in:
Window > Preferences > Code Recommenders > Completions: ==> incheck(Subwords-Completion)
I got the similar type of warning is eclipse spring tool suite(sts) .I unchecked CodeRecommendors Proposals(addons) which is present 2 times in the above list and below list and it worked.To do it go to window-->preferences-->java-->editor-->Content Assist-->advanced.see the screenshot.
You can configure content assist and disable the triggers in content assist. This link provides information on setting content assist preference.
I would like to share my experience for those who have this problem in the future. If you changed the theme of your editor recently, first change it back to the classic theme and then restart Eclipse. Then switch back to the theme(maybe dark theme) you want to use and restart Eclipse again. This is how my problem was solved.