下面列出了org.eclipse.ui.internal.EditorHistoryItem#matches ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* 当删除一个文件时,刷新历史记录 --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();
}
}
/**
* 当删除一个文件时,刷新历史记录 --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();
}
}