Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Rendering an ITextEditor inside a SWT Composite(Trying to embed a Generic Text Editor inside a SWT Composite)
Rendering an ITextEditor inside a SWT Composite [message #1828291] Fri, 05 June 2020 22:25 Go to next message
Martin D'Aloia is currently offline Martin D'AloiaFriend
Messages: 3
Registered: August 2011
Junior Member
Hi,

Is it possible to render an ITextEditor inside a SWT Composite? if so, how can we achieve that or something similar? (*)

Context:
We have a plugin using the Generic Text Editor (ExtensionBasedTextEditor) with a custom Language Server using LSP4E.
We want to open a "configuration dialog" (WizardPage) and have the editor (just the "viewport") with full capabilities (suggestions, syntax highlight, error markers, etc) to allow inline editions of a text without having a file.

Thank you very much in advance!

(*): We were trying multiple (hacky) ways but without much luck.

[Updated on: Fri, 05 June 2020 22:26]

Report message to a moderator

Re: Rendering an ITextEditor inside a SWT Composite [message #1828798 is a reply to message #1828291] Thu, 18 June 2020 23:43 Go to previous message
Martin D'Aloia is currently offline Martin D'AloiaFriend
Messages: 3
Registered: August 2011
Junior Member
Quick update for future reference.

"Editors are displayed only in the editor area, so no, you can't get a StructuredTextEditor in a wizard page." (reference)

The way to go to do it is to use a SourceViewer (and configure a lot of things) and give a parent Composite to it. See: http://wiki.eclipse.org/Platform_Text

Xtext has an embedded editor (not an IEditorPart) that also could be taken as a reference. See the EmbeddedEditor class and the ones related in that package.

To understand a little bit more about this Xtext embedded editor see these (a bit old) slides: https://www.slideshare.net/meysholdt/lightweight-xtext-editorsasswtwidgets

[Updated on: Thu, 18 June 2020 23:51]

Report message to a moderator

Previous Topic:Plugin with Tycho and 2020-03 but I want it to work on JRE 8
Next Topic:Notification on help invoked
Goto Forum:
  


Current Time: Fri Apr 19 11:06:21 GMT 2024

Powered by FUDForum. Page generated in 0.02246 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top