else {
try {
final IJavaProject javaProject = JavaCore.create(file.getProject());
if (javaProject.exists()) {
IScopeContext[] scopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
ProjectScope projectScope = new ProjectScope(file.getProject());
if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
scopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
}
Map[] problems = detectProblems(javaProject, file, scopes);
for (int i = 0; i < problems.length; i++) {
ValidatorMessage message = ValidatorMessage.create(problems[i].get(IMarker.MESSAGE).toString(), resource);