use of org.jkiss.dbeaver.ui.editors.content.ContentEditorInput in project dbeaver by serge-rider.
the class XMLPanelEditor method primeEditorValue.
@Override
public void primeEditorValue(@NotNull DBRProgressMonitor monitor, @NotNull StyledText control, @NotNull DBDContent value) throws DBException {
monitor.beginTask("Prime content value", 1);
try {
monitor.subTask("Prime XML value");
IEditorInput sqlInput = new ContentEditorInput(valueController, null, null, monitor);
editor.init(subSite, sqlInput);
} catch (Exception e) {
throw new DBException("Can't load XML vaue", e);
} finally {
monitor.done();
}
}
use of org.jkiss.dbeaver.ui.editors.content.ContentEditorInput in project dbeaver by serge-rider.
the class XMLPanelEditor method extractEditorValue.
@Override
public void extractEditorValue(@NotNull DBRProgressMonitor monitor, @NotNull StyledText control, @NotNull DBDContent value) throws DBException {
monitor.beginTask("Read XML value", 1);
try {
monitor.subTask("Read XML value");
editor.doSave(RuntimeUtils.getNestedMonitor(monitor));
final ContentEditorInput editorInput = (ContentEditorInput) editor.getEditorInput();
editorInput.updateContentFromFile(RuntimeUtils.getNestedMonitor(monitor));
} catch (Exception e) {
throw new DBException("Error saving XML value", e);
} finally {
monitor.done();
}
}
Aggregations