Fixed
Status Update
Comments
da...@google.com <da...@google.com>
da...@google.com <da...@google.com>
da...@google.com <da...@google.com> #2
This may be fixed. Can someone confirm?
da...@google.com <da...@google.com> #4
Just thinking - in our databinding.xml file we have this:
<java.elementFinder implementation="LayoutBindingClassFinder" order="first, before java"/>
<java.elementFinder implementation="BindingComponentClassFinder" order="first, before java"/>
<java.elementFinder implementation="DataBindingPackageFinder" order="last, after java"/>
I wonder if we're ending up before Java but after Kotlin.... It may be worth playing around with the order here. Would "first, before kotlin" or even just "first" work here?
<java.elementFinder implementation="LayoutBindingClassFinder" order="first, before java"/>
<java.elementFinder implementation="BindingComponentClassFinder" order="first, before java"/>
<java.elementFinder implementation="DataBindingPackageFinder" order="last, after java"/>
I wonder if we're ending up before Java but after Kotlin.... It may be worth playing around with the order here. Would "first, before kotlin" or even just "first" work here?
da...@google.com <da...@google.com> #5
So my guess in comment #4 doesn't pan out. There's no such thing as "before kotlin"
I dug a little bit more -- and it seems that the issue lives inside the Kotlin plugin, seehttps://github.com/JetBrains/kotlin/blob/master/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/KotlinJavaPsiFacade.java#L128
What I suspect is happening is that the Kotlin plugin has its own finder logic, which ignores our attempt to insert ourselves before the Java finder. It might be good to confirm this, but at this point, I think fixing this bug directly may be infeasible.
A possible solution, one we've been considering unrelated to this bug, is to ignore code in the generated files. If that works, that may end up aligning Java and Kotlin as a side effect, since it will effectively disable the Java finder. :/
I dug a little bit more -- and it seems that the issue lives inside the Kotlin plugin, see
What I suspect is happening is that the Kotlin plugin has its own finder logic, which ignores our attempt to insert ourselves before the Java finder. It might be good to confirm this, but at this point, I think fixing this bug directly may be infeasible.
A possible solution, one we've been considering unrelated to this bug, is to ignore code in the generated files. If that works, that may end up aligning Java and Kotlin as a side effect, since it will effectively disable the Java finder. :/
da...@google.com <da...@google.com> #6
This is probably related / identical to https://issuetracker.google.com/123379503 (even though in that bug the symptom is code completion)
da...@google.com <da...@google.com> #7
I'm going to prioritize this. I wasn't as worried about navigation, but the fact that this is breaking code completion in Kotlin worries me, and it's something I want to resolve before we launch 3.5
Description
Java Project -> Layout XML file
Kotlin Project -> Generated data binding code
We need to unify them or let the user choose the destination they want to go.