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/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.800.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/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/JavaEEBinaryComponentHelper.java (-1 lines)
Lines 18-24 Link Here
18
import java.util.Iterator;
18
import java.util.Iterator;
19
import java.util.LinkedHashMap;
19
import java.util.LinkedHashMap;
20
import java.util.Map;
20
import java.util.Map;
21
import java.util.Map.Entry;
22
import java.util.Set;
21
import java.util.Set;
23
import java.util.zip.ZipException;
22
import java.util.zip.ZipException;
24
23
(-)a/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/J2EEModuleFacetInstallDataModelProvider.java (-3 / +25 lines)
Lines 105-111 Link Here
105
		if (propertyName.equals(PROHIBIT_ADD_TO_EAR)) {
105
		if (propertyName.equals(PROHIBIT_ADD_TO_EAR)) {
106
			return Boolean.FALSE;
106
			return Boolean.FALSE;
107
		} else if (propertyName.equals(ADD_TO_EAR)) {
107
		} else if (propertyName.equals(ADD_TO_EAR)) {
108
			return new Boolean( J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.ADD_TO_EAR_BY_DEFAULT) && isEARSupportedByRuntime());
108
			return new Boolean( J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.ADD_TO_EAR_BY_DEFAULT) 
109
					&& isEARSupportedByRuntime() && isEARDefaultForRuntime());
109
		} else if (propertyName.equals(EAR_PROJECT_NAME)) {
110
		} else if (propertyName.equals(EAR_PROJECT_NAME)) {
110
			DataModelPropertyDescriptor[] descs = getValidPropertyDescriptors(EAR_PROJECT_NAME);
111
			DataModelPropertyDescriptor[] descs = getValidPropertyDescriptors(EAR_PROJECT_NAME);
111
			if (model.isPropertySet(LAST_EAR_NAME)) {
112
			if (model.isPropertySet(LAST_EAR_NAME)) {
Lines 274-280 Link Here
274
	@Override
275
	@Override
275
	public boolean isPropertyEnabled(String propertyName) {
276
	public boolean isPropertyEnabled(String propertyName) {
276
		if (ADD_TO_EAR.equals(propertyName)) {
277
		if (ADD_TO_EAR.equals(propertyName)) {
277
			return !getBooleanProperty(PROHIBIT_ADD_TO_EAR) && isEARSupportedByRuntime();
278
			return !getBooleanProperty(PROHIBIT_ADD_TO_EAR) && isEARSupportedByRuntime() && isEARDefaultForRuntime();
278
		}
279
		}
279
		if (EAR_PROJECT_NAME.equals(propertyName)) {
280
		if (EAR_PROJECT_NAME.equals(propertyName)) {
280
			return !getBooleanProperty(PROHIBIT_ADD_TO_EAR) && isEARSupportedByRuntime() && getBooleanProperty(ADD_TO_EAR);
281
			return !getBooleanProperty(PROHIBIT_ADD_TO_EAR) && isEARSupportedByRuntime() && getBooleanProperty(ADD_TO_EAR);
Lines 372-381 Link Here
372
	private boolean isEARSupportedByRuntime() {
373
	private boolean isEARSupportedByRuntime() {
373
		boolean ret = true;
374
		boolean ret = true;
374
		IRuntime rt = (IRuntime) model.getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
375
		IRuntime rt = (IRuntime) model.getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
375
		if (rt != null)
376
		
377
		if (rt != null) { 
376
			ret = rt.supports(IJ2EEFacetConstants.ENTERPRISE_APPLICATION_FACET);
378
			ret = rt.supports(IJ2EEFacetConstants.ENTERPRISE_APPLICATION_FACET);
379
		}
380
			
377
		return ret;
381
		return ret;
378
	}
382
	}
383
	
384
	private boolean isEARDefaultForRuntime() {
385
		boolean result = true;
386
		IRuntime rt = (IRuntime) model.getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
387
		
388
		
389
		if (rt != null && rt.getName() != null) {
390
			for(String excluded :
391
					J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.ADD_TO_EAR_RUNTIME_EXCLUSIONS).split(",")) { //$NON-NLS-1$
392
				if (rt.getName().equals(excluded)) {
393
					result = false;
394
					break;
395
				}
396
			}
397
		}
398
		
399
		return result;
400
	}
379
401
380
    @Override
402
    @Override
381
    protected int convertFacetVersionToJ2EEVersion( IProjectFacetVersion version )
403
    protected int convertFacetVersionToJ2EEVersion( IProjectFacetVersion version )
(-)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_EXCLUSIONS = IProductConstants.ADD_TO_EAR_RUNTIME_EXCLUSIONS;
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_EXCLUSIONS, ProductManager.getProperty(IProductConstants.ADD_TO_EAR_RUNTIME_EXCLUSIONS));
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/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_EXCLUSIONS = "addToEARruntimeExclusions"; //$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_EXCLUSIONS = ""; //$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_EXCLUSIONS))
86
				return ADD_TO_EAR_RUNTIME_EXCLUSIONS;
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