525526527528529530531532533534535
boolean doit = true; for (int i = 0; i < folder.getItemCount(); i++) { CTabItem tab = folder.getItem(i); folder.setSelection(i); if (((IEditor) tab.getControl()).close()) { tab.dispose(); i--; } else { doit = false; } }
537538539540541542543544545546547
} public void closeCurrentTab() { if(folder.getSelectionIndex() > -1) { CTabItem tab = folder.getSelection(); tab.dispose(); } else { getCurrentTab().dispose(); } }
670671672673674675676677678679680
CTabItem item = getItem(pageIndex); Control pageControl = item.getControl(); // dispose item before disposing editor, in case there's an exception // in editor's dispose item.dispose(); if (pageControl != null) { pageControl.dispose(); }
12171218121912201221122212231224122512261227
public void widgetDisposed(DisposeEvent e) { DataContent dataContent = (DataContent) tbtmNewItem .getData(); openDataContent.remove(dataContent); tbtmNewItem.dispose(); } }); DataContent content = null;
188189190191192193194195196197198
protected void removeTab(IProject project) { tabs.remove(project); CTabItem item = tabItems.remove(project); if (item != null) { item.dispose(); } openRooCommandWizardAction.update(); openRooAddOnManagerAction.update(); } }