Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 145977 Details for
Bug 287452
[hotbug] Make Java EE Module Dependencies page optional
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Add a product preference, too
bug287452.patch2 (text/plain), 7.92 KB, created by
Carl Anderson
on 2009-08-28 15:15:26 EDT
(
hide
)
Description:
Add a product preference, too
Filename:
MIME Type:
Creator:
Carl Anderson
Created:
2009-08-28 15:15:26 EDT
Size:
7.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.web >Index: static_web_project/org/eclipse/wst/project/facet/ProductManager.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/ProductManager.java,v >retrieving revision 1.10 >diff -u -r1.10 ProductManager.java >--- static_web_project/org/eclipse/wst/project/facet/ProductManager.java 11 Nov 2008 13:55:45 -0000 1.10 >+++ static_web_project/org/eclipse/wst/project/facet/ProductManager.java 28 Aug 2009 19:15:55 -0000 >@@ -38,6 +38,7 @@ > private static final String USE_SINGLE_ROOT_STRUCTURE = "false"; //$NON-NLS-1$ > private static final String VIEWER_SYNC_FOR_WEBSERVICES = "true"; //$NON-NLS-1$ > private static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$ >+ private static final String SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = "true"; //$NON-NLS-1$ > private static final String FINAL_PERSPECTIVE = "org.eclipse.jst.j2ee.J2EEPerspective"; //$NON-NLS-1$ > private static final char RUNTIME_SEPARATOR = ':'; > private static final String[] DEFAULT_RUNTIME_KEYS = >@@ -95,6 +96,8 @@ > return FINAL_PERSPECTIVE; > else if (key.equals(IProductConstants.FINAL_PERSPECTIVE_WEB)) > return FINAL_PERSPECTIVE; >+ else if (key.equals(IProductConstants.SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE)) >+ return SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE; > } > return value; > } >Index: static_web_project/org/eclipse/wst/project/facet/IProductConstants.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/IProductConstants.java,v >retrieving revision 1.9 >diff -u -r1.9 IProductConstants.java >--- static_web_project/org/eclipse/wst/project/facet/IProductConstants.java 11 Nov 2008 13:55:45 -0000 1.9 >+++ static_web_project/org/eclipse/wst/project/facet/IProductConstants.java 28 Aug 2009 19:15:55 -0000 >@@ -32,6 +32,7 @@ > public static final String OUTPUT_FOLDER = "outputFolder"; //$NON-NLS-1$ > public static final String USE_SINGLE_ROOT_STRUCTURE = "useSingleRootStructure"; //$NON-NLS-1$ > public static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "idPerspectiveHierarchyView"; //$NON-NLS-1$ >+ public static final String SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = "showJavaEEModuleDependencyPage"; //$NON-NLS-1$ > > /** > * Alters the final perspective used by the following new project wizards >#P org.eclipse.jst.j2ee >Index: j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java,v >retrieving revision 1.12 >diff -u -r1.12 J2EEPreferences.java >--- j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java 22 Apr 2009 19:14:54 -0000 1.12 >+++ j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java 28 Aug 2009 19:15:56 -0000 >@@ -108,6 +108,10 @@ > * @since 3.0 > */ > static String ID_PERSPECTIVE_HIERARCHY_VIEW = "perspective_hierarchy_view_id"; //$NON-NLS-1$ >+ /** >+ * @since 3.1 >+ */ >+ static String SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = "showJavaEEModuleDependencyPage"; //$NON-NLS-1$ > > } > >@@ -152,6 +156,7 @@ > 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; >+ final static boolean SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE = true; > } > > private Plugin owner = null; >@@ -198,6 +203,9 @@ > 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); >+ String showJavaEEModuleDependencyPage = ProductManager.getProperty(IProductConstants.SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE); >+ boolean showJavaEEModuleDependencyPageDefault = (showJavaEEModuleDependencyPage != null) ? Boolean.parseBoolean(showJavaEEModuleDependencyPage) : Defaults.SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE; >+ getPreferences().setDefault(Keys.SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE, showJavaEEModuleDependencyPageDefault); > } > > >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/plugin.xml,v >retrieving revision 1.128.2.1 >diff -u -r1.128.2.1 plugin.xml >--- plugin.xml 1 Jul 2009 02:51:44 -0000 1.128.2.1 >+++ plugin.xml 28 Aug 2009 19:15:56 -0000 >@@ -750,9 +750,13 @@ > properties="projectFacet" > class="org.eclipse.jst.j2ee.internal.common.FacetedProjectPropertyTester"> > </propertyTester> >- </extension> >- >- <extension point="org.eclipse.core.expressions.propertyTesters"> >+ <propertyTester >+ id="org.eclipse.jst.j2ee.internal.common.WtpPreferencePropertyTester" >+ type="org.eclipse.core.resources.IProject" >+ namespace="org.eclipse.jst.j2ee" >+ properties="preferenceId" >+ class="org.eclipse.jst.j2ee.internal.common.J2EEPreferencePropertyTester"> >+ </propertyTester> > <propertyTester > id="org.eclipse.jst.j2ee.internal.provider.FacetedProjectPropertyTester" > type="org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider" >Index: common/org/eclipse/jst/j2ee/internal/common/J2EEPreferencePropertyTester.java >=================================================================== >RCS file: common/org/eclipse/jst/j2ee/internal/common/J2EEPreferencePropertyTester.java >diff -N common/org/eclipse/jst/j2ee/internal/common/J2EEPreferencePropertyTester.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ common/org/eclipse/jst/j2ee/internal/common/J2EEPreferencePropertyTester.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 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.j2ee.internal.common; >+ >+import org.eclipse.core.expressions.PropertyTester; >+import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin; >+ >+public final class J2EEPreferencePropertyTester extends PropertyTester >+ >+{ >+ /** >+ * Test to see if the @param value preference is set to true in @link J2EEPreferences >+ */ >+ public boolean test( final Object receiver, >+ final String property, >+ final Object[] args, >+ final Object value ) >+ { >+ return Boolean.parseBoolean(J2EEPlugin.getDefault().getJ2EEPreferences().getString(value.toString())); >+ } >+ >+} >#P org.eclipse.jst.j2ee.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.ui/plugin.xml,v >retrieving revision 1.129 >diff -u -r1.129 plugin.xml >--- plugin.xml 12 Mar 2009 00:28:00 -0000 1.129 >+++ plugin.xml 28 Aug 2009 19:15:56 -0000 >@@ -507,6 +507,9 @@ > <and> > <adapt > type="org.eclipse.core.resources.IProject"> >+ <test forcePluginActivation="true" >+ property="org.eclipse.jst.j2ee.preferenceId" >+ value="showJavaEEModuleDependencyPage" /> > <or> > <test forcePluginActivation="true" > property="org.eclipse.wst.common.project.facet.core.projectFacet"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 287452
:
145789
| 145977