What do you mean by "can't have"? Do you mean that code completion is broken for you? In one of your actors, inside a method, type:
Greenfoot.
And then hit Ctrl-Space (hold Control, press Space) after you've typed the dot. You should get a list of methods with things like "delay(int)", "getKey()" and so on.
@hotrails,
nccb was referring to code auto-completion. You have to hit ctrl-space after the dot for it to appear. Or do you mean for it to guess what you are going to type and highlight the remaining text for you? In which case, no it does not exist.
I'v found this , however I want to know whether the IDE could cast auto completion immediately after the dot , as the feature in eclipse. Thanks for replying!
It was a deliberate design decision on our part. We didn't want to confuse novice programmers by making things pop-up unexpectedly. In our tutorial, about the fourth line of code that beginners are told to write is:
if (Greenfoot.isKeyDown("left")) ...
If auto-completion after the dot was on by default, they would get a menu pop-up which they would probably stop and read, rather than just writing the code. So keeping it on a manual shortcut means that it can be introduced to beginners when the time is right.
We could, of course, have a menu item allowing the dot-popup feature to be turned on. But the feature in general is tricky: you don't want the popup to appear after dots in import statements, string literals and decimal points in numbers, and making sure that it appears only in the right places is extra effort on our part for little gain. (And you'd still need the shortcut, because you can use auto completion without a dot, when you're calling methods in the current class.)