private int getProblemSeverity(String key, IScopeContext[] contexts) {
return Platform.getPreferencesService().getInt(PREFERENCE_NODE_QUALIFIER, key, IMessage.NORMAL_SEVERITY, contexts);
}
private IScopeContext[] getScopeContexts(IStructuredDocument document) {
IScopeContext[] scopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
final IFile file = getFile(document);
if (file != null && file.exists()) {
final IProject project = file.getProject();
if (project.exists()) {
ProjectScope projectScope = new ProjectScope(project);
if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
scopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
}
}
}
return scopes;
}