Idea shows augmented methods as red.
Hey,
I have "added" methods to my classes using PsiAugmentedProvider. Even though I have code completion for generated methods, it shows them as red when I have finished statement with semicolon.
I have had no problems with that previously, using both LightMethodBuilder and PsiElementFactory.createMethodFromText. For a new annotation only the constructor is not highlighed red.
This is the class that is augmented:
@Preferences
public class Prefs {
private int myInt;
private String myString;
}
Code that is using it is attached to show list with completion and red error.
I have tried to invalidate Idea's caches and changing my augmenting code in many ways. I also did some voodoo programming, but it didn't help either.
Any idea why it could show red there?
Cheers,
Maciej
Attachment(s):
Screenshot from 2014-05-20 10:19:42.png
Please sign in to leave a comment.
I have figured out how to fix it in my case. Basically I was using PsiClass.getAllFields(), which I changed to getFields and now Idea is happy.
If anyone knows the reason, I would appreciate having it explained to me.