closeTab(tab, remmeberLayout);
}
public void closeTab(CTabItem tab, boolean rememberLayout)
{
ScrollingGraphicalViewer viewer = tabToViewerMap.get(tab);
CompoundModel root = (CompoundModel) viewer.getContents().getModel();
if (root instanceof BioPAXGraph)
{
BioPAXGraph graph = (BioPAXGraph) root;
assert graph.getName().equals(tab.getText()) :
"graph name: " + graph.getName() + " tab name: " + tab.getText();
if (rememberLayout && graph.isMechanistic())
{
graph.recordLayout();
}
}
boolean removed = openTabNames.remove(tab.getText());
assert removed : "tab name: " + tab.getText();
ScrollingGraphicalViewer v = tabToViewerMap.remove(tab);
assert v != null;
CTabItem t = nameToTabMap.remove(tab.getText());