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.
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?
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.
I am using eclipse for Java ee. One thing I noticed is in the computer in my office, eclipse auto complete is working even though I didn't finish writing the full name of the method.
For example: as soon as I write
getSer
It suggests me the
getServletContex
However at home the suggestion only appear when I am done with the method name and enter "."
At the office I am using Helios and at home Juno.
Anyone knows how to make the other eclipse to auto complete before I finish the name of the method?
Go to Preferences>java>Editor>Content Assist and configure your settings.
The IDE only suggests these auto-complete sometimes. Use CTRL+space to call it yourself.
I am very new to Eclipse, java programming and well all "programming" in general and I have recently been learning how to use Eclipse. I've been using it for about a week now and it has been going decent so far. Apart from some errors,(mostly on my part) that has been fixable by restarting the program itself.
However when I started using it today I could no longer see the suggestions made from the Quick Fix command, for example if I type findVi and then press CTRL+1, it shows "No suggestions available" instead of "findViewById()" or something similar.
I know it's the correct binding, I even reset the keys to default to be sure. It still finds the ID if i type it manually but I would like to able to finish words faster that way.
If you guys got any suggestions that can help me out, please let me know.
Thanks.
- First of all if you are new with Java, and want to practice Java, you should NEVER USE ANY IDE, that way you learn the proper syntax, and it helps your error finding skills.
- But as you wrote "findViewById()" it seems that you are doing Android, Now this happens sometimes that Eclipse behaves weirdly with Android. Thats the reason when you make any changes into your Eclipse GUI while working with Android, its always better to see if those changes have taken effect.
- This problem usually goes off after closing and re-opening the Eclipse once or twice.
- Ok try this....
Type findVie then press Ctrl + Space-Bar See if the suggestion pops up...
You can access the Content Assist preferences from Window > Preferences > Java > Editor > Content Assist... perhaps something got messed up.
I've started up with developing Java.
However, These days I've started iPhone project and gave me lazy writing code;auto code generate functionality in xCode.
Are there any non-pay free edition add-on exist that does similar to xCode?
I mean, I do know Eclipse already has partial auto method look up when you put '.' (dot) token after class name which shows the list of methods.
thank you all.
The functionality is called content assist in Eclipse. It comes as default.
To trigger content assist, normally you have to click Ctrl+Space (Windows/Linux). But as you said, on Java it will be auto-activated when user press ..
You can however change this behavior. Go to Preferences -> Java -> Editor -> Content Assist and change the Auto activation triggers for Java.
For example to get the behavior of xCode, you could change it to ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.
It comes by default with eclipse.
You need to press . then ctrl + spacebar
If ctrl + space doesn't work, you may try Alt + /
I used to think the autocompletion was slow, but it turns out you can make it instant. Go to Window / Preferences / Java / Editor / Content Assist / Auto-Activation and decrease Auto activation delay to zero.
I've been using Code Recommends. This is a very useful Eclipse plugin you must have.
One of my most favorite functionality is
Subwords Completion (you don't need to remember exactly the first letter of method's name, just type in other whatever letter you remember even they're inside).
It also offers many other functionality that may meet your need.