Search in sources :

Example 1 with XMLEditor

use of org.jkiss.dbeaver.ui.editors.xml.XMLEditor in project dbeaver by serge-rider.

the class XMLPanelEditor method createControl.

@Override
public StyledText createControl(IValueController valueController) {
    this.valueController = valueController;
    this.subSite = new SubEditorSite(valueController.getValueSite());
    editor = new XMLEditor();
    try {
        editor.init(subSite, StringEditorInput.EMPTY_INPUT);
    } catch (PartInitException e) {
        valueController.showMessage(e.getMessage(), DBPMessageType.ERROR);
        return new StyledText(valueController.getEditPlaceholder(), SWT.NONE);
    }
    editor.createPartControl(valueController.getEditPlaceholder());
    ContentPanelEditor.setEditorSettings(editor.getEditorControl());
    return editor.getEditorControl();
}
Also used : SubEditorSite(org.jkiss.dbeaver.ui.editors.SubEditorSite) StyledText(org.eclipse.swt.custom.StyledText) PartInitException(org.eclipse.ui.PartInitException) XMLEditor(org.jkiss.dbeaver.ui.editors.xml.XMLEditor)

Aggregations

StyledText (org.eclipse.swt.custom.StyledText)1 PartInitException (org.eclipse.ui.PartInitException)1 SubEditorSite (org.jkiss.dbeaver.ui.editors.SubEditorSite)1 XMLEditor (org.jkiss.dbeaver.ui.editors.xml.XMLEditor)1