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


Java CheckMode.NORMAL_AND_FAST属性代码示例

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


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

示例1: getType

private CheckType getType(final CheckMode mode) {
	if (mode == CheckMode.FAST_ONLY) {
		return CheckType.FAST;
	} else if (mode == CheckMode.EXPENSIVE_ONLY) {
		return CheckType.EXPENSIVE;
	} else if (mode == CheckMode.ALL) {
		return CheckType.FAST;
	} else if (mode == CheckMode.NORMAL_AND_FAST) {
		return CheckType.FAST;
	} else if (mode == CheckMode.NORMAL_ONLY) {
		return CheckType.NORMAL;
	} else
		return CheckType.FAST;
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:14,代码来源:ErrorToDiagnoticTranslator.java

示例2: getCheckMode

/**
 * @since 2.8
 */
protected CheckMode getCheckMode() {
	return CheckMode.NORMAL_AND_FAST;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:6,代码来源:CompilationTestHelper.java

示例3: newValidationJob

private ValidationJob newValidationJob(XtextEditor editor) {
	MarkerIssueProcessor markerIssueProcessor = new MarkerIssueProcessor(editor.getResource(), markerCreator, markerTypeProvider);
	ValidationJob validationJob = new ValidationJob(resourceValidator, editor.getDocument(), markerIssueProcessor, CheckMode.NORMAL_AND_FAST);
	return validationJob;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:5,代码来源:ValidatingEditorCallback.java

示例4: updateMarkers

@Override
public void updateMarkers(final Delta delta, final ResourceSet resourceSet, final IProgressMonitor monitor)
		throws OperationCanceledException {

	final URI uri = delta.getUri();
	final IResourceUIValidatorExtension validatorExtension = getResourceUIValidatorExtension(uri);
	final IMarkerContributor markerContributor = getMarkerContributor(uri);
	final CheckMode normalAndFastMode = CheckMode.NORMAL_AND_FAST;

	for (final Pair<IStorage, IProject> pair : mapper.getStorages(uri)) {
		if (monitor.isCanceled()) {
			throw new OperationCanceledException();
		}
		if (pair.getFirst() instanceof IFile) {
			final IFile file = (IFile) pair.getFirst();

			if (delta.getNew() != null) {
				if (resourceSet == null)
					throw new IllegalArgumentException("resourceSet may not be null for changed resources.");

				final Resource resource = resourceSet.getResource(uri, true);

				if (validatorExtension != null) {
					validatorExtension.updateValidationMarkers(file, resource, normalAndFastMode, monitor);
				}
				if (markerContributor != null) {
					markerContributor.updateMarkers(file, resource, monitor);
				}
				// GAMA.getGui().getMetaDataProvider().storeMetadata(file,
				// info.getInfo(resource, file.getModificationStamp()),
				// true);
			} else {
				if (validatorExtension != null) {
					validatorExtension.deleteValidationMarkers(file, normalAndFastMode, monitor);
				} else {
					deleteAllValidationMarker(file, normalAndFastMode, monitor);
				}
				if (markerContributor != null) {
					markerContributor.deleteMarkers(file, monitor);
				} else {
					deleteAllContributedMarkers(file, monitor);
				}
			}
		}
	}

}
 
开发者ID:gama-platform,项目名称:gama,代码行数:47,代码来源:GamlMarkerUpdater.java

示例5: ValidMarkerUpdateJob

/**
 * Instantiates a new valid marker update job.
 *
 * @param name
 *          the name
 * @param fileExtensions
 *          the file extensions
 * @param resourceSet
 *          the resource set
 * @param markerCreator
 *          the marker creator
 * @param resourceDescriptions
 *          the resource descriptions
 * @param resourceServiceProvider
 *          the resource service provider
 * @param performExpensiveValidation
 *          true if expensive validation should be performed, false otherwise
 */
public ValidMarkerUpdateJob(final String name, final String fileExtensions, final ResourceSet resourceSet, final MarkerCreator markerCreator, final IResourceDescriptions resourceDescriptions, final IResourceServiceProvider resourceServiceProvider, final boolean performExpensiveValidation, final IStorage2UriMapper storage2UriMapper) {
  super(name + " " + fileExtensions); //$NON-NLS-1$

  this.fileExtensions = fileExtensions;
  this.resourceSet = resourceSet;
  this.markerCreator = markerCreator;
  this.resourceDescriptions = resourceDescriptions;
  this.resourceServiceProvider = resourceServiceProvider;
  this.performExpensiveValidation = performExpensiveValidation;
  this.checkMode = performExpensiveValidation ? CheckMode.ALL : CheckMode.NORMAL_AND_FAST;
  this.storage2UriMapper = storage2UriMapper;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:30,代码来源:ValidMarkerUpdateJob.java


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