[273273] Need a preference hook for allowing loose classpath module dependencies
diff --git a/plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyEnablement.java b/plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyEnablement.java
index 8abc9a4..f827ed9 100644
--- a/plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyEnablement.java
+++ b/plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyEnablement.java
@@ -10,6 +10,9 @@
  *******************************************************************************/
 package org.eclipse.jst.j2ee.internal.classpathdep;
 
+import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
+import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
+
 public class ClasspathDependencyEnablement {
 
 	/**
@@ -17,14 +20,14 @@
 	 * functionality.  The default value is true which enables this functionality.
 	 * Setting this value to false will disable the functionality.
 	 */
-	private static boolean allowClasspathComponentDependnecy = true;
+	private static boolean allowClasspathComponentDependency = J2EEPlugin.getDefault().getPluginPreferences().getBoolean(J2EEPreferences.Keys.ALLOW_CLASSPATH_DEP);
 	
 	public static void setAllowClasspathComponentDependency(boolean allow){
-		allowClasspathComponentDependnecy = allow;
+		allowClasspathComponentDependency = allow;
 	}
 	
 	public static boolean isAllowClasspathComponentDependency(){
-		return allowClasspathComponentDependnecy;
+		return allowClasspathComponentDependency;
 	}
 	
 }
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
index 073718e..c17af38 100644
--- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
+++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
@@ -50,7 +50,8 @@
 		final static String USE_EAR_LIBRARIES = "org.eclipse.jst.j2ee.preferences.useEARLibraries";//$NON-NLS-1$
 		final static String USE_WEB_APP_LIBRARIES = "org.eclipse.jst.j2ee.preferences.useWebAppLibraries";//$NON-NLS-1$
 		final static String USE_EAR_LIBRARIES_JDT_EXPORT = "org.eclipse.jst.j2ee.preferences.useEARLibrariesJDTExport";//$NON-NLS-1$
-		
+		final static String ALLOW_CLASSPATH_DEP = "org.eclipse.jst.j2ee.preferences.allowClasspathDep";//$NON-NLS-1$
+
 		/**
 		 * @deprecated, 
 		 * but should it be deprecated ? is j2ee_web_content a better name than web_content_folder ?
@@ -150,6 +151,7 @@
 		final static boolean INCREMENTAL_DEPLOYMENT_SUPPORT = true;
 		final static boolean USE_EAR_LIBRARIES_JDT_EXPORT = false;
 		final static String ID_PERSPECTIVE_HIERARCHY_VIEW = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
+		final static boolean ALLOW_CLASSPATH_DEP = true;
 	}
 
 	private Plugin owner = null;
@@ -195,6 +197,7 @@
 		getPreferences().setDefault(Keys.USE_EAR_LIBRARIES_JDT_EXPORT, Defaults.USE_EAR_LIBRARIES_JDT_EXPORT);
 		String perspectiveID = ProductManager.getProperty(IProductConstants.ID_PERSPECTIVE_HIERARCHY_VIEW);
 		getPreferences().setDefault(Keys.ID_PERSPECTIVE_HIERARCHY_VIEW, (perspectiveID != null) ? perspectiveID : Defaults.ID_PERSPECTIVE_HIERARCHY_VIEW);
+		getPreferences().setDefault(Keys.ALLOW_CLASSPATH_DEP, Defaults.ALLOW_CLASSPATH_DEP);
 	}
 
 	
@@ -233,7 +236,15 @@
 		getPreferences().setValue(Keys.USE_WEB_APP_LIBRARIES, value);
 		firePreferenceChanged();
 	}
-			
+	
+	public boolean getAllowClasspathDep() {
+		return getPreferences().getBoolean(Keys.ALLOW_CLASSPATH_DEP);
+	}
+	
+	public void setAllowClasspathDep(boolean value) {
+		getPreferences().setValue(Keys.ALLOW_CLASSPATH_DEP, value);
+		firePreferenceChanged();
+	}
 	
 	public String getJ2EEWebContentFolderName() {
 		//return getPreferences().getString(Keys.J2EE_WEB_CONTENT);