本文整理汇总了Java中org.eclipse.compare.CompareConfiguration.setProperty方法的典型用法代码示例。如果您正苦于以下问题:Java CompareConfiguration.setProperty方法的具体用法?Java CompareConfiguration.setProperty怎么用?Java CompareConfiguration.setProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.compare.CompareConfiguration
的用法示例。
在下文中一共展示了CompareConfiguration.setProperty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPreviewer
import org.eclipse.compare.CompareConfiguration; //导入方法依赖的package包/类
private Control createPreviewer(Composite parent) {
final CompareConfiguration compareConfiguration = new CompareConfiguration();
compareConfiguration.setLeftLabel("Original " + docTypeName);
compareConfiguration.setLeftEditable(false);
compareConfiguration.setRightLabel("Updated " + docTypeName);
compareConfiguration.setRightEditable(false);
compareConfiguration.setProperty(CompareConfiguration.IGNORE_WHITESPACE, Boolean.FALSE);
compareConfiguration.setProperty(PREFIX_SUFFIX_PROPERTY, fPrefixSuffix);
fViewer = new TextMergeViewer(parent, SWT.NONE, compareConfiguration);
// add initial input in order to avoid problems when disposing the viewer later:
fViewer.setInput(new DiffNode(new TargetElementFromString(""), new TargetElementFromString("")));
Control control = fViewer.getControl();
control.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
compareConfiguration.dispose();
}
});
return control;
}
示例2: createConfiguration
import org.eclipse.compare.CompareConfiguration; //导入方法依赖的package包/类
@SuppressWarnings("javadoc")
protected static CompareConfiguration createConfiguration(IFile file) {
CompareConfiguration configuration = new CompareConfiguration();
configuration.setLeftEditable(true);
configuration.setLeftLabel("Expected Test Result" + (file != null ? " - " + file.getName() : ""));
configuration.setRightLabel("Actual Test Result");
configuration.setAncestorLabel("File on Disk");
configuration.setProperty(ICompareUIConstants.PROP_ANCESTOR_VISIBLE, Boolean.FALSE);
return configuration;
}
示例3: createPreviewer
import org.eclipse.compare.CompareConfiguration; //导入方法依赖的package包/类
private Control createPreviewer(Composite parent) {
final CompareConfiguration compareConfiguration = new CompareConfiguration();
compareConfiguration.setLeftLabel("Original package.json");
compareConfiguration.setLeftEditable(false);
compareConfiguration.setRightLabel("Merged package.json");
compareConfiguration.setRightEditable(false);
compareConfiguration.setProperty(CompareConfiguration.IGNORE_WHITESPACE, Boolean.FALSE);
fViewer = new TextMergeViewer(parent, SWT.NONE, compareConfiguration);
// add initial input in order to avoid problems when disposing the viewer later:
fViewer.setInput(new DiffNode(new DiffElementFromString(""), new DiffElementFromString("")));
Control control = fViewer.getControl();
control.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
compareConfiguration.dispose();
}
});
return control;
}
示例4: compareSelectedQuickfixes
import org.eclipse.compare.CompareConfiguration; //导入方法依赖的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);
// }
// });
}
示例5: createMergeViewer
import org.eclipse.compare.CompareConfiguration; //导入方法依赖的package包/类
protected Viewer createMergeViewer(Composite parent, CompareConfiguration compareConfiguration) {
compareConfiguration.setProperty(DefaultMergeEditor.PROVIDER, mergeEditorProvider);
return new DefaultMergeViewer(parent, SWT.NULL, compareConfiguration, documentProvider,
sourceViewerConfigurationProvider);
}