use of org.jkiss.dbeaver.model.impl.data.StringContent in project dbeaver by dbeaver.
the class ContentPanelEditor method extractEditorValue.
@Override
public Object extractEditorValue() throws DBException {
final Object content = valueController.getValue();
if (isStringValue()) {
StringContent stringContent = new StringContent(valueController.getExecutionContext(), null);
streamEditor.extractEditorValue(new VoidProgressMonitor(), control, stringContent);
return stringContent.getRawValue();
} else {
if (content == null) {
log.warn("NULL content value. Must be DBDContent.");
} else if (streamEditor == null) {
log.warn("NULL content editor.");
} else {
try {
streamEditor.extractEditorValue(new VoidProgressMonitor(), control, (DBDContent) content);
} catch (Throwable e) {
log.debug(e);
valueController.showMessage(e.getMessage(), DBPMessageType.ERROR);
}
}
return content;
}
}
use of org.jkiss.dbeaver.model.impl.data.StringContent in project dbeaver by serge-rider.
the class ContentPanelEditor method extractEditorValue.
@Override
public Object extractEditorValue() throws DBException {
final Object content = valueController.getValue();
if (isStringValue()) {
StringContent stringContent = new StringContent(valueController.getExecutionContext(), null);
streamEditor.extractEditorValue(new VoidProgressMonitor(), control, stringContent);
return stringContent.getRawValue();
} else {
if (content == null) {
log.warn("NULL content value. Must be DBDContent.");
} else if (streamEditor == null) {
log.warn("NULL content editor.");
} else {
try {
streamEditor.extractEditorValue(new VoidProgressMonitor(), control, (DBDContent) content);
} catch (Throwable e) {
log.debug(e);
valueController.showMessage(e.getMessage(), DBPMessageType.ERROR);
}
}
return content;
}
}
Aggregations