I've been trying to use JavaClassReferenceSet with JSReferenceExpression but without any success. I'd like to implement that for the specific case of referencing java class in Packages namespace in rhino-js / nashorn (e.g. var runtime = Packages.java.lang.Runtime;). I cannot add reference to JSReferenceExpression, while it is reference itself. Only thing to override here is probably doResolve in custom reference expression resolver. If I did that there would be only ctrl+click to package / java class, but no autocompletion. I find it very problematic because of cascade of JSReferenceExpressions. I'd like to have public static method / fields autocompletion as well. Only way I can actually think of is language injection, but I haven't used it yet. Any ideas?