use of org.eclipse.ui.internal.EditorHistoryItem in project translationstudio8 by heartsome.
the class CommonFunction method refreshHistoryWhenDelete.
/**
* 当删除一个文件时,刷新历史记录 --robert 2012-11-20
*/
@SuppressWarnings("restriction")
public static void refreshHistoryWhenDelete(IEditorInput input) {
IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench instanceof Workbench) {
EditorHistory history = ((Workbench) workbench).getEditorHistory();
for (EditorHistoryItem item : history.getItems()) {
if (item.matches(input)) {
history.remove(item);
}
}
history.refresh();
}
}
Aggregations