I'd like to use the Eclipse compiler and completion engine for a project I'm working on. I was able to integrate the compiler easily enough, as the code is fairly isolated from the rest of the IDE. The completion engine appears to be more tightly coupled, however.
I see that the CompletionEngine constructor takes a SearchableEnvironment and an IJavaProject parameter (among others). I'd prefer not to use Eclipse's workspace and project structures, as my application is very simple, so my plan was to
- extend CompletionEngine with a class that overrides the methods where IJavaProject is referenced (findVariableName() and getNoCacheNameEnvironment()) - extend SearchableEnvironent with a class that overrides the methods where IJavaProject is referenced (findTypes, findExactTypes, getSearchScope)
Please let me know if this sounds like the best approach, or if there's an easier/better way. Thanks, Dirk