return;
}
original.recordLayout();
pathway p = original.getPathway();
BioPAXGraph graph = main.getRootGraph().excise(p);
graph.setPathway(null);
String name = p.getNAME();
// If the name contains a copy number at the end (like "pathway name (2)"), remove it
if (name.indexOf(" ") > 0)
{
String last = name.substring(name.lastIndexOf(" ") + 1);
if (last.indexOf("(") == 0 && last.indexOf(")") == last.length() - 1)
{
boolean isdigit = true;
for (int i = 1; isdigit && i < last.length() - 1; i++)
{
isdigit = Character.isDigit(last.charAt(i));
}
if (isdigit) name = name.substring(0, name.lastIndexOf(" "));
}
}
graph.setName(name);
main.createNewTab(graph);
graph.fetchLayout(p.getRDFId());
}
}