GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
SearchResult result = null;
Set<Integer> columnsToSearch = searchOptions.getColumnsToSearch();
boolean searchAllColumns = columnsToSearch.isEmpty();
Node[] nodes = searchOptions.getNodesToSearch();
AttributeRow row;
Object value;
for (; rowIndex < nodes.length; rowIndex++) {
if (!gec.isNodeInGraph(nodes[rowIndex])) {
continue;//Make sure node is still in graph when continuing a search
}
row = (AttributeRow) nodes[rowIndex].getNodeData().getAttributes();
for (; columnIndex < row.countValues(); columnIndex++) {
if (searchAllColumns || columnsToSearch.contains(columnIndex)) {
value = row.getValue(columnIndex);
result = matchRegex(value, searchOptions, rowIndex, columnIndex);
if (result != null) {
result.setFoundNode(nodes[rowIndex]);
return result;
}