简体   繁体   中英

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!

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

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 (ie 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM