eclipse.jdt.ls icon indicating copy to clipboard operation
eclipse.jdt.ls copied to clipboard

Find references only working in the current document. Not working. Across the project.

Open kcpinnaka opened this issue 5 months ago • 3 comments

I'm using the following command to start the server ` command = [ "x:\jdk-17_windows-x64_bin\jdk-17.0.2\bin\java.exe", "-Declipse.application=org.eclipse.jdt.ls.core.id1", "-Dosgi.bundles.defaultStartLevel=4", "-Declipse.product=org.eclipse.jdt.ls.core.product", "-Dosgi.checkConfiguration=true", r"-Dosgi.sharedConfiguration.area=x:\eclipse.jdt.lsNew\org.eclipse.jdt.ls.product\target\repository\config_win", "-Dosgi.sharedConfiguration.area.readOnly=true", "-Dosgi.configuration.cascaded=true", "-noverify", "-Xms1G", f"-Djava.util.logging.config.file={log_config}", "-Dlog.level=ALL", "-jar", r"x:\eclipse.jdt.lsNew\org.eclipse.jdt.ls.product\target\repository\plugins\org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar", "-configuration", r"x:\eclipse.jdt.lsNew\org.eclipse.jdt.ls.product\target\repository\config_win", "-data", path ] def initialize(self): params = { "processId": None, "rootUri": self.root_uri, "capabilities": { "references": { "dynamicRegistration": True } } } return self.client.send_request_and_wait_for_response("initialize", params)

def find_references(self, file_uri, line, character):
    params = {
        "textDocument": {"uri": file_uri},
        "position": {"line": line, "character": character},
        "context": {"includeDeclaration": True}
    }
    return self.client.send_request_and_wait_for_response("textDocument/references", params)

`

Find references only working in the current document. Not working. Across the project.

However, when I run the project In Eclipse, PDE debugging mode on jdt.ls.socket-stream.launch, I am able to see all references across the project.

kcpinnaka avatar Sep 22 '24 04:09 kcpinnaka