This is where the Haxe approach seems the right one to me. Why having a compiler if every editor have to re-implement the very logic the compiler already handle, and as @leedohm said, every times the language changes, the tools have to changes as well. Making the compiler a tool that both evaluates/validates/compiles your code and provides information for tools to use seems so logical when you think about it that I don’t understand why it didn’t became a rule of thumb of recent languages (yes I’m talking to you go, rust, etc.).
And it’s even worse when the language doesn’t have a proper compiler, statically typed languages will always have better autocompletion support than dynamic languages as they don’t need to actually run to provides information on a given variable/function. They know what you can expect on a given variable as you had to declare its type somewhere before. They can tell you what parameters a function expect. They can tell you what you can’t do. Dynamic languages are what they are, a magical tool for whoever wants to go fast without the burden of doing rocket science when what you need is just a playground to test ideas.
Talking about java, every time I had to work with it, the IDE I used at that time was requesting that I create a project, referencing the dependencies I used, and even if I had ant tasks or other custom build the IDE setup was mandatory if I wanted to have proper completion/validation (how many times do I had to figure why I had missing dependencies raised in the IDE where my ant tasks just worked).
The parsing part is just the tip of the iceberg. You can parse any file, it won’t tell you where to find class X and what are the methods available for type Y. Unless you had declared all that stuff beforehand. And java is probably not the worse language when it comes to declarative stuff (one of the reason I moved to languages like ruby, python or coffeescript, write less, read more).
My hope is that at some point compilers/transpilers/interpreters will all implements basic API to tell what you can expect to access at any given position in a file, but until that day, our brain, knowledge and intuition will do a better job than any tool.
In the end programming is just that, a game we play with our brain, trying to figure every path, every edge case, whether the computer understand it or not. Tools can help us, but they won’t be able to write beautiful/meaningful code by themselves unless we had figured it ourselves.