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


Java CompareUI.openCompareEditorOnPage方法代码示例

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


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

示例1: editConflictsInternal

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
private void editConflictsInternal()
        throws InvocationTargetException, InterruptedException {
    CompareConfiguration cc = new CompareConfiguration();
    cc.setLeftEditable(true);
    mergeConflictsCompareInput = new MergeConflictsCompareInput(cc, conflictDescriptor);
    mergeConflictsCompareInput.setMergeResult(mergeResult);
    mergeConflictsCompareInput.setResources(conflictOldFile, conflictWorkingFile,
            conflictNewFile, mergedFile, fileName);
    CompareUI.openCompareEditorOnPage(mergeConflictsCompareInput, getTargetPage());
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:11,代码来源:MergeEditConflictsAction.java

示例2: editConflictsInternal

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
/**
 * edit the conflicts using built-in merger
 * 
 * @param resource
 * @param conflictOldFile
 * @param conflictWorkingFile
 * @param conflictNewFile
 * @throws InvocationTargetException
 */
private void editConflictsInternal(IFile resource, IFile conflictOldFile,
        IFile conflictWorkingFile, IFile conflictNewFile)
        throws InvocationTargetException, InterruptedException {
    CompareConfiguration cc = new CompareConfiguration();
    ConflictsCompareInput fInput = new ConflictsCompareInput(cc);
    fInput.setResources(conflictOldFile, conflictWorkingFile,
            conflictNewFile, (IFile) resource);
    CompareUI.openCompareEditorOnPage(fInput, getTargetPage());
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:19,代码来源:EditConflictsAction.java

示例3: editConflictsInternal

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
private void editConflictsInternal()
        throws InvocationTargetException, InterruptedException {
    CompareConfiguration cc = new CompareConfiguration();
    cc.setLeftEditable(true);
    builtInConflictsCompareInput = new BuiltInConflictsCompareInput(cc, conflictDescriptor);
    builtInConflictsCompareInput.setResources(conflictOldFile, conflictWorkingFile,
            conflictNewFile, mergedFile, fileName);
    CompareUI.openCompareEditorOnPage(builtInConflictsCompareInput, getTargetPage());
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:10,代码来源:BuiltInEditConflictsAction.java

示例4: execute

import org.eclipse.compare.CompareUI; //导入方法依赖的package包/类
public void execute(IAction action) {	
	exception = null;
	IResource[] resources = getSelectedResources();
	IPropertyProvider left = null;
	right = null;
	if (resources != null && resources.length > 0) {
		left = new PropertyCompareLocalResourceNode(resources[0], true, null);
		if (resources.length > 1) {
			right = new PropertyCompareLocalResourceNode(resources[1], true, null);
		}
		else {
			final ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resources[0]);
			BusyIndicator.showWhile(Display.getDefault(), new Runnable() {			
				public void run() {
					try {
						right = new PropertyCompareRemoteResourceNode(svnResource.getRemoteResource(SVNRevision.HEAD), SVNRevision.HEAD, true, null);
					} catch (SVNException e) {
						exception = e;
					}							
				}
			});
			if (exception != null) {
				MessageDialog.openError(getShell(), Policy.bind("CompareSvnPropertiesAction.0"), exception.getMessage()); //$NON-NLS-1$
				return;
			}
		}
	}
	else {
		ISVNRemoteResource[] remoteResources = getSelectedRemoteResources();
		if (remoteResources != null && remoteResources.length > 0) {
			left = new PropertyCompareRemoteResourceNode(remoteResources[0], SVNRevision.HEAD, true, null);
			if (remoteResources.length > 1) {
				right =  new PropertyCompareRemoteResourceNode(remoteResources[1], SVNRevision.HEAD, true, null);
			}
		}
	}
	ComparePropertiesDialog dialog = new ComparePropertiesDialog(getShell(), left, right);
	if (dialog.open() == ComparePropertiesDialog.OK) {
		CompareUI.openCompareEditorOnPage(dialog.getInput(), getTargetPage());
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:42,代码来源:CompareSvnPropertiesAction.java


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