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.
Related
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.
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)
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.
I'm using Eclipse Kepler 4.3 with the latest Grails plugin (nightly version).
It is very unconfortable the autocomplete tool as it gets the first item when we click the Space key or the . key. For example, if we type:
params.property1...
Eclipse will actually write:
ParamsAction.property1...
How could we get the suggested item only if we press Enter?
My solution so far is to activate the autocomplete tool only if I press Alt + Space. It could be done here:
Windows - Preferences - Java - Editor - Content Assist > Uncheck:
Enable auto activation
I know this is an old question, but for anyone that might be still having this question: Windows -> Preferences -> Java -> Editor -> Content Assist: check -Disable insertion triggers except 'Enter'. This won't disable auto-activation, so you'll still get suggestions.
As long as i know, the best solution for this would be:
Windows - Preferences - Java - Editor - Content Assist > Uncheck:
Enable auto activation
I'm looking for a configuration or plugin for eclipse that automatically saves files (so I don't have to use Ctrl+S). It could do it on lost focus or over some period of time. I think I saw something like that (I know IDEA has it), but I cant find it now.
Update seven years later (Eclipse Neon 4.6)
Eclipse now has an Automatic Save of dirty editors
The autosave option is disabled by default.
A new autosave preference page (Preferences > General > Editors > Autosave) is available and allows to enable/disable the autosave and change the interval of autosave.
The countdown is reset on keyboard activity, mouse click, or when a popup is displayed (e.g. content assist, preference page, ...).
Original answer (2009)
The OP IAdapter added in the comments:
I bet plugin like I describe exists.
... and you are right!
Eclipse plugin saveDirtyEditor should do just what you need.
Copy the SaveDirtyEditors_1.0.2.jar in your plugin directory.
You will get a new preference page under
General > Editors > Text Editors > Save Dirty Editors
, allowing you to save dirty files like 'myfile.java' under 'myfile.java.snapshot' every 30 seconds (can be less if you want).
Without additional plugin, though, Eclipse does not support natively that feature.
The closest could be:
Window > Preferences > type "build"
> General > Workspace > [x] Save automatically before build
That way, each time you hit CTRL+B for actually building your sources, they would be saved.
But I realize this is not exactly what you are after.
Beware your option would not be very efficient with the "build automatically" option activated... (that would trigger too much builds)
Again, without achieving exactly what you are looking for, you also have:
Run/Debug > Launching > Save required dirty editors before launching
Run/Debug > Launching > [x] Build (if required) before launching
Note: the difference between IntelliJ IDEA and eclipse is the "compile on save" feature:
As mentioned in the IDEA FAQ:
Q:
Can I enable "compile on save" in IntelliJ IDEA?
IntelliJ IDEA currently doesn't support this feature.
However there is an "Eclipse-mode" plug-in which provides similar functionality, so we suggest you to try this plug-in.
Note that by default IntelliJ IDEA saves the files for you, so you don't have to press the Ctrl+S shortcut frequently like you need to do in other IDEs.
However, with Eclipse, the "build on save" is activated by default, hence the absence of that particular feature.
http://code.google.com/p/eclatosa/
"Saves all open editors in eclipse when deactivating the eclipse window (like in IntelliJ)"
No need to install more plugin.
Window -> Preferences -> General -> Workspace
and there you can check:
Save automatically before build + Build automatically
If that doesn't work try this:
Preferences -> Run/Debug -> Launching -> Save dirty editors before launching
I wrote a plugin a long time ago to do this that still seems to work: http://www.stateofflow.com/projects/71/save-me
It saves the editor when it loses focus. However, if you switch away from eclipse it doesn't notice.
Try this
Goto Eclipse Preferences > General > Editors > Autosave
if it not work then try this
Preferences -> Run/Debug -> Launching -> Save dirty editors before launching