View | Details | Raw Unified | Return to bug 287452 | Differences between
and this patch

Collapse All | Expand All

(-)static_web_project/org/eclipse/wst/project/facet/ProductManager.java (+3 lines)
Lines 38-43 Link Here
38
	private static final String USE_SINGLE_ROOT_STRUCTURE = "false"; //$NON-NLS-1$
38
	private static final String USE_SINGLE_ROOT_STRUCTURE = "false"; //$NON-NLS-1$
39
	private static final String VIEWER_SYNC_FOR_WEBSERVICES = "true"; //$NON-NLS-1$
39
	private static final String VIEWER_SYNC_FOR_WEBSERVICES = "true"; //$NON-NLS-1$
40
	private static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
40
	private static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
41
	private static final String SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = "true"; //$NON-NLS-1$
41
	private static final String FINAL_PERSPECTIVE = "org.eclipse.jst.j2ee.J2EEPerspective"; //$NON-NLS-1$
42
	private static final String FINAL_PERSPECTIVE = "org.eclipse.jst.j2ee.J2EEPerspective"; //$NON-NLS-1$
42
	private static final char RUNTIME_SEPARATOR = ':';
43
	private static final char RUNTIME_SEPARATOR = ':';
43
	private static final String[] DEFAULT_RUNTIME_KEYS = 
44
	private static final String[] DEFAULT_RUNTIME_KEYS = 
Lines 95-100 Link Here
95
				return FINAL_PERSPECTIVE;
96
				return FINAL_PERSPECTIVE;
96
			else if (key.equals(IProductConstants.FINAL_PERSPECTIVE_WEB))
97
			else if (key.equals(IProductConstants.FINAL_PERSPECTIVE_WEB))
97
				return FINAL_PERSPECTIVE;
98
				return FINAL_PERSPECTIVE;
99
			else if (key.equals(IProductConstants.SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE))
100
				return SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE;
98
		}
101
		}
99
		return value;
102
		return value;
100
	}
103
	}
(-)static_web_project/org/eclipse/wst/project/facet/IProductConstants.java (+1 lines)
Lines 32-37 Link Here
32
	public static final String OUTPUT_FOLDER = "outputFolder"; //$NON-NLS-1$
32
	public static final String OUTPUT_FOLDER = "outputFolder"; //$NON-NLS-1$
33
	public static final String USE_SINGLE_ROOT_STRUCTURE = "useSingleRootStructure"; //$NON-NLS-1$
33
	public static final String USE_SINGLE_ROOT_STRUCTURE = "useSingleRootStructure"; //$NON-NLS-1$
34
	public static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "idPerspectiveHierarchyView"; //$NON-NLS-1$
34
	public static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "idPerspectiveHierarchyView"; //$NON-NLS-1$
35
	public static final String SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = "showJavaEEModuleDependencyPage"; //$NON-NLS-1$
35
	
36
	
36
	/**
37
	/**
37
     * Alters the final perspective used by the following new project wizards
38
     * Alters the final perspective used by the following new project wizards
(-)j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java (+8 lines)
Lines 108-113 Link Here
108
		 * @since 3.0
108
		 * @since 3.0
109
		 */
109
		 */
110
		static String ID_PERSPECTIVE_HIERARCHY_VIEW = "perspective_hierarchy_view_id"; //$NON-NLS-1$
110
		static String ID_PERSPECTIVE_HIERARCHY_VIEW = "perspective_hierarchy_view_id"; //$NON-NLS-1$
111
		/**
112
		 * @since 3.1
113
		 */
114
		static String SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = "showJavaEEModuleDependencyPage"; //$NON-NLS-1$
111
115
112
	}
116
	}
113
117
Lines 152-157 Link Here
152
		final static boolean USE_EAR_LIBRARIES_JDT_EXPORT = false;
156
		final static boolean USE_EAR_LIBRARIES_JDT_EXPORT = false;
153
		final static String ID_PERSPECTIVE_HIERARCHY_VIEW = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
157
		final static String ID_PERSPECTIVE_HIERARCHY_VIEW = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
154
		final static boolean ALLOW_CLASSPATH_DEP = true;
158
		final static boolean ALLOW_CLASSPATH_DEP = true;
159
		final static boolean SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = true;
155
	}
160
	}
156
161
157
	private Plugin owner = null;
162
	private Plugin owner = null;
Lines 198-203 Link Here
198
		String perspectiveID = ProductManager.getProperty(IProductConstants.ID_PERSPECTIVE_HIERARCHY_VIEW);
203
		String perspectiveID = ProductManager.getProperty(IProductConstants.ID_PERSPECTIVE_HIERARCHY_VIEW);
199
		getPreferences().setDefault(Keys.ID_PERSPECTIVE_HIERARCHY_VIEW, (perspectiveID != null) ? perspectiveID : Defaults.ID_PERSPECTIVE_HIERARCHY_VIEW);
204
		getPreferences().setDefault(Keys.ID_PERSPECTIVE_HIERARCHY_VIEW, (perspectiveID != null) ? perspectiveID : Defaults.ID_PERSPECTIVE_HIERARCHY_VIEW);
200
		getPreferences().setDefault(Keys.ALLOW_CLASSPATH_DEP, Defaults.ALLOW_CLASSPATH_DEP);
205
		getPreferences().setDefault(Keys.ALLOW_CLASSPATH_DEP, Defaults.ALLOW_CLASSPATH_DEP);
206
		String showJavaEEModuleDependencyPage = ProductManager.getProperty(IProductConstants.SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE);
207
		boolean showJavaEEModuleDependencyPageDefault = (showJavaEEModuleDependencyPage != null) ? Boolean.parseBoolean(showJavaEEModuleDependencyPage) : Defaults.SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE;
208
		getPreferences().setDefault(Keys.SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE, showJavaEEModuleDependencyPageDefault);
201
	}
209
	}
202
210
203
	
211
	
(-)plugin.xml (-3 / +7 lines)
Lines 750-758 Link Here
750
      properties="projectFacet"
750
      properties="projectFacet"
751
      class="org.eclipse.jst.j2ee.internal.common.FacetedProjectPropertyTester">
751
      class="org.eclipse.jst.j2ee.internal.common.FacetedProjectPropertyTester">
752
    </propertyTester>
752
    </propertyTester>
753
  </extension>
753
    <propertyTester
754
  
754
      id="org.eclipse.jst.j2ee.internal.common.WtpPreferencePropertyTester"
755
  <extension point="org.eclipse.core.expressions.propertyTesters">
755
      type="org.eclipse.core.resources.IProject"
756
      namespace="org.eclipse.jst.j2ee"
757
      properties="preferenceId"
758
      class="org.eclipse.jst.j2ee.internal.common.J2EEPreferencePropertyTester">
759
    </propertyTester>
756
	<propertyTester
760
	<propertyTester
757
  		id="org.eclipse.jst.j2ee.internal.provider.FacetedProjectPropertyTester"
761
  		id="org.eclipse.jst.j2ee.internal.provider.FacetedProjectPropertyTester"
758
  		type="org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider"
762
  		type="org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider"
(-)common/org/eclipse/jst/j2ee/internal/common/J2EEPreferencePropertyTester.java (+30 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.jst.j2ee.internal.common;
12
13
import org.eclipse.core.expressions.PropertyTester;
14
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
15
16
public final class J2EEPreferencePropertyTester extends PropertyTester
17
18
{
19
	/**
20
	 * Test to see if the @param value preference is set to true in @link J2EEPreferences 
21
	 */
22
	public boolean test( final Object receiver, 
23
						final String property, 
24
						final Object[] args, 
25
						final Object value )
26
	{
27
		return Boolean.parseBoolean(J2EEPlugin.getDefault().getJ2EEPreferences().getString(value.toString()));
28
	}
29
30
}
(-)plugin.xml (+3 lines)
Lines 507-512 Link Here
507
			<and>
507
			<and>
508
				<adapt
508
				<adapt
509
					type="org.eclipse.core.resources.IProject">
509
					type="org.eclipse.core.resources.IProject">
510
					<test forcePluginActivation="true"
511
							property="org.eclipse.jst.j2ee.preferenceId"
512
							value="showJavaEEModuleDependencyPage" />
510
					<or> 
513
					<or> 
511
						<test forcePluginActivation="true"
514
						<test forcePluginActivation="true"
512
							property="org.eclipse.wst.common.project.facet.core.projectFacet"
515
							property="org.eclipse.wst.common.project.facet.core.projectFacet"

Return to bug 287452