org.eclipse.ui.internal.EditorHistoryItem#matches ( )源码实例Demo

下面列出了org.eclipse.ui.internal.EditorHistoryItem#matches ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: translationstudio8   文件: CommonFunction.java
/**
 * 当删除一个文件时,刷新历史记录	--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();
	}
}
 
源代码2 项目: tmxeditor8   文件: CommonFunction.java
/**
 * 当删除一个文件时,刷新历史记录	--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();
	}
}
 
 同类方法