// might be called with just project path?
currentFile = wsRoot.getFile(new Path(uris[i]));
if (currentFile != null && currentFile.exists()) {
if (shouldValidate(currentFile) && fragmentCheck(currentFile)) {
Message message = new LocalizedMessage(IMessage.LOW_SEVERITY, uris[i]);
reporter.displaySubtask(this, message);
validateFile(currentFile, reporter);
}
if (DEBUG)
System.out.println("validating: [" + uris[i] + "]"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
else {
// if uris[] length 0 -> validate() gets called for each project
if (helper instanceof IWorkbenchContext) {
IProject project = ((IWorkbenchContext) helper).getProject();
JSPFileVisitor visitor = new JSPFileVisitor(reporter);
try {
// collect all jsp files for the project
project.accept(visitor, IResource.DEPTH_INFINITE);
}
catch (CoreException e) {
if (DEBUG)
e.printStackTrace();
}
IFile[] files = visitor.getFiles();
for (int i = 0; i < files.length && !reporter.isCancelled(); i++) {
if (shouldValidate(files[i]) && fragmentCheck(files[i])) {
int percent = (i * 100) / files.length + 1;
Message message = new LocalizedMessage(IMessage.LOW_SEVERITY, percent + "% " + files[i].getFullPath().toString());
reporter.displaySubtask(this, message);
validateFile(files[i], reporter);
}
if (DEBUG)