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

Merge remote-tracking branch 'origin/devel' into devel


Former-commit-id: a77539ed
...@@ -28,10 +28,7 @@ import org.jkiss.dbeaver.ext.db2.editors.DB2SourceObject; ...@@ -28,10 +28,7 @@ import org.jkiss.dbeaver.ext.db2.editors.DB2SourceObject;
import org.jkiss.dbeaver.ext.db2.model.cache.DB2RoutineParmsCache; import org.jkiss.dbeaver.ext.db2.model.cache.DB2RoutineParmsCache;
import org.jkiss.dbeaver.ext.db2.model.dict.*; import org.jkiss.dbeaver.ext.db2.model.dict.*;
import org.jkiss.dbeaver.ext.db2.model.module.DB2Module; import org.jkiss.dbeaver.ext.db2.model.module.DB2Module;
import org.jkiss.dbeaver.model.DBPEvaluationContext; import org.jkiss.dbeaver.model.*;
import org.jkiss.dbeaver.model.DBPRefreshableObject;
import org.jkiss.dbeaver.model.DBPUniqueObject;
import org.jkiss.dbeaver.model.DBUtils;
import org.jkiss.dbeaver.model.exec.DBCException; import org.jkiss.dbeaver.model.exec.DBCException;
import org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils; import org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils;
import org.jkiss.dbeaver.model.meta.Property; import org.jkiss.dbeaver.model.meta.Property;
...@@ -54,7 +51,7 @@ import java.util.Map; ...@@ -54,7 +51,7 @@ import java.util.Map;
* @author Denis Forveille * @author Denis Forveille
*/ */
public class DB2Routine extends DB2Object<DBSObject> public class DB2Routine extends DB2Object<DBSObject>
implements DBSProcedure, DB2SourceObject, DBPRefreshableObject, DBPUniqueObject { implements DBSProcedure, DB2SourceObject, DBPRefreshableObject, DBPUniqueObject, DBPImageProvider {
public enum FunctionType { public enum FunctionType {
C("Column or aggregate"), C("Column or aggregate"),
...@@ -170,7 +167,7 @@ public class DB2Routine extends DB2Object<DBSObject> ...@@ -170,7 +167,7 @@ public class DB2Routine extends DB2Object<DBSObject>
@Override @Override
public DBSObjectState getObjectState() public DBSObjectState getObjectState()
{ {
return DBSObjectState.UNKNOWN; return valid == DB2RoutineValidType.Y ? DBSObjectState.NORMAL : DBSObjectState.UNKNOWN;
} }
@Override @Override
...@@ -392,4 +389,14 @@ public class DB2Routine extends DB2Object<DBSObject> ...@@ -392,4 +389,14 @@ public class DB2Routine extends DB2Object<DBSObject>
public FunctionType getFunctionType() { public FunctionType getFunctionType() {
return functionType; return functionType;
} }
@Nullable
@Override
public DBPImage getObjectImage() {
if (type == DB2RoutineType.F) {
return DBIcon.TREE_FUNCTION;
} else {
return DBIcon.TREE_PROCEDURE;
}
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册