As the title says, how?
I have looked around the internet and found a bunch of answers saying to go to
Settings|Code|Code completion
but it seems that settings category is gone in version 14 of IntelliJ, which is the one I am using. The reason that it's off in the first place is because the teacher in my Java course has made his own custom code inspection .JAR-file, which when I installed it, turned my automatic code completion off. I have changed that profile back to the default one in every category of the settings that I have found so far, without results. Please help!
Check this option.
If it is not worked, check "keymap" option.
Maybe key was using for other action.
Related
After a long period of creating apps with Android Studio I returned to Eclipse to program a pure Java application. Of course, I have noticed large differences in terms of auto completion between IntelliJ IDEA and Eclipse but IntelliJ is no alternative for me because of various reasons.
That is why I started to change the settings in Eclipse, inter alia, for the content assist. I want to have suggestions for variable names too, without having to write a dot first. As you can see in this image, I have changed the auto activation triggers to ._#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ as suggested in another thread on Stack Overflow.
The problem is, if I write short variable names like d it completes them automatically to something different (in this case DEFAULT_CURSOR) when I press the dot key. To avoid this, I have to choose the variable first, before pressing the dot key.
However, having to do it this way is a large waste of time. Is there a possibility to use the suggested variables or methods only when I have pressed the enter key, just like in IntelliJ?
Maybe there is an option to bind the dot key to the closing of the content assist?
No, Eclipse and IntelliJ are different and IntelliJ's level of auto completion is unique to itself. If you are comfortable with it, you should use it and then copy and paste to eclipse for windowbuilder. Also FYI there is a free alternative to windowbuilder for IntelliJ, you can read about it here: WindowBuilder equivalent for IntelliJ?
so I just downloaded eclipse and it came with a basic hello world program, and the auto complete works on this. It will work with the auto trigger "." and by using ctrl+space, and it shows all the suggestions you would expect. When I started my own project though, the auto correct must be called to work and there are not any suggestions in the auto complete drop down box. Does anyone know what could cause this????
2 things come to mind.
1) make sure setting in the preferences page under Java -> editor -> Content Assist is enabled. and that the delay is short.
2) check your build libraries and path are correct. it may be having trouble finding any methods that you can use.
I'm a huge fan off Eclipse hotkeys, Ctrl+Shift+G being one of my favorite. However, I recently had to completely toss out my workspace and load a new one to switch to a new branch after some merge-cause had occured. Either that, or a later checkin which messed with some classpath files, seems to have broken my ability to search using Ctrl+Shift+G. I now always find nothing.
I have multiple maven projects which all link to each other, and I thought the issue originally was with maven. However, I can't even find methods in the same project, or even the exact same file, using Ctrl+Shift+G now.
Can anyone suggest the process I take to make my eclipse aware of my source code such that it can properly search it?
EDIT:
I don't know how I missed this previously. It seems that eclipse is throwing a class-not-found exception looking for the class
org.eclipse.wb.internal.core.utils.dbt.core.project utils
Before this exception is thrown I can do search as normal, after this exception the search breaks. So the issue is actually the exception i'm sure. A reboot does fix things temporarily, Unfortunately, the exception keeps getting thrown after I use eclipse for awhile. So now I'm looking into the cause of the exception. I may post an answer here and/or open a new question depending on how much luck I have researching the cause of the exception on my own.
Open the Preferences dialog. (On Windows, choose the menu item Window>Preferences).
Choose the preferences page General>Keys.
Navigate down to the command References in Workspace. Select it. If the displayed binding is not Ctrl+Shift+G, you can set it by:
Pressing the desired key combination Ctrl+Shift+G.
Pressing the Apply or OK button.
Just an update on this issue. Once I realized the exception was the cause of my issue I researched it on Stack Overflow. I found another question that addressed the issue, though I'm afraid I don't have the link now. The suggested answer though was to start Eclipse with the --clean option. The issue appears to have gone away as soon as I did this.
I have upvoated both the other answers as thank-you for you responses. They were good answers given the information I original provided, it was my fault I wasn't aware of the full issue when I posted the question.
i believe maybe your hotkey was unprogramed somehow, try readding it
Window -> Preferences -> General -> Keys
Mac: Eclipse -> Preferences -> General -> Keys
Hope this helps
When I press Ctrl-S to save my Java file in Eclipse it's jumping to the function name. This is very annoying. Someone know what to do about this?
Go to Window->Preferences->General->Keys (you can also search for Keys in the main Preferences window). You most likely have added a binding which makes eclipse jump to the function name when you press ctrl+s.
Another place to look is Window->Preferences->Java->Code Style->Clean Up and Window->Preferences->Java->Editor->Save Actions. That is where all actions are defined which happen when you save/clean up a document.
Try looking at your keyboard bindings. I certainly don't have this problem on either of my Eclipse installs. You might have Ctrl-S assigned to two different actions?
This was really annoying problem for me also.
Solved it by going to Preferences->General->Workspace and unchecking "Refresh on access" checkbox.
I had a similar problem with Ctrl+C malfunctioning in Eclipse.
Here is a similar question regarding it.
Maybe try upgrading to the latest version if the above solutions do not work.
Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable's value. Instead, hover behaves as if I were in normal Java perspective:
alt text http://michaelzanussi.com/wp-content/uploads/2009/11/debug_hover.png
I've tried cleaning the project, re-importing it, etc., all to no avail. Anything I'm missing here?
I went to Window - Preferences - Java - Editor - Hovers, hit "Restore Defaults" and "Apply" and that fixed it for me, even though nothing actually changed in the settings...
Go to Window - Preferences - Java - Editor - Hovers.
Is "Combined Hover" selected? Uncheck it; apply; close the window; restart debugging session; go back; check it again; apply.
If the above doesn't help, you can check "Variable Values" option and specify a modifier key for it. Not as convenient as "combined", but should work.
I had this problem too once, I "just" had to restart eclipse, after that the hover mechanism worked again.
The problem was "fixed" by renaming the package.
For whatever reason, this refactoring triggered something in Eclipse, and immediately I was able to view variable values during debugging. Also, when I go back into Preferences under Hovers, I can now see the "Variable Values" option.
I had a similar issue and when I came across this question. My problem was that windows hover time was set to 20s or so (you can test if this is your problem by putting the mouse on a mistake and waiting for a min or so). The registry key "MouseHoverTime" was set to a large value of 200000 ms (normally 400). Fix it by going to start -> run -> "regedit" -> HKEY_CURRENT_USER\Control Panel\Mouse double click "MouseHoverTime" and setting it back to 400.
I think this had been done on my computer a while back to prevent hover popups in another program. Anyway, sorry that my answer doesn't directly apply to this question, but I'm hoping it'll help somebody like me that comes across this thread with a similar issue.
For C++ project, please add -ggdb -0g to the compiler option. Hope this solution can help eveyry C++ programer face with the same issue.