LightFieldBuilder incorrect completion
I add new fields (not static) to class elements by PsiAugmentProvider. With this part is all fine.
But when I write field name in editor, and press enter (in automcomplete or without), editor write class name before field call.
Example:
Plugin add field with name someField to class Ex: public String someField;
(in LightFieldBuilder I set Ex as containingClass )
class Ex {
public void someMethod() {
Ex.someField // expected only "someField"
}
}
Please sign in to leave a comment.
Hi,
I've tried IDEA 14.1 EAP with the following augmenter:
and I don't get "someField" completion after class qualifier (but get it after instance qualifier). Could you please provide a reproducible code sample? Alternatively, you can debug JavaCompletionProcessor#execute and check why this completion item isn't discarded immediately.
Sorry, but you have misunderstood me.
I typed someField (without any prefix, without class name), and then auto complete propose me "someField" as variant, I choose it, and then I have "Ex.someField".
Not after class qualifier or instance.
I see! To blame is areElementsEquivalent check at VariableLookupItem.java:223, because it compares light fields from the original and copied class, and they're not equivalent (because so it is written in PsiElementBase#isEquivalentTo). We'll try to fix it in IDEA 14.1 EAP, thanks!
Thanks!
Pushed to the master