CompleteClipse guesses the variable based on a number of factors. These are the preference rules
in approximate order of priority:
- Variable type must be assignable to the argument type
- Local variables will be chosen before instance variables
- Instance variables will be chosen before inherited instance variables
- Variables that have a common substring with the parameter get
preference (e.g. if the argument is "String theString" a variable
"String myString" will have a greater common substring than
"String fooBar")
- Variables that appear closer to the point of code completion get
preference (proximity)
- Variables that have not been matched to a parameter yet are given
preference over those already used in this method completion.