From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Danny Freeman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61371: 30.0.50; Adding support for jdt:// file scheme in eglot Date: Fri, 10 Feb 2023 15:32:30 -0500 Message-ID: <87h6vt8dfb.fsf@dfreeman.email> References: <87r0v06kjv.fsf@thornhill.no> <875ycbkw62.fsf@gmx.de> <87v8kb9l2a.fsf@thornhill.no> Reply-To: Danny Freeman Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61371@debbugs.gnu.org, michael.albinus@gmx.de, joaotavora@gmail.com To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 10 21:38:32 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQaAA-0006bY-Gn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Feb 2023 21:38:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQa9k-0005h0-NV; Fri, 10 Feb 2023 15:38:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQa9i-0005gc-Mv for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2023 15:38:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQa9i-00047r-EE for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2023 15:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQa9h-0007Mj-V3 for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2023 15:38:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Danny Freeman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Feb 2023 20:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61371 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: "Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors" , Michael Albinus , 61371@debbugs.gnu.org, joaotavora@gmail.com Original-Received: via spool by submit@debbugs.gnu.org id=B.167606146828294 (code B ref -1); Fri, 10 Feb 2023 20:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Feb 2023 20:37:48 +0000 Original-Received: from localhost ([127.0.0.1]:38205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQa9U-0007MH-De for submit@debbugs.gnu.org; Fri, 10 Feb 2023 15:37:48 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:60100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQa9R-0007M9-S1 for submit@debbugs.gnu.org; Fri, 10 Feb 2023 15:37:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQa9R-0005eK-J4 for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2023 15:37:45 -0500 Original-Received: from out-96.mta1.migadu.com ([95.215.58.96]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQa9O-00041o-Vu for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2023 15:37:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1676061458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pVwEWbXYOcenyidDlGztsgyoc2bcmKuBNVV7hoT+CfU=; b=AvScXIkSOVE7ZuiD+8BpdL58KZfou7xnNQ7M/eCrKG49B2RHTEwts2JzG3qV+hUbozbzP8 kVEs/hO75DC0Ey2oVLji8N7/l6xp9xXaageijoCkCIurWtNUDaeqBXJSp38NF7w0daQbJm VgbV4C+Li4Q0zGsx05+okkWiBB5frXA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <87v8kb9l2a.fsf@thornhill.no> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.96; envelope-from=danny@dfreeman.email; helo=out-96.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255304 Archived-At: Theodor Thornhill writes: > Michael Albinus writes: > >> Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife >> of text editors" writes: >> >>> Hi! >> >> Hi Theo, >> >>> When using Eglot along with Java there are some hacks that needs to be >>> made to make things functional. One of the more important things is to >>> add support for the jdt:// file scheme that is sent when you try to >>> go-to-definition on a system or third party lib. >>> >>> As you can see, we need to query the server with >>> :java/classFileContents, and also register with the server to send it >>> with the :extendedClientCapabilities on initialization. >>> >>> Is there a place this code could live? Maybe in the new java-ts-mode? >> >> There is the jarchive package on GNU ELPA. Could this be used, perhaps extended? >> >>> Theo >> >> Best regards, Michael. > > Maybe! Don't know what it does, but I'll check it out - thanks! > > Theo JDT urls are outside the scope of jarchive. I would think of them less as URLs and more as tokens to be decoded by the LSP server that provides them. JDT urls are intended to be sent back to the LSP server using a special extension method. There is an issue open in the eglot-java repo to implement this but I have been too busy to get around to it https://github.com/yveszoundi/eglot-java/issues/6 Someone has responded there with some code similar to jarchive that will parse the JDT urls and try to open them, but I wouldn't consider that a permanent solution. JDT urls are not standardized and subject to change by the JDT LSP maintainers. -- Danny Freeman