Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 422481 | Differences between
and this patch

Collapse All | Expand All

(-)a/plugins/org.eclipse.jst.j2ee.web/META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Web Plug-in
3
Bundle-Name: Web Plug-in
4
Bundle-SymbolicName: org.eclipse.jst.j2ee.web; singleton:=true
4
Bundle-SymbolicName: org.eclipse.jst.j2ee.web; singleton:=true
5
Bundle-Version: 1.1.700.qualifier
5
Bundle-Version: 1.1.701.qualifier
6
Bundle-Activator: org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin
6
Bundle-Activator: org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin
7
Bundle-Vendor: Eclipse.org
7
Bundle-Vendor: Eclipse.org
8
Bundle-Localization: plugin
8
Bundle-Localization: plugin
(-)a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java (+30 lines)
Lines 29-42 Link Here
29
import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
29
import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
30
import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
30
import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
31
import org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider;
31
import org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider;
32
import org.eclipse.jst.server.core.FacetUtil;
32
import org.eclipse.wst.common.componentcore.ComponentCore;
33
import org.eclipse.wst.common.componentcore.ComponentCore;
33
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
34
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
35
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
34
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
36
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
35
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
37
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
36
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
38
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
37
import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
39
import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
38
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
40
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
41
import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
39
import org.eclipse.wst.project.facet.ProductManager;
42
import org.eclipse.wst.project.facet.ProductManager;
43
import org.eclipse.wst.server.core.IRuntimeType;
40
44
41
import com.ibm.icu.text.UTF16;
45
import com.ibm.icu.text.UTF16;
42
import com.ibm.icu.util.StringTokenizer;
46
import com.ibm.icu.util.StringTokenizer;
Lines 106-114 Link Here
106
			return Boolean.TRUE;
110
			return Boolean.TRUE;
107
		}else if (propertyName.equals(INSTALL_WEB_LIBRARY)){
111
		}else if (propertyName.equals(INSTALL_WEB_LIBRARY)){
108
			return J2EEComponentClasspathContainerUtils.getDefaultUseWebAppLibraries();
112
			return J2EEComponentClasspathContainerUtils.getDefaultUseWebAppLibraries();
113
		} 
114
		else if (propertyName.equals(ADD_TO_EAR)) {
115
			Object result = super.getDefaultProperty(propertyName);
116
			if (result instanceof Boolean) {
117
				return ((Boolean) result).booleanValue() && isEARDefaultForRuntime();
118
			}
109
		}
119
		}
110
		return super.getDefaultProperty(propertyName);
120
		return super.getDefaultProperty(propertyName);
111
	}
121
	}
122
	
123
	private boolean isEARDefaultForRuntime() {
124
	boolean result = true;
125
	IRuntime rt = (IRuntime) model.getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
126
	if (rt != null) {
127
		IRuntimeType rtType = FacetUtil.getRuntime(rt).getRuntimeType();
128
		if (rtType.getId() != null) {
129
			for(String excluded :
130
					J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.ADD_TO_EAR_RUNTIME_EXCEPTIONS).split(",")) { //$NON-NLS-1$
131
				
132
				if (rtType.getId().equals(excluded)) {
133
					result = false;
134
					break;
135
				}
136
			}
137
		}
138
	}
139
	
140
	return result;
141
}
112
142
113
	@Override
143
	@Override
114
	public boolean propertySet(String propertyName, Object propertyValue) {
144
	public boolean propertySet(String propertyName, Object propertyValue) {
(-)a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %Bundle-Name.0
3
Bundle-Name: %Bundle-Name.0
4
Bundle-SymbolicName: org.eclipse.jst.j2ee; singleton:=true
4
Bundle-SymbolicName: org.eclipse.jst.j2ee; singleton:=true
5
Bundle-Version: 1.1.701.qualifier
5
Bundle-Version: 1.1.702.qualifier
6
Bundle-Activator: org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin
6
Bundle-Activator: org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin
7
Bundle-Vendor: %Bundle-Vendor.0
7
Bundle-Vendor: %Bundle-Vendor.0
8
Bundle-Localization: plugin
8
Bundle-Localization: plugin
(-)a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java (+6 lines)
Lines 70-75 Link Here
70
		 * @since 2.0
70
		 * @since 2.0
71
		 */
71
		 */
72
		static final String ADD_TO_EAR_BY_DEFAULT = IProductConstants.ADD_TO_EAR_BY_DEFAULT;
72
		static final String ADD_TO_EAR_BY_DEFAULT = IProductConstants.ADD_TO_EAR_BY_DEFAULT;
73
		
74
		/**
75
		 * @since 2.0
76
		 */
77
		static final String ADD_TO_EAR_RUNTIME_EXCEPTIONS = IProductConstants.ADD_TO_EAR_RUNTIME_EXCEPTIONS;
73
		/**
78
		/**
74
		 * @since 2.0
79
		 * @since 2.0
75
		 */
80
		 */
Lines 237-242 Link Here
237
		node.put(Keys.EJB_CONTENT_FOLDER, ProductManager.getProperty(IProductConstants.EJB_CONTENT_FOLDER));
242
		node.put(Keys.EJB_CONTENT_FOLDER, ProductManager.getProperty(IProductConstants.EJB_CONTENT_FOLDER));
238
		node.put(Keys.JCA_CONTENT_FOLDER, ProductManager.getProperty(IProductConstants.JCA_CONTENT_FOLDER));
243
		node.put(Keys.JCA_CONTENT_FOLDER, ProductManager.getProperty(IProductConstants.JCA_CONTENT_FOLDER));
239
		node.put(Keys.ADD_TO_EAR_BY_DEFAULT, ProductManager.getProperty(IProductConstants.ADD_TO_EAR_BY_DEFAULT));
244
		node.put(Keys.ADD_TO_EAR_BY_DEFAULT, ProductManager.getProperty(IProductConstants.ADD_TO_EAR_BY_DEFAULT));
245
		node.put(Keys.ADD_TO_EAR_RUNTIME_EXCEPTIONS, ProductManager.getProperty(IProductConstants.ADD_TO_EAR_RUNTIME_EXCEPTIONS));
240
		// done in CommonFrameworksPref..Initializer
246
		// done in CommonFrameworksPref..Initializer
241
		//node.put(Keys.OUTPUT_FOLDER, ProductManager.getProperty(IProductConstants.OUTPUT_FOLDER));
247
		//node.put(Keys.OUTPUT_FOLDER, ProductManager.getProperty(IProductConstants.OUTPUT_FOLDER));
242
		
248
		
(-)a/plugins/org.eclipse.wst.web/META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %Bundle-Name.0
3
Bundle-Name: %Bundle-Name.0
4
Bundle-SymbolicName: org.eclipse.wst.web; singleton:=true
4
Bundle-SymbolicName: org.eclipse.wst.web; singleton:=true
5
Bundle-Version: 1.1.700.qualifier
5
Bundle-Version: 1.1.701.qualifier
6
Bundle-Activator: org.eclipse.wst.web.internal.WSTWebPlugin
6
Bundle-Activator: org.eclipse.wst.web.internal.WSTWebPlugin
7
Bundle-Vendor: %Bundle-Vendor.0
7
Bundle-Vendor: %Bundle-Vendor.0
8
Bundle-Localization: plugin
8
Bundle-Localization: plugin
(-)a/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/IProductConstants.java (+1 lines)
Lines 32-37 Link Here
32
	public static final String JCA_CONTENT_FOLDER = "jcaContent"; //$NON-NLS-1$
32
	public static final String JCA_CONTENT_FOLDER = "jcaContent"; //$NON-NLS-1$
33
	public static final String DEFAULT_SOURCE_FOLDER = "defaultSource"; //$NON-NLS-1$
33
	public static final String DEFAULT_SOURCE_FOLDER = "defaultSource"; //$NON-NLS-1$
34
	public static final String ADD_TO_EAR_BY_DEFAULT = "addToEarByDefault"; //$NON-NLS-1$
34
	public static final String ADD_TO_EAR_BY_DEFAULT = "addToEarByDefault"; //$NON-NLS-1$
35
	public static final String ADD_TO_EAR_RUNTIME_EXCEPTIONS = "addToEARruntimeExceptions"; //$NON-NLS-1$
35
	public static final String OUTPUT_FOLDER = "outputFolder"; //$NON-NLS-1$
36
	public static final String OUTPUT_FOLDER = "outputFolder"; //$NON-NLS-1$
36
	public static final String USE_SINGLE_ROOT_STRUCTURE = "useSingleRootStructure"; //$NON-NLS-1$
37
	public static final String USE_SINGLE_ROOT_STRUCTURE = "useSingleRootStructure"; //$NON-NLS-1$
37
	public static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "idPerspectiveHierarchyView"; //$NON-NLS-1$
38
	public static final String ID_PERSPECTIVE_HIERARCHY_VIEW = "idPerspectiveHierarchyView"; //$NON-NLS-1$
(-)a/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/ProductManager.java (+3 lines)
Lines 34-39 Link Here
34
	private static final String JCA_CONTENT_FOLDER = "connectorModule"; //$NON-NLS-1$
34
	private static final String JCA_CONTENT_FOLDER = "connectorModule"; //$NON-NLS-1$
35
	private static final String DEFAULT_SOURCE_FOLDER = "src"; //$NON-NLS-1$
35
	private static final String DEFAULT_SOURCE_FOLDER = "src"; //$NON-NLS-1$
36
	private static final String ADD_TO_EAR_BY_DEFAULT = "false"; //$NON-NLS-1$
36
	private static final String ADD_TO_EAR_BY_DEFAULT = "false"; //$NON-NLS-1$
37
	private static final String ADD_TO_EAR_RUNTIME_EXCEPTIONS = ""; //$NON-NLS-1$
37
	private static final String OUTPUT_FOLDER = "build/classes"; //$NON-NLS-1$
38
	private static final String OUTPUT_FOLDER = "build/classes"; //$NON-NLS-1$
38
	private static final String USE_SINGLE_ROOT_STRUCTURE = "false"; //$NON-NLS-1$
39
	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$
40
	private static final String VIEWER_SYNC_FOR_WEBSERVICES = "true"; //$NON-NLS-1$
Lines 81-86 Link Here
81
				return DEFAULT_SOURCE_FOLDER;
82
				return DEFAULT_SOURCE_FOLDER;
82
			else if (key.equals(IProductConstants.ADD_TO_EAR_BY_DEFAULT))
83
			else if (key.equals(IProductConstants.ADD_TO_EAR_BY_DEFAULT))
83
				return ADD_TO_EAR_BY_DEFAULT;
84
				return ADD_TO_EAR_BY_DEFAULT;
85
			else if (key.equals(IProductConstants.ADD_TO_EAR_RUNTIME_EXCEPTIONS))
86
				return ADD_TO_EAR_RUNTIME_EXCEPTIONS;
84
			else if (key.equals(IProductConstants.USE_SINGLE_ROOT_STRUCTURE))
87
			else if (key.equals(IProductConstants.USE_SINGLE_ROOT_STRUCTURE))
85
				return USE_SINGLE_ROOT_STRUCTURE;
88
				return USE_SINGLE_ROOT_STRUCTURE;
86
			else if (key.equals(IProductConstants.VIEWER_SYNC_FOR_WEBSERVICES))
89
			else if (key.equals(IProductConstants.VIEWER_SYNC_FOR_WEBSERVICES))

Return to bug 422481