if (resultSubGraph != null && !resultSubGraph.isEmpty()) {
int db_id_sg = (Integer)resultSubGraph.get(0).get(0);
request.append("select * from vertex s1 where s1.db_id_inner_graph = ");
request.append(db_id_sg);
request.append(";");
GraphNode gn = new GraphNode(ENodeType.DEF_TAB, tabId, tabName,
tabName);
List<List<Object>> result = this.parameter.model
.executeSQLRequest(request.toString());
if (result != null && !result.isEmpty()) {
int db_id_vertex = (Integer)result.get(0).get(0);
// create new node for navigator
GraphNode rgn = this.rootNode.getNode(db_id_vertex,
ENodeType.DEF_VERTEX);
if (rgn != null) {
rgn.add(gn);
} else {
VisualGraph.log.printError("[" + this.getClass().getName() + ".addTabInNavigator] [BAD] Get root graph node = null. Can't adds this tab in navigator.");
}
} else {
// adds graph node in graph
for (int i = 0; i < this.rootNode.getChildCount(); i++) {
GraphNode rgn = (GraphNode) this.rootNode.getChildAt(i);
if (rgn.getNode(db_id_sg, ENodeType.DEF_ROOT_SUBGRAPH) != null) {
rgn.add(gn);
break;
}
}
}
} else {