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

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/core/PDECoreMessages.java (+6 lines)
Lines 226-231 Link Here
226
	public static String BuildErrorReporter_missingFolder;
226
	public static String BuildErrorReporter_missingFolder;
227
	public static String BuildErrorReporter_emptyEntry;
227
	public static String BuildErrorReporter_emptyEntry;
228
	public static String BuildErrorReporter_binIncludesMissing;
228
	public static String BuildErrorReporter_binIncludesMissing;
229
	public static String BuildErrorReporter_buildEntryInvalidWhenNoProjectSettings;
230
231
	public static String BuildErrorReporter_buildEntryMissingProjectSpecificSettings;
232
233
	public static String BuildErrorReporter_buildEntryMissingValidPath;
234
229
	public static String BuildErrorReporter_sourceMissing;
235
	public static String BuildErrorReporter_sourceMissing;
230
236
231
	public static String BuildErrorReporter_srcIncludesSourceFolder;
237
	public static String BuildErrorReporter_srcIncludesSourceFolder;
(-)src/org/eclipse/pde/internal/core/PreferenceInitializer.java (+2 lines)
Lines 62-67 Link Here
62
		prefs.putInt(CompilerFlags.P_UNKNOWN_RESOURCE, CompilerFlags.WARNING);
62
		prefs.putInt(CompilerFlags.P_UNKNOWN_RESOURCE, CompilerFlags.WARNING);
63
		prefs.putInt(CompilerFlags.P_UNKNOWN_IDENTIFIER, CompilerFlags.WARNING);
63
		prefs.putInt(CompilerFlags.P_UNKNOWN_IDENTIFIER, CompilerFlags.WARNING);
64
		prefs.putInt(CompilerFlags.P_NOT_EXTERNALIZED, CompilerFlags.IGNORE);
64
		prefs.putInt(CompilerFlags.P_NOT_EXTERNALIZED, CompilerFlags.IGNORE);
65
65
		prefs.putInt(CompilerFlags.P_BUILD, CompilerFlags.WARNING);
66
		prefs.putInt(CompilerFlags.P_BUILD, CompilerFlags.WARNING);
66
		prefs.putInt(CompilerFlags.P_BUILD_MISSING_OUTPUT, CompilerFlags.IGNORE);
67
		prefs.putInt(CompilerFlags.P_BUILD_MISSING_OUTPUT, CompilerFlags.IGNORE);
67
		prefs.putInt(CompilerFlags.P_BUILD_SOURCE_LIBRARY, CompilerFlags.WARNING);
68
		prefs.putInt(CompilerFlags.P_BUILD_SOURCE_LIBRARY, CompilerFlags.WARNING);
Lines 69-74 Link Here
69
		prefs.putInt(CompilerFlags.P_BUILD_SRC_INCLUDES, CompilerFlags.WARNING);
70
		prefs.putInt(CompilerFlags.P_BUILD_SRC_INCLUDES, CompilerFlags.WARNING);
70
		prefs.putInt(CompilerFlags.P_BUILD_BIN_INCLUDES, CompilerFlags.WARNING);
71
		prefs.putInt(CompilerFlags.P_BUILD_BIN_INCLUDES, CompilerFlags.WARNING);
71
		prefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPLIANCE, CompilerFlags.WARNING);
72
		prefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPLIANCE, CompilerFlags.WARNING);
73
		prefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPILER, CompilerFlags.WARNING);
72
74
73
		prefs.putInt(CompilerFlags.P_INCOMPATIBLE_ENV, CompilerFlags.WARNING);
75
		prefs.putInt(CompilerFlags.P_INCOMPATIBLE_ENV, CompilerFlags.WARNING);
74
		prefs.putInt(CompilerFlags.P_MISSING_EXPORT_PKGS, CompilerFlags.IGNORE);
76
		prefs.putInt(CompilerFlags.P_MISSING_EXPORT_PKGS, CompilerFlags.IGNORE);
(-)src/org/eclipse/pde/internal/core/pderesources.properties (-2 / +5 lines)
Lines 89-94 Link Here
89
Builders_Manifest_deprecated_element = Element ''{0}'' is deprecated
89
Builders_Manifest_deprecated_element = Element ''{0}'' is deprecated
90
Builders_Manifest_internal_rootElement = Access to extension point ''{0}'' is discouraged 
90
Builders_Manifest_internal_rootElement = Access to extension point ''{0}'' is discouraged 
91
BuildErrorReporter_binIncludesMissing=An entry for {0} is required in bin.includes
91
BuildErrorReporter_binIncludesMissing=An entry for {0} is required in bin.includes
92
BuildErrorReporter_buildEntryInvalidWhenNoProjectSettings=The ''{0}'' build entry should not be set when there are no project specific compiler settings
93
BuildErrorReporter_buildEntryMissingProjectSpecificSettings=The ''{0}'' build entry should be set when there are project specific compiler settings
94
BuildErrorReporter_buildEntryMissingValidPath=The ''{0}'' build entry does not contain a path to an existing properties file
92
BuildErrorReporter_entiresMustRefDirs={0}: entries ending in / must reference directories
95
BuildErrorReporter_entiresMustRefDirs={0}: entries ending in / must reference directories
93
Builders_Manifest_deprecated_rootElement = The extension point ''{0}'' is deprecated
96
Builders_Manifest_deprecated_rootElement = The extension point ''{0}'' is deprecated
94
BuildErrorReporter_classpathEntryMissing={0} is not included in any "source.*" build entry
97
BuildErrorReporter_classpathEntryMissing={0} is not included in any "source.*" build entry
Lines 117-124 Link Here
117
BuildErrorReporter_emptyEntry=Build entries must contain at least one value
120
BuildErrorReporter_emptyEntry=Build entries must contain at least one value
118
BuildErrorReporter_GeneratedClassFilesCompatibility=Generated .class files compatibility
121
BuildErrorReporter_GeneratedClassFilesCompatibility=Generated .class files compatibility
119
BuildErrorReporter_missingFile=The file "{0}" does not exist in the workspace
122
BuildErrorReporter_missingFile=The file "{0}" does not exist in the workspace
120
BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken=The ''{0}'' build entry does not match the ''{1}'' project setting
123
BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken=The ''{0}'' build entry does not match the current project Java compliance settings
121
BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry=There is no ''{0}'' build entry and the project specific ''{1}'' setting has been set
124
BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry=There is no ''{0}'' build entry and the project has Java compliance preferences set
122
BuildErrorReporter_SourceCompatibility=Source compatibility
125
BuildErrorReporter_SourceCompatibility=Source compatibility
123
126
124
BundleErrorReporter_lineTooLong = The line is too long
127
BundleErrorReporter_lineTooLong = The line is too long
(-)src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java (-61 / +215 lines)
Lines 44-50 Link Here
44
44
45
	private static final String DEF_SOURCE_ENTRY = PROPERTY_SOURCE_PREFIX + '.';
45
	private static final String DEF_SOURCE_ENTRY = PROPERTY_SOURCE_PREFIX + '.';
46
	private static final String[] RESERVED_NAMES = new String[] {"meta-inf", "osgi-inf", ICoreConstants.BUILD_FILENAME_DESCRIPTOR, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR, "plugin.properties"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
46
	private static final String[] RESERVED_NAMES = new String[] {"meta-inf", "osgi-inf", ICoreConstants.BUILD_FILENAME_DESCRIPTOR, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR, "plugin.properties"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
47
	private static final String JAVAC_WARNINGS_ENTRY = PROPERTY_JAVAC_WARNINGS_PREFIX + '.';
47
48
	private static final String ASSERT_IDENTIFIER = "assertIdentifier"; //$NON-NLS-1$
48
	private static final String ASSERT_IDENTIFIER = "assertIdentifier"; //$NON-NLS-1$
49
	private static final String ENUM_IDENTIFIER = "enumIdentifier"; //$NON-NLS-1$
49
	private static final String ENUM_IDENTIFIER = "enumIdentifier"; //$NON-NLS-1$
50
50
Lines 106-112 Link Here
106
	protected ArrayList fProblemList = new ArrayList();
106
	protected ArrayList fProblemList = new ArrayList();
107
	protected int fBuildSeverity;
107
	protected int fBuildSeverity;
108
	protected int fClasspathSeverity;
108
	protected int fClasspathSeverity;
109
	protected int fJavaComplSeverity;
109
	protected int fJavaComplianceSeverity;
110
	protected int fJavaCompilerSeverity;
110
	protected int fSrcInclSeverity;
111
	protected int fSrcInclSeverity;
111
	protected int fBinInclSeverity;
112
	protected int fBinInclSeverity;
112
	protected int fMissingOutputLibSeverity;
113
	protected int fMissingOutputLibSeverity;
Lines 120-126 Link Here
120
		fMissingOutputLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_MISSING_OUTPUT);
121
		fMissingOutputLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_MISSING_OUTPUT);
121
		fSrcLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_SOURCE_LIBRARY);
122
		fSrcLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_SOURCE_LIBRARY);
122
		fOututLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_OUTPUT_LIBRARY);
123
		fOututLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_OUTPUT_LIBRARY);
123
		fJavaComplSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_JAVA_COMPLIANCE);
124
		fJavaComplianceSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_JAVA_COMPLIANCE);
125
		fJavaCompilerSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_JAVA_COMPILER);
124
		fSrcInclSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_SRC_INCLUDES);
126
		fSrcInclSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_SRC_INCLUDES);
125
		fBinInclSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_BIN_INCLUDES);
127
		fBinInclSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_BIN_INCLUDES);
126
	}
128
	}
Lines 151-157 Link Here
151
		IBuildEntry javacSource = null;
153
		IBuildEntry javacSource = null;
152
		IBuildEntry javacTarget = null;
154
		IBuildEntry javacTarget = null;
153
		IBuildEntry jreCompilationProfile = null;
155
		IBuildEntry jreCompilationProfile = null;
154
		IBuildEntry javacWarnings = null;
156
		IBuildEntry javaProjectWarnings = null;
157
		ArrayList javacWarnings = new ArrayList();
158
		ArrayList javacErrors = new ArrayList();
155
		ArrayList sourceEntries = new ArrayList(1);
159
		ArrayList sourceEntries = new ArrayList(1);
156
		ArrayList sourceEntryKeys = new ArrayList(1);
160
		ArrayList sourceEntryKeys = new ArrayList(1);
157
		ArrayList outputEntries = new ArrayList(1);
161
		ArrayList outputEntries = new ArrayList(1);
Lines 173-182 Link Here
173
				javacSource = entries[i];
177
				javacSource = entries[i];
174
			else if (name.equals(PROPERTY_JAVAC_TARGET))
178
			else if (name.equals(PROPERTY_JAVAC_TARGET))
175
				javacTarget = entries[i];
179
				javacTarget = entries[i];
176
			else if (name.equals(JAVAC_WARNINGS_ENTRY))
180
			else if (name.equals(PROPERTY_USE_PROJECT_WARNINGS))
177
				javacWarnings = entries[i];
181
				javaProjectWarnings = entries[i];
178
			else if (name.equals(PROPERTY_JRE_COMPILATION_PROFILE))
182
			else if (name.equals(PROPERTY_JRE_COMPILATION_PROFILE))
179
				jreCompilationProfile = entries[i];
183
				jreCompilationProfile = entries[i];
184
			else if (name.startsWith(PROPERTY_JAVAC_WARNINGS_PREFIX))
185
				javacWarnings.add(entries[i]);
186
			else if (name.startsWith(PROPERTY_JAVAC_ERRORS_PREFIX))
187
				javacErrors.add(entries[i]);
180
			else if (name.startsWith(PROPERTY_SOURCE_PREFIX))
188
			else if (name.startsWith(PROPERTY_SOURCE_PREFIX))
181
				sourceEntries.add(entries[i]);
189
				sourceEntries.add(entries[i]);
182
			else if (name.startsWith(PROPERTY_OUTPUT_PREFIX))
190
			else if (name.startsWith(PROPERTY_OUTPUT_PREFIX))
Lines 236-245 Link Here
236
244
237
		validateMissingSourceInBinIncludes(binIncludes, sourceEntryKeys, build);
245
		validateMissingSourceInBinIncludes(binIncludes, sourceEntryKeys, build);
238
		validateBinIncludes(binIncludes);
246
		validateBinIncludes(binIncludes);
239
		try {
247
		validateExecutionEnvironment(javacSource, javacTarget, jreCompilationProfile);
240
			validateExecutionEnvironment(javacSource, javacTarget, javacWarnings, jreCompilationProfile);
248
		validateJavaComplianceSettings(javacWarnings, javacErrors, getSourceLibraries(sourceEntries));
241
		} catch (CoreException e) {
249
		validateJavaCompilerSettings(javaProjectWarnings);
242
		}
243
		//validateDefaultEncoding(sourceEntries, encodingEntries);
250
		//validateDefaultEncoding(sourceEntries, encodingEntries);
244
	}
251
	}
245
252
Lines 262-267 Link Here
262
//	}
269
//	}
263
270
264
	/**
271
	/**
272
	 * Given a list of source library entries, returns the list of library names.
273
	 * 
274
	 * @param sourceEntries list of IBuildEntry source entries
275
	 * @return list of library names
276
	 */
277
	private List getSourceLibraries(List sourceEntries) {
278
		List libraries = new ArrayList();
279
		for (Iterator iterator = sourceEntries.iterator(); iterator.hasNext();) {
280
			IBuildEntry sourceEntry = (IBuildEntry) iterator.next();
281
			String libName = sourceEntry.getName().substring(PROPERTY_SOURCE_PREFIX.length());
282
			libraries.add(libName);
283
		}
284
		return libraries;
285
	}
286
287
	/**
265
	 * Matches the javacSource, javacTarget, javacWarnings and jre.compilation.prile entries in build.properties with the 
288
	 * Matches the javacSource, javacTarget, javacWarnings and jre.compilation.prile entries in build.properties with the 
266
	 * project specific Java Compiler properties and reports the errors founds.
289
	 * project specific Java Compiler properties and reports the errors founds.
267
	 * 
290
	 * 
Lines 270-279 Link Here
270
	 * @param javacWarningsEntry
293
	 * @param javacWarningsEntry
271
	 * @param jreCompilationProfileEntry
294
	 * @param jreCompilationProfileEntry
272
	 */
295
	 */
273
	private void validateExecutionEnvironment(IBuildEntry javacSourceEntry, IBuildEntry javacTargetEntry, IBuildEntry javacWarningsEntry, IBuildEntry jreCompilationProfileEntry) throws CoreException {
296
	private void validateExecutionEnvironment(IBuildEntry javacSourceEntry, IBuildEntry javacTargetEntry, IBuildEntry jreCompilationProfileEntry) {
274
		// if there is no source to compile, don't worry about compiler settings
297
		// if there is no source to compile, don't worry about compiler settings
275
		IJavaProject project = JavaCore.create(fProject);
298
		IJavaProject project = JavaCore.create(fProject);
276
		IClasspathEntry[] classpath = project.getRawClasspath();
299
		IClasspathEntry[] classpath = null;
300
		try {
301
			classpath = project.getRawClasspath();
302
		} catch (JavaModelException e) {
303
			PDECore.log(e);
304
			return;
305
		}
277
		boolean source = false;
306
		boolean source = false;
278
		for (int i = 0; i < classpath.length; i++) {
307
		for (int i = 0; i < classpath.length; i++) {
279
			IClasspathEntry cpe = classpath[i];
308
			IClasspathEntry cpe = classpath[i];
Lines 318-347 Link Here
318
			if (projectJavaCompatibility != null) {
347
			if (projectJavaCompatibility != null) {
319
				if (jreCompilationProfileEntry == null) {
348
				if (jreCompilationProfileEntry == null) {
320
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
349
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
321
					prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE);
350
					prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
322
				} else {
351
				} else {
323
					if (!projectJavaCompatibility.equalsIgnoreCase(jreCompilationProfileEntry.getTokens()[0])) {
352
					if (!projectJavaCompatibility.equalsIgnoreCase(jreCompilationProfileEntry.getTokens()[0])) {
324
						message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
353
						message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
325
						prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplSeverity, PDEMarkerFactory.CAT_EE);
354
						prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
326
					}
355
					}
327
				}
356
				}
328
			} else {
357
			} else {
329
				if (javacSourceEntry == null) {
358
				if (javacSourceEntry == null) {
330
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility);
359
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility);
331
					prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE);
360
					prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
332
				} else {
361
				} else {
333
					if (!projectSourceCompatibility.equalsIgnoreCase(javacSourceEntry.getTokens()[0])) {
362
					if (!projectSourceCompatibility.equalsIgnoreCase(javacSourceEntry.getTokens()[0])) {
334
						message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility);
363
						message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility);
335
						prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplSeverity, PDEMarkerFactory.CAT_EE);
364
						prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
336
					}
365
					}
337
				}
366
				}
338
				if (javacTargetEntry == null) {
367
				if (javacTargetEntry == null) {
339
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility);
368
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility);
340
					prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE);
369
					prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
341
				} else {
370
				} else {
342
					if (!projectClassCompatibility.equalsIgnoreCase(javacTargetEntry.getTokens()[0])) {
371
					if (!projectClassCompatibility.equalsIgnoreCase(javacTargetEntry.getTokens()[0])) {
343
						message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility);
372
						message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility);
344
						prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplSeverity, PDEMarkerFactory.CAT_EE);
373
						prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
345
					}
374
					}
346
				}
375
				}
347
			}
376
			}
Lines 351-402 Link Here
351
				return;
380
				return;
352
			}
381
			}
353
382
354
			//look for assertIdentifier and enumIdentifier entries in javacWarnings. If any is present let it be, if not warn.
355
			String assertIdentifier = node.get(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, ""); //$NON-NLS-1$
356
			String enumIdentifier = node.get(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, ""); //$NON-NLS-1$
357
			String assertToken = ""; //$NON-NLS-1$
358
			String enumToken = ""; //$NON-NLS-1$
359
360
			if (JavaCore.IGNORE.equalsIgnoreCase(assertIdentifier)) {
361
				assertToken = '-' + ASSERT_IDENTIFIER;
362
			}
363
			if (JavaCore.IGNORE.equalsIgnoreCase(enumIdentifier)) {
364
				enumToken = '-' + ENUM_IDENTIFIER;
365
			}
366
			String warningToken = join(assertToken, enumToken);
367
			if (javacWarningsEntry == null) {
368
				if (warningToken.length() > 0) {
369
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_WARNINGS_PREFIX, PDECoreMessages.BuildErrorReporter_DisallowIdentifiers);
370
					prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE);
371
				}
372
			} else {
373
				if (javacWarningsEntry.contains(ASSERT_IDENTIFIER) || javacWarningsEntry.contains('+' + ASSERT_IDENTIFIER) || javacWarningsEntry.contains('-' + ASSERT_IDENTIFIER)) {
374
					//assertIdentifier entry already present
375
					assertToken = ""; //$NON-NLS-1$
376
				}
377
				if (javacWarningsEntry.contains(ENUM_IDENTIFIER) || javacWarningsEntry.contains('+' + ENUM_IDENTIFIER) || javacWarningsEntry.contains('-' + ENUM_IDENTIFIER)) {
378
					//enumIdentifier entry already present
379
					enumToken = ""; //$NON-NLS-1$
380
				}
381
				warningToken = join(assertToken, enumToken);
382
				if (warningToken.length() > 0) {
383
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_WARNINGS_PREFIX, PDECoreMessages.BuildErrorReporter_DisallowIdentifiers);
384
					prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE);
385
				}
386
			}
387
		}
383
		}
388
	}
384
	}
389
385
390
	private String join(String token1, String token2) {
391
		StringBuffer result = new StringBuffer(token1);
392
		if (token2.length() > 0) {
393
			if (result.length() > 0)
394
				result.append(',');
395
			result.append(token2);
396
		}
397
		return result.toString();
398
	}
399
400
	private String findMatchingEE(String srcCompatibility, String clsCompatibility, boolean ee) {
386
	private String findMatchingEE(String srcCompatibility, String clsCompatibility, boolean ee) {
401
		String executionEnv = null;
387
		String executionEnv = null;
402
		String complaince = null;
388
		String complaince = null;
Lines 786-791 Link Here
786
772
787
	}
773
	}
788
774
775
	/**
776
	 * Matches the javacWarnings and javacErrors entries in build.properties with the 
777
	 * project specific Java compliance properties and reports the errors found.  Since java
778
	 * compiler settings are set on a per project basis, any special javacWarnings/javacErrors
779
	 * must be set for each library.
780
	 * 
781
	 * @param javacWarningsEntries list of build entries with the java compiler warnings prefix javacWarnings.
782
	 * @param javacErrorsEntries list of build entries with the java compiler errors prefix javacErrors.
783
	 * @param libraryNames list of String library names
784
	 */
785
	private void validateJavaComplianceSettings(ArrayList javacWarningsEntries, ArrayList javacErrorsEntries, List libraryNames) {
786
		// Check if there are project specific compliance settings
787
		ProjectScope projectContext = new ProjectScope(fProject);
788
		IEclipsePreferences node = projectContext.getNode(JavaCore.PLUGIN_ID);
789
		String projectComplianceLevel = node.get(JavaCore.COMPILER_COMPLIANCE, ""); //$NON-NLS-1$
790
791
		if (projectComplianceLevel.length() > 0) { //project has specific properties enabled
792
793
			List complianceWarnSettings = new ArrayList(3);
794
			List complianceErrorSettings = new ArrayList(3);
795
796
			//look for assertIdentifier and enumIdentifier entries in javacWarnings. If any is present let it be, if not warn.
797
			String assertIdentifier = node.get(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, ""); //$NON-NLS-1$
798
			if (JavaCore.ERROR.equalsIgnoreCase(assertIdentifier)) {
799
				complianceErrorSettings.add(ASSERT_IDENTIFIER);
800
			} else if (JavaCore.WARNING.equalsIgnoreCase(assertIdentifier)) {
801
				complianceWarnSettings.add(ASSERT_IDENTIFIER);
802
			}
803
804
			String enumIdentifier = node.get(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, ""); //$NON-NLS-1$
805
			if (JavaCore.ERROR.equalsIgnoreCase(enumIdentifier)) {
806
				complianceErrorSettings.add(ENUM_IDENTIFIER);
807
			} else if (JavaCore.WARNING.equalsIgnoreCase(enumIdentifier)) {
808
				complianceWarnSettings.add(ENUM_IDENTIFIER);
809
			}
810
811
			// If a warnings entry is required, make sure there is one for each library with the correct content
812
			if (complianceWarnSettings.size() > 0) {
813
				for (Iterator iterator = libraryNames.iterator(); iterator.hasNext();) {
814
					String libName = (String) iterator.next();
815
					IBuildEntry matchingEntry = null;
816
					for (Iterator iterator2 = javacWarningsEntries.iterator(); iterator2.hasNext();) {
817
						IBuildEntry candidate = (IBuildEntry) iterator2.next();
818
						if (candidate.getName().equals(PROPERTY_JAVAC_WARNINGS_PREFIX + libName)) {
819
							matchingEntry = candidate;
820
							break;
821
						}
822
					}
823
					if (matchingEntry == null) {
824
						String missingTokens = ""; //$NON-NLS-1$
825
						for (Iterator iterator2 = complianceWarnSettings.iterator(); iterator2.hasNext();) {
826
							String currentIdentifier = (String) iterator2.next();
827
							missingTokens = join(missingTokens, '-' + currentIdentifier);
828
						}
829
						String message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_WARNINGS_PREFIX + libName);
830
						prepareError(PROPERTY_JAVAC_WARNINGS_PREFIX + libName, missingTokens, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
831
					} else {
832
						String missingTokens = ""; //$NON-NLS-1$
833
						for (Iterator iterator2 = complianceWarnSettings.iterator(); iterator2.hasNext();) {
834
							String currentIdentifier = (String) iterator2.next();
835
							if (!matchingEntry.contains(currentIdentifier) && !matchingEntry.contains('+' + currentIdentifier) && !matchingEntry.contains('-' + currentIdentifier)) {
836
								join(missingTokens, '-' + currentIdentifier);
837
							}
838
						}
839
						if (missingTokens.length() > 0) {
840
							String message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_WARNINGS_PREFIX + libName);
841
							prepareError(PROPERTY_JAVAC_WARNINGS_PREFIX + libName, missingTokens, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
842
						}
843
					}
844
				}
845
			}
846
847
			// If a warnings entry is required, make sure there is one for each library with the correct content
848
			if (complianceErrorSettings.size() > 0) {
849
				for (Iterator iterator = libraryNames.iterator(); iterator.hasNext();) {
850
					String libName = (String) iterator.next();
851
					IBuildEntry matchingEntry = null;
852
					for (Iterator iterator2 = javacErrorsEntries.iterator(); iterator2.hasNext();) {
853
						IBuildEntry candidate = (IBuildEntry) iterator2.next();
854
						if (candidate.getName().equals(PROPERTY_JAVAC_ERRORS_PREFIX + libName)) {
855
							matchingEntry = candidate;
856
							break;
857
						}
858
					}
859
					if (matchingEntry == null) {
860
						String message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_ERRORS_PREFIX + libName);
861
						prepareError(PROPERTY_JAVAC_ERRORS_PREFIX + libName, null, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
862
					} else {
863
						String missingTokens = ""; //$NON-NLS-1$
864
						for (Iterator iterator2 = complianceErrorSettings.iterator(); iterator2.hasNext();) {
865
							String currentIdentifier = (String) iterator2.next();
866
							if (!matchingEntry.contains(currentIdentifier) && !matchingEntry.contains('+' + currentIdentifier) && !matchingEntry.contains('-' + currentIdentifier)) {
867
								missingTokens = join(missingTokens, '-' + currentIdentifier);
868
							}
869
						}
870
						if (missingTokens.length() > 0) {
871
							String message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_ERRORS_PREFIX + libName);
872
							prepareError(PROPERTY_JAVAC_ERRORS_PREFIX + libName, missingTokens, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
873
						}
874
					}
875
				}
876
			}
877
		}
878
	}
879
880
	/**
881
	 *
882
	 * 
883
	 * @param useJavaProjectSettings a build entry for using the project's compiler warning preferences file
884
	 */
885
	private void validateJavaCompilerSettings(IBuildEntry useJavaProjectSettings) {
886
		// Check if the project has compiler warnings set
887
		IJavaProject project = JavaCore.create(fProject);
888
		Map options = project.getOptions(false);
889
		// If project specific options are turned on, all options will be stored.  Only need to check if at least one compiler option is set. Currently using the second option on the property page.
890
		if (options.containsKey(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS)) {
891
			if (useJavaProjectSettings != null) {
892
				boolean entryCorrect = false;
893
				String[] tokens = useJavaProjectSettings.getTokens();
894
				if (tokens != null && tokens.length == 1) {
895
					IPath prefFile = new Path(tokens[0]);
896
					if (prefFile.isAbsolute()) {
897
						entryCorrect = prefFile.toFile().exists();
898
					} else {
899
						entryCorrect = fProject.getFile(prefFile).exists();
900
					}
901
				}
902
				if (!entryCorrect) {
903
					// TODO Doesn't work with flexible bundle root
904
					IFile prefFile = fProject.getFile(new Path(".settings").append(JavaCore.PLUGIN_ID + ".prefs")); //$NON-NLS-1$ //$NON-NLS-2$
905
					String token = prefFile.exists() ? prefFile.getProjectRelativePath().toString() : null;
906
					String message = NLS.bind(PDECoreMessages.BuildErrorReporter_buildEntryMissingValidPath, PROPERTY_USE_PROJECT_WARNINGS);
907
					prepareError(PROPERTY_USE_PROJECT_WARNINGS, token, message, PDEMarkerFactory.B_REPLACE, fJavaCompilerSeverity, PDEMarkerFactory.CAT_EE);
908
				}
909
			} else {
910
				// TODO Doesn't work with flexible bundle root
911
				IFile prefFile = fProject.getFile(new Path(".settings").append(JavaCore.PLUGIN_ID + ".prefs")); //$NON-NLS-1$ //$NON-NLS-2$
912
				String token = prefFile.exists() ? prefFile.getProjectRelativePath().toString() : null;
913
				String message = NLS.bind(PDECoreMessages.BuildErrorReporter_buildEntryMissingProjectSpecificSettings, PROPERTY_USE_PROJECT_WARNINGS);
914
				prepareError(PROPERTY_USE_PROJECT_WARNINGS, token, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaCompilerSeverity, PDEMarkerFactory.CAT_EE);
915
			}
916
		} else if (useJavaProjectSettings != null) {
917
			String message = NLS.bind(PDECoreMessages.BuildErrorReporter_buildEntryInvalidWhenNoProjectSettings, PROPERTY_USE_PROJECT_WARNINGS);
918
			prepareError(PROPERTY_USE_PROJECT_WARNINGS, null, message, PDEMarkerFactory.B_REMOVAL, fJavaCompilerSeverity, PDEMarkerFactory.CAT_EE);
919
		}
920
	}
921
922
	/**
923
	 * Joins the given tokens into a single string with a comma separator.  If either of
924
	 * the tokens are null or of length 0, the other string will be returned
925
	 * 
926
	 * @param token1 first string
927
	 * @param token2 second string
928
	 * @return concatenated string
929
	 */
930
	private String join(String token1, String token2) {
931
		StringBuffer result = new StringBuffer();
932
		if (token1 != null && token1.length() > 0) {
933
			result.append(token1);
934
		}
935
		if (token2 != null && token2.length() > 0) {
936
			if (result.length() > 0)
937
				result.append(',');
938
			result.append(token2);
939
		}
940
		return result.toString();
941
	}
942
789
	private BuildModel prepareTextBuildModel(IProgressMonitor monitor) {
943
	private BuildModel prepareTextBuildModel(IProgressMonitor monitor) {
790
		try {
944
		try {
791
			IDocument doc = createDocument(fFile);
945
			IDocument doc = createDocument(fFile);
(-)src/org/eclipse/pde/internal/core/builders/CompilerFlags.java (+1 lines)
Lines 60-65 Link Here
60
	public static final String P_BUILD_SRC_INCLUDES = "compilers.p.build.src.includes"; //$NON-NLS-1$
60
	public static final String P_BUILD_SRC_INCLUDES = "compilers.p.build.src.includes"; //$NON-NLS-1$
61
	public static final String P_BUILD_BIN_INCLUDES = "compilers.p.build.bin.includes"; //$NON-NLS-1$
61
	public static final String P_BUILD_BIN_INCLUDES = "compilers.p.build.bin.includes"; //$NON-NLS-1$
62
	public static final String P_BUILD_JAVA_COMPLIANCE = "compilers.p.build.java.compliance"; //$NON-NLS-1$
62
	public static final String P_BUILD_JAVA_COMPLIANCE = "compilers.p.build.java.compliance"; //$NON-NLS-1$
63
	public static final String P_BUILD_JAVA_COMPILER = "compilers.p.build.java.compiler"; //$NON-NLS-1$
63
	public static final String P_INCOMPATIBLE_ENV = "compilers.incompatible-environment"; //$NON-NLS-1$
64
	public static final String P_INCOMPATIBLE_ENV = "compilers.incompatible-environment"; //$NON-NLS-1$
64
	public static final String P_MISSING_EXPORT_PKGS = "compilers.p.missing-packages"; //$NON-NLS-1$
65
	public static final String P_MISSING_EXPORT_PKGS = "compilers.p.missing-packages"; //$NON-NLS-1$
65
	public static final String P_DEPRECATED = "compilers.p.deprecated"; //$NON-NLS-1$
66
	public static final String P_DEPRECATED = "compilers.p.deprecated"; //$NON-NLS-1$
(-)src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java (-9 / +12 lines)
Lines 199-217 Link Here
199
	//general
199
	//general
200
	private static final Key KEY_P_DISCOURAGED_CLASS = getPDEPrefKey(CompilerFlags.P_DISCOURAGED_CLASS);
200
	private static final Key KEY_P_DISCOURAGED_CLASS = getPDEPrefKey(CompilerFlags.P_DISCOURAGED_CLASS);
201
	private static final Key KEY_P_NO_REQUIRED_ATT = getPDEPrefKey(CompilerFlags.P_NO_REQUIRED_ATT);
201
	private static final Key KEY_P_NO_REQUIRED_ATT = getPDEPrefKey(CompilerFlags.P_NO_REQUIRED_ATT);
202
	private static final Key KEY_P_BUILD = getPDEPrefKey(CompilerFlags.P_BUILD);
203
	private static final Key KEY_P_BUILD_MISSING_OUTPUT = getPDEPrefKey(CompilerFlags.P_BUILD_MISSING_OUTPUT);
204
	private static final Key KEY_P_BUILD_SOURCE_LIBRARY = getPDEPrefKey(CompilerFlags.P_BUILD_SOURCE_LIBRARY);
205
	private static final Key KEY_P_BUILD_OUTPUT_LIBRARY = getPDEPrefKey(CompilerFlags.P_BUILD_OUTPUT_LIBRARY);
206
	private static final Key KEY_P_BUILD_SRC_INCLUDES = getPDEPrefKey(CompilerFlags.P_BUILD_SRC_INCLUDES);
207
	private static final Key KEY_P_BUILD_BIN_INCLUDES = getPDEPrefKey(CompilerFlags.P_BUILD_BIN_INCLUDES);
208
	private static final Key KEY_P_BUILD_JAVA_COMPLIANCE = getPDEPrefKey(CompilerFlags.P_BUILD_JAVA_COMPLIANCE);
209
	private static final Key KEY_P_NOT_EXTERNALIZED = getPDEPrefKey(CompilerFlags.P_NOT_EXTERNALIZED);
202
	private static final Key KEY_P_NOT_EXTERNALIZED = getPDEPrefKey(CompilerFlags.P_NOT_EXTERNALIZED);
210
	private static final Key KEY_P_INCOMPATIBLE_ENV = getPDEPrefKey(CompilerFlags.P_INCOMPATIBLE_ENV);
203
	private static final Key KEY_P_INCOMPATIBLE_ENV = getPDEPrefKey(CompilerFlags.P_INCOMPATIBLE_ENV);
211
	private static final Key KEY_P_MISSING_EXPORT_PKGS = getPDEPrefKey(CompilerFlags.P_MISSING_EXPORT_PKGS);
204
	private static final Key KEY_P_MISSING_EXPORT_PKGS = getPDEPrefKey(CompilerFlags.P_MISSING_EXPORT_PKGS);
212
	private static final Key KEY_P_DEPRECATED = getPDEPrefKey(CompilerFlags.P_DEPRECATED);
205
	private static final Key KEY_P_DEPRECATED = getPDEPrefKey(CompilerFlags.P_DEPRECATED);
213
	private static final Key KEY_P_INTERNAL = getPDEPrefKey(CompilerFlags.P_INTERNAL);
206
	private static final Key KEY_P_INTERNAL = getPDEPrefKey(CompilerFlags.P_INTERNAL);
214
207
208
	// build
209
	private static final Key KEY_P_BUILD_SOURCE_LIBRARY = getPDEPrefKey(CompilerFlags.P_BUILD_SOURCE_LIBRARY);
210
	private static final Key KEY_P_BUILD_OUTPUT_LIBRARY = getPDEPrefKey(CompilerFlags.P_BUILD_OUTPUT_LIBRARY);
211
	private static final Key KEY_P_BUILD_MISSING_OUTPUT = getPDEPrefKey(CompilerFlags.P_BUILD_MISSING_OUTPUT);
212
	private static final Key KEY_P_BUILD_SRC_INCLUDES = getPDEPrefKey(CompilerFlags.P_BUILD_SRC_INCLUDES);
213
	private static final Key KEY_P_BUILD_BIN_INCLUDES = getPDEPrefKey(CompilerFlags.P_BUILD_BIN_INCLUDES);
214
	private static final Key KEY_P_BUILD_JAVA_COMPLIANCE = getPDEPrefKey(CompilerFlags.P_BUILD_JAVA_COMPLIANCE);
215
	private static final Key KEY_P_BUILD_JAVA_COMPILER = getPDEPrefKey(CompilerFlags.P_BUILD_JAVA_COMPILER);
216
	private static final Key KEY_P_BUILD = getPDEPrefKey(CompilerFlags.P_BUILD);
217
215
	// versioning
218
	// versioning
216
	private static final Key KEY_P_VERSION_EXP_PKG = getPDEPrefKey(CompilerFlags.P_MISSING_VERSION_EXP_PKG);
219
	private static final Key KEY_P_VERSION_EXP_PKG = getPDEPrefKey(CompilerFlags.P_MISSING_VERSION_EXP_PKG);
217
	private static final Key KEY_P_VERSION_IMP_PKG = getPDEPrefKey(CompilerFlags.P_MISSING_VERSION_IMP_PKG);
220
	private static final Key KEY_P_VERSION_IMP_PKG = getPDEPrefKey(CompilerFlags.P_MISSING_VERSION_IMP_PKG);
Lines 223-229 Link Here
223
226
224
	private static String[] SEVERITIES = {PDEUIMessages.PDECompilersConfigurationBlock_error, PDEUIMessages.PDECompilersConfigurationBlock_warning, PDEUIMessages.PDECompilersConfigurationBlock_ignore};
227
	private static String[] SEVERITIES = {PDEUIMessages.PDECompilersConfigurationBlock_error, PDEUIMessages.PDECompilersConfigurationBlock_warning, PDEUIMessages.PDECompilersConfigurationBlock_ignore};
225
228
226
	private static Key[] fgAllKeys = {KEY_F_UNRESOLVED_FEATURES, KEY_F_UNRESOLVED_PLUGINS, KEY_P_BUILD, KEY_P_BUILD_MISSING_OUTPUT, KEY_P_BUILD_SOURCE_LIBRARY, KEY_P_BUILD_OUTPUT_LIBRARY, KEY_P_BUILD_SRC_INCLUDES, KEY_P_BUILD_BIN_INCLUDES, KEY_P_BUILD_JAVA_COMPLIANCE, KEY_P_INTERNAL, KEY_P_DEPRECATED, KEY_P_DISCOURAGED_CLASS, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS, KEY_P_NO_REQUIRED_ATT, KEY_P_NOT_EXTERNALIZED, KEY_P_UNKNOWN_ATTRIBUTE, KEY_P_UNKNOWN_CLASS, KEY_P_UNKNOWN_ELEMENT, KEY_P_UNKNOWN_IDENTIFIER, KEY_P_UNKNOWN_RESOURCE, KEY_P_UNRESOLVED_EX_POINTS, KEY_P_UNRESOLVED_IMPORTS, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG, KEY_P_VERSION_REQ_BUNDLE, KEY_S_CREATE_DOCS, KEY_S_DOC_FOLDER, KEY_S_OPEN_TAGS};
229
	private static Key[] fgAllKeys = {KEY_F_UNRESOLVED_FEATURES, KEY_F_UNRESOLVED_PLUGINS, KEY_P_BUILD, KEY_P_BUILD_MISSING_OUTPUT, KEY_P_BUILD_SOURCE_LIBRARY, KEY_P_BUILD_OUTPUT_LIBRARY, KEY_P_BUILD_SRC_INCLUDES, KEY_P_BUILD_BIN_INCLUDES, KEY_P_BUILD_JAVA_COMPLIANCE, KEY_P_BUILD_JAVA_COMPILER, KEY_P_INTERNAL, KEY_P_DEPRECATED, KEY_P_DISCOURAGED_CLASS, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS, KEY_P_NO_REQUIRED_ATT, KEY_P_NOT_EXTERNALIZED, KEY_P_UNKNOWN_ATTRIBUTE, KEY_P_UNKNOWN_CLASS, KEY_P_UNKNOWN_ELEMENT, KEY_P_UNKNOWN_IDENTIFIER, KEY_P_UNKNOWN_RESOURCE, KEY_P_UNRESOLVED_EX_POINTS, KEY_P_UNRESOLVED_IMPORTS, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG, KEY_P_VERSION_REQ_BUNDLE, KEY_S_CREATE_DOCS, KEY_S_DOC_FOLDER, KEY_S_OPEN_TAGS};
227
230
228
	/**
231
	/**
229
	 * Constant representing the {@link IDialogSettings} section for this block
232
	 * Constant representing the {@link IDialogSettings} section for this block
Lines 516-522 Link Here
516
				initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_no_required_att, PDEUIMessages.CompilersConfigurationTab_incompatEnv, PDEUIMessages.compilers_p_exported_pkgs}, new Key[] {KEY_P_NO_REQUIRED_ATT, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS}, CompilerFlags.PLUGIN_FLAGS);
519
				initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_no_required_att, PDEUIMessages.CompilersConfigurationTab_incompatEnv, PDEUIMessages.compilers_p_exported_pkgs}, new Key[] {KEY_P_NO_REQUIRED_ATT, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS}, CompilerFlags.PLUGIN_FLAGS);
517
				//build.properties
520
				//build.properties
518
				client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_build);
521
				client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_build);
519
				initializeComboControls(client, new String[] {PDEUIMessages.PDECompilersConfigurationBlock_1, PDEUIMessages.PDECompilersConfigurationBlock_2, PDEUIMessages.PDECompilersConfigurationBlock_0, PDEUIMessages.PDECompilersConfigurationBlock_3, PDEUIMessages.PDECompilersConfigurationBlock_4, PDEUIMessages.PDECompilersConfigurationBlock_5, PDEUIMessages.CompilersConfigurationTab_buildPropertiesErrors}, new Key[] {KEY_P_BUILD_SOURCE_LIBRARY, KEY_P_BUILD_OUTPUT_LIBRARY, KEY_P_BUILD_MISSING_OUTPUT, KEY_P_BUILD_BIN_INCLUDES, KEY_P_BUILD_SRC_INCLUDES, KEY_P_BUILD_JAVA_COMPLIANCE, KEY_P_BUILD}, CompilerFlags.PLUGIN_FLAGS);
522
				initializeComboControls(client, new String[] {PDEUIMessages.PDECompilersConfigurationBlock_1, PDEUIMessages.PDECompilersConfigurationBlock_2, PDEUIMessages.PDECompilersConfigurationBlock_0, PDEUIMessages.PDECompilersConfigurationBlock_3, PDEUIMessages.PDECompilersConfigurationBlock_4, PDEUIMessages.PDECompilersConfigurationBlock_5, "Missing project specific Java compiler settings", PDEUIMessages.CompilersConfigurationTab_buildPropertiesErrors}, new Key[] {KEY_P_BUILD_SOURCE_LIBRARY, KEY_P_BUILD_OUTPUT_LIBRARY, KEY_P_BUILD_MISSING_OUTPUT, KEY_P_BUILD_BIN_INCLUDES, KEY_P_BUILD_SRC_INCLUDES, KEY_P_BUILD_JAVA_COMPLIANCE, KEY_P_BUILD_JAVA_COMPILER, KEY_P_BUILD}, CompilerFlags.PLUGIN_FLAGS);
520
				// Versioning
523
				// Versioning
521
				client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_versioning);
524
				client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_versioning);
522
				initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_missing_require_bundle, PDEUIMessages.compilers_p_missing_exp_pkg, PDEUIMessages.compilers_p_missing_imp_pkg}, new Key[] {KEY_P_VERSION_REQ_BUNDLE, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG}, CompilerFlags.PLUGIN_FLAGS);
525
				initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_missing_require_bundle, PDEUIMessages.compilers_p_missing_exp_pkg, PDEUIMessages.compilers_p_missing_imp_pkg}, new Key[] {KEY_P_VERSION_REQ_BUNDLE, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG}, CompilerFlags.PLUGIN_FLAGS);
(-)src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java (+1 lines)
Lines 293-298 Link Here
293
		projectPrefs.putInt(CompilerFlags.P_BUILD_SRC_INCLUDES, severity);
293
		projectPrefs.putInt(CompilerFlags.P_BUILD_SRC_INCLUDES, severity);
294
		projectPrefs.putInt(CompilerFlags.P_BUILD_BIN_INCLUDES, severity);
294
		projectPrefs.putInt(CompilerFlags.P_BUILD_BIN_INCLUDES, severity);
295
		projectPrefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPLIANCE, severity);
295
		projectPrefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPLIANCE, severity);
296
		projectPrefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPILER, severity);
296
		projectPrefs.flush();
297
		projectPrefs.flush();
297
		projectPrefs.sync();
298
		projectPrefs.sync();
298
	}
299
	}

Return to bug 291528