本文整理汇总了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;
}
示例2: getCheckMode
/**
* @since 2.8
*/
protected CheckMode getCheckMode() {
return CheckMode.NORMAL_AND_FAST;
}
示例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;
}
示例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);
}
}
}
}
}
示例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;
}