-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
each on a collection is not enough promoted on content assist #674
Comments
Another example in which the current proposal order is not useful, combined with the problem already described in #676: package test31;
import java.beans.PropertyChangeListener;
public class A {
public final PropertyChangeListener[] getPropertyChangeListeners() {
return null;
}
public boolean isBar() {
return true;
}
} package test31
class Test31 {
private static final A FAKE = new A()
void foo() {
def b = new A()
if(b.is|)
}
} Suppose you're at "|" and you want to type: Also note that
|
Note for anyone looking at this and wanting to alter the sort order of content assist proposals in either the Groovy or Java editor: You can implement the extension point Groovy content assist merely provides relevance values to achieve the default sorting. |
Any plan to work on this? I found another frequent use case in which working with Greclipse right now is painful. logger.debug| <= insert "(" here Greclipse completes it as:
The second point might be tricky (I don't know if you can discriminate over the trigger character based on context), but if the first point were fixed the second problem would probably be negligible. Right now, if you have auto-activation enabled you are doomed!! Please, consider changing the content assist priorities based on the type of matching (in order of priority: exact, prefix, substring, camel-case...). IMHO it would be an impressive improvement in Greclipse usability, really. |
Somewhat related to #411.
Consider the following code:
Invoke content assist at "|": it's quite clear and obvious that I want to invoke one of the
each
methods supplied as DGMs, but Greclipse as a first option showsforEach
method.I understand that content assist priority is currently determined first by group, than by name matching (giving more priority to class methods rather than DGMs), but I personally think that prefix and exact matches should ALWAYS be given maximum priority. It's even more evident when you type
new List().each|
and invoke content assist, it's quite natural that Greclipse should suggesteach
beforeforEach
.Also, the implementation detail on how DGMs are provided by Groovy I think should be, as said, an implementation detail to the Groovy developer: from a developer (I mean, consumer of Greclipse) point of view, the fact that
each
is not defined onList
but rather as a DGM should not matter in any way. It could be reasonable to give DGMs less relevance (like you do for methods deeply inherited in class hierarchy) than methods directly defined in the declared type, but IMHO prefix vs substring matching should be the first priority factor when deciding what to show first.After all, if I want to type
each
(and I know I want to typeeach
) it's annoying that Greclipse suggests me that I want to typeforEach
instead, especially when you have content assist auto activation and you then type a trigger character.Also consider that, in this particular case,
each
, even though defined as a DGM forObject
, fits perfectly and naturally on collection classes and in this way Greclipse makes it "hard" to use.The text was updated successfully, but these errors were encountered: