if (editors_.get(event.getTabIndex()).getId().equals(activeEditorId))
{
// scan the source navigation history for an entry that can
// be used as the next active tab (anything that doesn't have
// the same document id as the currently active tab)
SourceNavigation srcNav = sourceNavigationHistory_.scanBack(
new SourceNavigationHistory.Filter()
{
public boolean includeEntry(SourceNavigation navigation)
{
return !navigation.getDocumentId().equals(activeEditorId);
}
});
// see if the source navigation we found corresponds to an active
// tab -- if it does then set this on the event
if (srcNav != null)
{
for (int i=0; i<editors_.size(); i++)
{
if (srcNav.getDocumentId().equals(editors_.get(i).getId()))
{
view_.selectTab(i);
break;
}
}