preferencebinder icon indicating copy to clipboard operation
preferencebinder copied to clipboard

Check for `PreferenceInjector.inject` call at compile time

Open denley opened this issue 9 years ago • 2 comments

It would improve UX to check that the user has properly called PreferenceInjector.inject and PreferenceInjector.stopListening (if necessary) in the target class if there are annotations present.

This may not actually be possible, especially when dealing with inheritance.

denley avatar Mar 07 '15 02:03 denley

It turns out this is possible using java's Compiler Tree API. It has been implemented using a technique from this stackoverflow answer

denley avatar Jul 25 '15 09:07 denley

This feature seems to have some compatibility issues. It really needs to work perfectly as it can cause unfixable compilation errors when it functions incorrectly.

I'm going to remove this feature pending extensive testing on a range of use cases and build cases.

denley avatar Aug 03 '15 04:08 denley