use of org.eclipse.wst.validation.internal.operations.IWorkbenchContext in project webtools.sourceediting by eclipse.
the class StreamingMarkupValidator method validateProject.
private void validateProject(IValidationContext helper, final IReporter reporter) {
// if uris[] length 0 -> validate() gets called for each project
if (helper instanceof IWorkbenchContext) {
IProject project = ((IWorkbenchContext) helper).getProject();
IResourceProxyVisitor visitor = new IResourceProxyVisitor() {
public boolean visit(IResourceProxy proxy) throws CoreException {
if (shouldValidate(proxy)) {
validateFile((IFile) proxy.requestResource(), reporter);
}
return true;
}
};
try {
// collect all jsp files for the project
project.accept(visitor, IResource.DEPTH_INFINITE);
} catch (CoreException e) {
Logger.logException(e);
}
}
}
use of org.eclipse.wst.validation.internal.operations.IWorkbenchContext in project webtools.sourceediting by eclipse.
the class JSDTSourceValidator method validateFull.
/**
*/
private void validateFull(IValidationContext helper, IReporter reporter) {
IProject project = null;
String[] fileDelta = helper.getURIs();
if (helper instanceof IWorkbenchContext) {
IWorkbenchContext wbHelper = (IWorkbenchContext) helper;
project = wbHelper.getProject();
} else if (fileDelta.length > 0) {
// won't work for project validation (b/c nothing in file delta)
project = getResource(fileDelta[0]).getProject();
}
if (project == null)
return;
validateContainer(helper, reporter, project);
}
use of org.eclipse.wst.validation.internal.operations.IWorkbenchContext in project webtools.sourceediting by eclipse.
the class JSONSyntaxValidator method validateProject.
private void validateProject(IValidationContext helper, final IReporter reporter) {
// if uris[] length 0 -> validate() gets called for each project
if (helper instanceof IWorkbenchContext) {
IProject project = ((IWorkbenchContext) helper).getProject();
IResourceProxyVisitor visitor = new IResourceProxyVisitor() {
public boolean visit(IResourceProxy proxy) throws CoreException {
if (shouldValidate(proxy)) {
validateFile((IFile) proxy.requestResource(), reporter);
}
return true;
}
};
try {
// collect all jsp files for the project
project.accept(visitor, IResource.DEPTH_INFINITE);
} catch (CoreException e) {
Logger.logException(e);
}
}
}
use of org.eclipse.wst.validation.internal.operations.IWorkbenchContext in project webtools.sourceediting by eclipse.
the class MarkupValidator method validateV1Project.
/**
* @param helper
* @param reporter
*/
private void validateV1Project(IValidationContext helper, final IReporter reporter) {
// if uris[] length 0 -> validate() gets called for each project
if (helper instanceof IWorkbenchContext) {
IProject project = ((IWorkbenchContext) helper).getProject();
IResourceProxyVisitor visitor = new IResourceProxyVisitor() {
public boolean visit(IResourceProxy proxy) throws CoreException {
if (shouldValidate(proxy)) {
validateV1File((IFile) proxy.requestResource(), reporter);
}
return true;
}
};
try {
// collect all jsp files for the project
project.accept(visitor, IResource.DEPTH_INFINITE);
} catch (CoreException e) {
Logger.logException(e);
}
}
}
Aggregations