return findNext(result);//Go to next search result
}
AttributeController ac = Lookup.getDefault().lookup(AttributeController.class);
Object value;
String str;
Attributes attributes;
AttributeColumn column;
if (!result.getSearchOptions().isUseRegexReplaceMode()) {
replacement = Matcher.quoteReplacement(replacement);//Avoid using groups and other regex aspects in the replacement
}
try {
//Get value to re-match and replace:
if (result.getFoundNode() != null) {
attributes = result.getFoundNode().getNodeData().getAttributes();
column = ac.getModel().getNodeTable().getColumn(result.getFoundColumnIndex());
} else {
attributes = result.getFoundEdge().getEdgeData().getAttributes();
column = ac.getModel().getEdgeTable().getColumn(result.getFoundColumnIndex());
}
value = attributes.getValue(result.getFoundColumnIndex());
str = value != null ? value.toString() : "";
StringBuffer sb = new StringBuffer();
//Match and replace the result:
Matcher matcher = result.getSearchOptions().getRegexPattern().matcher(str.substring(result.getStart()));