TreePath treePath = tree.getPathForRow(row);
if (treePath != null && graphPane != null) {
CheckNode node = (CheckNode) treePath.getLastPathComponent();
ArrayList<CheckNode> nodes = new ArrayList<CheckNode>();
node.setSelected(select, selectionMode, nodes);
IGraphModel graphModel = graphPane.getGraphModel();
for (CheckNode checkNode : nodes) {
Object object = checkNode.getUserObject();
if (!(object instanceof IOntologyConcept)) {
continue;
}
IOntologyConcept ontologyConcept = (IOntologyConcept) object;
SimpleVertex simpleVertex = graphModel.getVertexByConcept(ontologyConcept);
if (simpleVertex != null) {
SuperVertex superVertex = simpleVertex.getSuperVertex();
IVertex vertex = superVertex == null ? simpleVertex : superVertex;
if (hide) {
graphModel.removeVertex(vertex);
} else {
graphModel.addVertex(vertex);
}
for (IOntologyConcept similarConcept : ontologyConcept.getSimilarConcepts()) {
Set<CheckNode> similarNodes = conceptToCheckNodeMap.get(similarConcept);
if (similarNodes != null) {
for (CheckNode similar : similarNodes) {