提交 b4b5598f 编写于 作者: S serge-rider

#186 Show error on computed columns coloring

上级 fd84332c
......@@ -2878,7 +2878,9 @@ public class ResultSetViewer extends Viewer
super(name);
}
@NotNull
protected DBVEntity getVirtualEntity(DBDAttributeBinding binding) {
protected DBVEntity getVirtualEntity(DBDAttributeBinding binding)
throws IllegalStateException
{
final DBSEntity entity = getModel().getSingleSource();
if (entity == null) {
throw new IllegalStateException("No virtual entity for multi-source query");
......@@ -2917,9 +2919,17 @@ public class ResultSetViewer extends Viewer
} finally {
shell.dispose();
}
final DBVEntity vEntity = getVirtualEntity(attribute);
vEntity.setColorOverride(attribute, value, null, StringConverter.asString(color));
updateColors(vEntity);
try {
final DBVEntity vEntity = getVirtualEntity(attribute);
vEntity.setColorOverride(attribute, value, null, StringConverter.asString(color));
updateColors(vEntity);
} catch (IllegalStateException e) {
UIUtils.showErrorDialog(
viewerPanel.getShell(),
"Row color",
"Can't set row color",
e);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册