eclipse auto complete before finishing the full name of a method - java

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.

Related

How do I turn on auto code completion in 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.

eclipse auto complete malfunction or op. error

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.

Play! framework. create a new view

I created a new project using the play console
now, by default I got in my views directory two files:
main.scala.html
index.scala.html
I want to add a new view file. I call it "forums.scala.html"
now, I know that in order to render a view you need to do this:
views.html.forums.render("Forums");
the problem is that the intellisense doesn't recognize "forums"
but index and main it does recognize.
I've noticed those files:
class_managed/views.html/index.class
class_managed/views.html/main.class
but there is no forums.class so I suspect this is the problem.
I tried to build the project, but it didn't help.
so, what is the solution?
thanks
Your new views are compiled to managed sources after next browser hit if you are using play run for starting Play in dev mode.
If you'll use play ~run it will try to compile it as soon at it will recognize change in the file.
Finally if you started your app in production mode ie. via play start you have to stop it with ctrl+c and run again. Anyway, developing application in production mode is just a bad idea :)
Depending on your IDE most probably you'll need to refresh file structure to allow it find freshly created managed sources.
right click on ther project and click refresh, that worked for me - found it in another thread.
Found the solution.
running "compile" command did the work.
I understood that intelliJ do it auto, so I will probably use it instead of eclipse.
cheers!
If you want to program in scala, my recommendation is to forget about intellisense. Eclipses scala-ide is quite buggy, dont know about netbeans. And because of nonstandard layout of play2 application, non std development tools (play console), it becames even more handy to use simple text redactor (like sublime or textmate) with good old open-folder-as-project feature.

Motodev won't lookup methods - can it be configured to do so?

I am using Motodev, an Eclipse-based development tool for Java ME / Motorola. The problem is when you type a line of code that has a method, such as:
super.
It doesnt give options of what methods it has available?
How do I configure it to do this?
Or I'm guessing the instructions for eclipse would work the same.
#android_king22 MOTODEV Studio should work just like Eclipse does. Pressing '.' or ctrl-space should bring up the list of suggestions. What context are you typing 'super'? Are you able to build your project (i.e. is the SDK path correct)?
Is there a folder inside your SDK called "platforms/android-X/sources"? This is a common workaround to a particularly ugly problem in Eclipse where it takes 20-30 seconds for auto-complete to work. If you do have this folder but no actual source inside, it could be preventing the auto-complete mechanism from working.
You must enable "Java Proposals" and "Java Type Proposals" in Preferences|Java|Editor|Content assist|Advanced
"super" calls a method in the superclass of whatever object you are currently using. If no method is available (or your current class is not a subclass), then it won't show anything. However, if there are methods available, it will automatically show (if you have Intellisense on).

Eclipse behavior in Netbeans

I love Netbeans but there is one thing I really like about Eclipse that I can't do in Netbeans:
If I have started a function that takes a string i.e. someFunction("Some string here")
Both netbeans and eclipse will autocomplete the ending doublequote and parens.
In Eclipse, if I hit enter at the end of my string, the cursor will move outside these.
In Netbeans, it will do a newline.
Anyone know how to make Netbeans behave like Eclipse in this manner?
It's an entirely differently application that uses very different APIs for their editors. Short of writing a custom plugin, I don't think you can.
This is a usablity issue. I think NetBeans has not support this yet.

Categories

Resources