Protostome
Protostome

Reputation: 6039

embed org.eclipse.wst.sse.ui.StructuredTextEditor in SWT Dialog

Is there any way to add StructuredTextEditor in SWT dialog? if not, is there any method that could be used to view and edit xml files from within a dialog (WizardPage)

Thanks!

Upvotes: 1

Views: 932

Answers (2)

Paul Webster
Paul Webster

Reputation: 10654

The next step above StyledText would be to use JFace Text and SourceViewer. The viewer hooks up your text presentation to the StyleText widget, and is the viewer that the java editor uses. The viewer and the widget can then be used in a wizard or dialog.

For more information see http://wiki.eclipse.org/Platform_Text

Upvotes: 1

Sandman
Sandman

Reputation: 9692

Editors are displayed only in the editor area, so no, you can't get a StructuredTextEditor in a wizard page. What you need to do is use an SWT widget that will let you display and edit text. Since you want to be able to edit XML files, my guess is that StyledText would be of use to you. But you'll need to take care of a lot of things which are usually already taken care of (i.e. your editor's 'dirty' state etc.). I haven't tried doing what you want to do, so I can't offer a much better advice then this, but if I had to do it, taking a look at StyledText is where I would start.

Upvotes: 0

Related Questions