当前位置: 首页>>代码示例>>Java>>正文


Java CompareUI.openCompareEditor方法代码示例

本文整理汇总了Java中org.eclipse.compare.CompareUI.openCompareEditor方法的典型用法代码示例。如果您正苦于以下问题:Java CompareUI.openCompareEditor方法的具体用法?Java CompareUI.openCompareEditor怎么用?Java CompareUI.openCompareEditor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.compare.CompareUI的用法示例。


在下文中一共展示了CompareUI.openCompareEditor方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: displayComparisonView

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
/**
 * Display comparison view of test file with expected and actual xpect expectation
 */
private void displayComparisonView(ComparisonFailure cf, Description desc) {
	IXpectURIProvider uriProfider = XpectRunner.INSTANCE.getUriProvider();
	IFile fileTest = null;
	if (uriProfider instanceof N4IDEXpectTestURIProvider) {
		N4IDEXpectTestURIProvider fileCollector = (N4IDEXpectTestURIProvider) uriProfider;
		fileTest = ResourcesPlugin.getWorkspace().getRoot()
				.getFileForLocation(new Path(fileCollector.findRawLocation(desc)));
	}

	if (fileTest != null && fileTest.isAccessible()) {
		N4IDEXpectCompareEditorInput inp = new N4IDEXpectCompareEditorInput(fileTest, cf);
		CompareUI.openCompareEditor(inp);
	} else {
		throw new RuntimeException("paths in descriptions changed!");
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:XpectCompareCommandHandler.java

示例2: openInCompare

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
private void openInCompare(ITypedElement ancestor, ITypedElement left,
		ITypedElement right) {
	IWorkbenchPage workBenchPage = getTargetPage();
	CompareEditorInput input = new SaveablesCompareEditorInput(ancestor,
			left, right, workBenchPage);
	IEditorPart editor = CompareRevisionAction.findReusableCompareEditor(
			input, workBenchPage);
	if (editor != null) {
		IEditorInput otherInput = editor.getEditorInput();
		if (otherInput.equals(input)) {
			// simply provide focus to editor
			workBenchPage.activate(editor);
		} else {
			// if editor is currently not open on that input either re-use
			// existing
			CompareUI.reuseCompareEditor(input, (IReusableEditor) editor);
			workBenchPage.activate(editor);
		}
	} else {
		CompareUI.openCompareEditor(input);
	}
}
 
开发者ID:sakim,项目名称:eclipse-utility,代码行数:23,代码来源:OpenComparablesHandler.java

示例3: compareSelectedQuickfixes

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
private void compareSelectedQuickfixes() {
		if ( selected.size() < 1 || selected.size() > 2 ) {
			return;
		}
		
		// About customization
		// https://eclipse.org/forums/index.php/t/781875/
		
		ISearchState left     = searcher;
		ISearchState right    = selected.get(0);
		ISearchState ancestor = null;
		
		if ( selected.size() == 2 ) {
			left = selected.get(1);
			ancestor = searcher;
		}		
		
		
		CompareConfiguration conf = MyCompareInput.createDefaultConfiguration();
		conf.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, true);
		MyCompareInput input = new MyCompareInput(
				conf,atlResource, ancestor, left, right);
		CompareUI.openCompareEditor(input);
		
		
//		IStructuredSelection s = (IStructuredSelection) event.getSelection();
//		selected.clear();
//		s.iterator().forEachRemaining(e -> {
//			if ( e instanceof ISearchState)  {
//				selected.add((ISearchState) e); 
//			}
//		});

	}
 
开发者ID:anatlyzer,项目名称:anatlyzer,代码行数:35,代码来源:RepairTransformationView.java

示例4: openCompareUI

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
@Override
public void openCompareUI(final CompareEditorInput input) {
    CompareUI.openCompareEditor(input);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:5,代码来源:CompareUIType.java

示例5: display

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
public void display() {
	CompareUI.openCompareEditor(new ModelCompareEditorInput(snapshot), true);
}
 
开发者ID:edgarmueller,项目名称:emfstore-rest,代码行数:4,代码来源:EMFCompareComparator.java

示例6: openNewCompareEditor

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
/**
 * Opens a new compare editor with the given input.
 * 
 * @param input
 *          the {@link GitFileDiffEditorInput} to be shown in the newly created compare editor
 */
public static void openNewCompareEditor(final GitFileDiffEditorInput input) {
  CompareUI.openCompareEditor(input);
}
 
开发者ID:sealuzh,项目名称:Permo,代码行数:10,代码来源:CompareUtil.java


注:本文中的org.eclipse.compare.CompareUI.openCompareEditor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。