Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-dev] Get hold of the Resource of a GenericEditor Document

Thanks, that's really helpful!

The language server is still on my list but currently a bit out of scope. I hope to get back to this once the basic operations working and its clear what can be moved to the language-server part and where the parsing happens and so on.

So currently I'm just prototyping a bit to get a better understanding of the internals.

Am 15.01.21 um 11:13 schrieb Mickael Istria:
Hi,

On Fri, Jan 15, 2021 at 11:05 AM Christoph Läubrich <laeubi@xxxxxxxxxxxxxx <mailto:laeubi@xxxxxxxxxxxxxx>> wrote:

    I'm currently investigate extending the GenericEditor


As mentioned elsewhere, I recommend you start directly by implementing a language server and binding it to Generic Editor with LSP4E. Although the first steps are not well documented and may seem trickier than using Generic Editor extensions, once they're done, they'll unleash a ROI and some level of reusability and accessibility to external contriutors that's tremendously higher than what you'll achieve with Eclipse APIs & Generic Editor.

    but found that
    from time to time I need to get the resource that is currently edited.


Then main way to get the Resource from a document I'm aware of is to query the TextFileBuffer, as done in https://git.eclipse.org/c/lsp4e/lsp4e.git/tree/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java#n782 <https://git.eclipse.org/c/lsp4e/lsp4e.git/tree/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java#n782> and https://git.eclipse.org/c/lsp4e/lsp4e.git/tree/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java#n283 <https://git.eclipse.org/c/lsp4e/lsp4e.git/tree/org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java#n283> .

HTH

_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev



Back to the top