You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
support adapter for IDocument in LSPEclipseUtils #1500
org.eclipse.lsp4e.LSPEclipseUtils.getFile(IDocument) and org.eclipse.lsp4e.LSPEclipseUtils.toUri(IDocument) uses the eclipse buffer allocated by buffer manager to IDocument to determine the java.netURI and org.eclipse.core.resources.IFile.
Some framework like Xtext does not connect their document to buffer manager. So LSPEclipseUtils returns null for URI and IFile in such cases.
So we can try to adapt the IDocument to URI and IFile. Off course implementors of IDocument shold adapt themselves for this feature to work.
I have created a PR to support adaption of XtextDocument but that is not precondition for this PR. eclipse-xtext/xtext#3614
More background:
Github copilot uses LSPEclipseUtils to derive URI and IFile. Which is currently failing for XtextDocuments and lacking the copilot completion support for DSL editors. microsoft/copilot-for-eclipse#46
@rubenporras : currently the enhancement only works via (invisible to user) preference.
Would you mind if we would provide some visible preference option somewhere in LSP4E, something like "Enable support for Xtext like editors" or "Enable document retrieval fallback via resources API"?
For the record: org.eclipse.lsp4e/org.eclipse.lsp4e.resourceFallback.enabled=true preference can be set via product customization to enable new functionality.
Would it be easier if you enable it with the CoPilot plugin? I have assumed that this is what you had in mind. If not, I would not mind for it to be enabled by default so that it can be disabled if it causes problems.
Would it be easier if you enable it with the CoPilot plugin? I have assumed that this is what you had in mind. If not, I would not mind for it to be enabled by default so that it can be disabled if it causes problems.
I mean, if users (in any application) see any issues, they could switch it on/off by themself in an easy way (without manual preferences file editing).
@raghucssit: just tried latest nightly build of LSP4E with latest nightly build from Copilot, everything works smooth in our Xtext based application! Great! Editing, Chat with ask/agents mode.
@rubenporras : any estimation when the official 0.30.1 LSP4E release will be created?
if you are happy with the result of the commit (which seems so), I can do the release now
Yes, I'm happy, sure! If you can release it, it would be great, so Copilot guys (and anyone else interesting on Copilot+Xtext) which plan to release next 0.16 release soon could profit from this update too (not only our internal application).
Somehow if I use the https://download.eclipse.org/lsp4e/releases/latest/ update site, I get LSP4E 0.19.12.
@rubenporras : any idea where to get LSP4E 0.30.1 ?
Now it works for me, I get AI assisted inline code suggestions on Xtext-based editors (*.xtext, *.xtend, *.mwe2, ... files). :-)
Thank you @iloveeclipse !
Activity
Adapt document to IFile when unable to retrieve file from buffer manager
Adapt document to IFile when unable to retrieve file from buffer manager
Adapt document to IFile when unable to retrieve file from buffer manager
Adapt document to IFile when unable to retrieve file from buffer manager
Adapt document to IFile when unable to retrieve file from buffer manager
Adapt document to IFile when unable to retrieve file from buffer manager
Non buffer files adapter support and Resource fallback listener tests
Adapt document to IFile when unable to retrieve file from buffer manager
Non buffer files adapter support and Resource fallback listener tests
Adapt document to IFile when unable to retrieve file from buffer manager
Adapt document to IFile when unable to retrieve file from buffer manager
Adapt document to IFile when unable to retrieve file from buffer manager
iloveeclipse commentedon Apr 1, 2026
@rubenporras : thanks for merging #1501.
Could you please:
Thanks!
iloveeclipse commentedon Apr 1, 2026
@rubenporras : currently the enhancement only works via (invisible to user) preference.
Would you mind if we would provide some visible preference option somewhere in LSP4E, something like "Enable support for Xtext like editors" or "Enable document retrieval fallback via resources API"?
iloveeclipse commentedon Apr 1, 2026
For the record:
org.eclipse.lsp4e/org.eclipse.lsp4e.resourceFallback.enabled=truepreference can be set via product customization to enable new functionality.rubenporras commentedon Apr 1, 2026
Would it be easier if you enable it with the CoPilot plugin? I have assumed that this is what you had in mind. If not, I would not mind for it to be enabled by default so that it can be disabled if it causes problems.
iloveeclipse commentedon Apr 1, 2026
I mean, if users (in any application) see any issues, they could switch it on/off by themself in an easy way (without manual preferences file editing).
iloveeclipse commentedon Apr 2, 2026
@raghucssit: just tried latest nightly build of LSP4E with latest nightly build from Copilot, everything works smooth in our Xtext based application! Great! Editing, Chat with ask/agents mode.
@rubenporras : any estimation when the official 0.30.1 LSP4E release will be created?
rubenporras commentedon Apr 2, 2026
@iloveeclipse , if you are happy with the result of the commit (which seems so), I can do the release now
iloveeclipse commentedon Apr 2, 2026
Yes, I'm happy, sure! If you can release it, it would be great, so Copilot guys (and anyone else interesting on Copilot+Xtext) which plan to release next 0.16 release soon could profit from this update too (not only our internal application).
@jdneo: FYI.
rubenporras commentedon Apr 2, 2026
Done
Add preference option for non-buffered file handling in Xtext editors.
Add preference option for non-buffered file handling in Xtext editors.
Add preference option for non-buffered file handling in Xtext editors.
Add preference option for non-buffered file handling in Xtext editors.
tamasmiklossy commentedon Jun 18, 2026
@iloveeclipse: What is exactly the right version combination to make
Copilot+Xtextwork?Currently what I have:
iloveeclipse commentedon Jun 18, 2026
You need commit 1168eb4 which is in LSP4E 0.30.1, other dependencies are fine (I would simply take latest greatest LSP4E version).
Of course
org.eclipse.lsp4e/org.eclipse.lsp4e.resourceFallback.enabled=truepreference must be set.tamasmiklossy commentedon Jun 18, 2026
Somehow if I use the
https://download.eclipse.org/lsp4e/releases/latest/update site, I get LSP4E 0.19.12.@rubenporras : any idea where to get LSP4E 0.30.1 ?
iloveeclipse commentedon Jun 18, 2026
I believe there is mismatch what is released on github and what is actually used as bundle versions.
I was referring to the released version, because this is what I can trace from the commit 1168eb4.
I have no idea which bundle version corresponds to which release. Ideally the lsp4e bundle version would match github release version.
tamasmiklossy commentedon Jun 24, 2026
Now it works for me, I get AI assisted inline code suggestions on Xtext-based editors (*.xtext, *.xtend, *.mwe2, ... files). :-)
Thank you @iloveeclipse !