本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
}