Hi, I've recently installed Eclipse Juno and i am trying to write some simple code. But when i create some method or variable it will not show in proposals menu. When i hit ctrl + space it is showing other methods and stuff but my own not. If i write it down manually it will still recognize it as invalid input. Can anyone help me please, i am pretty stuck at this point, without this feature, juno is useless. One more thing, i've tried things like this. ... , and through getters and setters, no success. Thanks for your time
What to you mean by "proposals menu"? Do you mean autocompletion? In other words, if you have a variable, foo, of type Foo, and you type "foo." and hit CRTL-space, you should be shown a list of methods and fields available to complete the code? That workd for me.
Perhaps if you offer a complete example we could be of more help.
Thank you for response. Yes i mean autocompletion. After few trials i have found solution, which i do not get . When i am creating object from class, i must use static type definition before it.
Like this: static ClassName objectName = new ClassName();
except:ClassName objectName = new ClassName();
If i will not, autocompletion menu is full of methods, classes etc. except that one. Two years ago i was writing bechelor thesis in java, and i do not remember that i was forced to do this. Can you please somehow explain me this procedure ? I am usually use static variables, but objects ?
Julius Stecik wrote:I am usually use static variables, but objects ?
A variable is a variable, object or otherwise; and the fact is that you never use objects directly.
Also: if you "usually" use static variables, then you're almost certainly doing things wrong; static should be used only when there is a need for it, and almost never for creating variables.
Constants: possibly; but they should be qualified with final; and there are often other alternatives even for them.
Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here