Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java')
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java
deleted file mode 100644
index 83a95abb1e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.validation;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-
-
-/**
- * Utility class for reading fragment validation preferences/properties.
- * JSPFContentProperties does not respect the project override preference.
- *
- */
-class FragmentValidationTools {
- /**
- * @param resource
- * @return whether to perform validation on a fragment, returning the
- * project-specific preference only of project-specific values are
- * enabled
- */
- static boolean shouldValidateFragment(IResource resource) {
- String qualifier = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
-
- IProject project = null;
- if (resource.getType() == IResource.PROJECT) {
- project = (IProject) resource;
- }
- else {
- project = resource.getProject();
- }
- if (project != null) {
- IEclipsePreferences node = new ProjectScope(project).getNode(qualifier);
- // first, check whether project specific settings are to be used
- boolean useProjectSettings = node.getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false);
- if (useProjectSettings) {
- // only if so, return that value
- return node.getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
- }
- // if not, return the workspace value
- }
- return new InstanceScope().getNode(qualifier).getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
- }
-}

Back to the top