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


Java CompareConfiguration.setProperty方法代码示例

本文整理汇总了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;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:23,代码来源:SpecComparePage.java

示例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;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:N4IDEXpectCompareEditorInput.java

示例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;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:22,代码来源:PackageJsonComparePage.java

示例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); 
//			}
//		});

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

示例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);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:6,代码来源:DefaultViewerCreator.java


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