### Eclipse Workspace Patch 1.0 #P org.eclipse.pde.core Index: src/org/eclipse/pde/internal/core/PreferenceInitializer.java =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PreferenceInitializer.java,v retrieving revision 1.17 diff -u -r1.17 PreferenceInitializer.java --- src/org/eclipse/pde/internal/core/PreferenceInitializer.java 4 Dec 2009 16:51:33 -0000 1.17 +++ src/org/eclipse/pde/internal/core/PreferenceInitializer.java 8 Jan 2010 20:30:06 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2010 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 @@ -64,6 +64,12 @@ prefs.putInt(CompilerFlags.P_NOT_EXTERNALIZED, CompilerFlags.IGNORE); prefs.putInt(CompilerFlags.P_BUILD, CompilerFlags.WARNING); prefs.putInt(CompilerFlags.P_BUILD_MISSING_OUTPUT, CompilerFlags.IGNORE); + prefs.putInt(CompilerFlags.P_BUILD_SOURCE_LIBRARY, CompilerFlags.WARNING); + prefs.putInt(CompilerFlags.P_BUILD_OUTPUT_LIBRARY, CompilerFlags.WARNING); + prefs.putInt(CompilerFlags.P_BUILD_SRC_INCLUDES, CompilerFlags.WARNING); + prefs.putInt(CompilerFlags.P_BUILD_BIN_INCLUDES, CompilerFlags.WARNING); + prefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPLIANCE, CompilerFlags.WARNING); + prefs.putInt(CompilerFlags.P_INCOMPATIBLE_ENV, CompilerFlags.WARNING); prefs.putInt(CompilerFlags.P_MISSING_EXPORT_PKGS, CompilerFlags.IGNORE); Index: src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java,v retrieving revision 1.49 diff -u -r1.49 BuildErrorReporter.java --- src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java 4 Dec 2009 16:00:05 -0000 1.49 +++ src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java 8 Jan 2010 20:30:07 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2010 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 @@ -104,17 +104,29 @@ protected ArrayList fProblemList = new ArrayList(); protected int fBuildSeverity; - private int fClasspathSeverity; + protected int fClasspathSeverity; + protected int fJavaComplSeverity; + protected int fSrcInclSeverity; + protected int fBinInclSeverity; + protected int fMissingOutputLibSeverity; + protected int fSrcLibSeverity; + protected int fOututLibSeverity; public BuildErrorReporter(IFile buildFile) { super(buildFile); + fBuildSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD); + fClasspathSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_UNRESOLVED_IMPORTS); + fMissingOutputLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_MISSING_OUTPUT); + fSrcLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_SOURCE_LIBRARY); + fOututLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_OUTPUT_LIBRARY); + fJavaComplSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_JAVA_COMPLIANCE); + fSrcInclSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_SRC_INCLUDES); + fBinInclSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_BIN_INCLUDES); } public void validate(IProgressMonitor monitor) { - fBuildSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD); - fClasspathSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_UNRESOLVED_IMPORTS); - if (fBuildSeverity == CompilerFlags.IGNORE && fClasspathSeverity == CompilerFlags.IGNORE) - return; + /*if (fBuildSeverity == CompilerFlags.IGNORE && fClasspathSeverity == CompilerFlags.IGNORE) + return;*/ WorkspaceBuildModel wbm = new WorkspaceBuildModel(fFile); wbm.load(); if (!wbm.isLoaded()) @@ -192,16 +204,12 @@ validateDependencyManagement(bundleList); } - // rest of validation relies on build flag - if (fBuildSeverity == CompilerFlags.IGNORE) - return; - if (jarsExtra != null) validateJarsExtraClasspath(jarsExtra); - validateIncludes(binIncludes, sourceEntryKeys); - validateIncludes(binExcludes, sourceEntryKeys); - validateIncludes(srcIncludes, sourceEntryKeys); - validateIncludes(srcExcludes, sourceEntryKeys); + validateIncludes(binIncludes, sourceEntryKeys, fBinInclSeverity); + validateIncludes(binExcludes, sourceEntryKeys, fBinInclSeverity); + validateIncludes(srcIncludes, sourceEntryKeys, fSrcInclSeverity); + validateIncludes(srcExcludes, sourceEntryKeys, fSrcInclSeverity); validateSourceFoldersInSrcIncludes(srcIncludes); try { @@ -210,7 +218,7 @@ IClasspathEntry[] cpes = jp.getRawClasspath(); validateMissingLibraries(sourceEntryKeys, cpes); validateSourceEntries(sourceEntries, cpes); - SourceEntryErrorReporter srcEntryErrReporter = new SourceEntryErrorReporter(fFile, fBuildSeverity); + SourceEntryErrorReporter srcEntryErrReporter = new SourceEntryErrorReporter(fFile); srcEntryErrReporter.initialize(sourceEntries, outputEntries, cpes, fProject); srcEntryErrReporter.validate(); ArrayList problems = srcEntryErrReporter.getProblemList(); @@ -292,30 +300,30 @@ if (projectJavaCompatibility != null) { if (jreCompilationProfileEntry == null) { message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel); - prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_EE); + prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); } else { if (!projectJavaCompatibility.equalsIgnoreCase(jreCompilationProfileEntry.getTokens()[0])) { message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel); - prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_REPLACE, PDEMarkerFactory.CAT_EE); + prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); } } } else { if (javacSourceEntry == null) { message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility); - prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_EE); + prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); } else { if (!projectSourceCompatibility.equalsIgnoreCase(javacSourceEntry.getTokens()[0])) { message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility); - prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_REPLACE, PDEMarkerFactory.CAT_EE); + prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); } } if (javacTargetEntry == null) { message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility); - prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_EE); + prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); } else { if (!projectClassCompatibility.equalsIgnoreCase(javacTargetEntry.getTokens()[0])) { message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility); - prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_REPLACE, PDEMarkerFactory.CAT_EE); + prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); } } } @@ -341,7 +349,7 @@ if (javacWarningsEntry == null) { if (warningToken.length() > 0) { message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_WARNINGS_PREFIX, PDECoreMessages.BuildErrorReporter_DisallowIdentifiers); - prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_EE); + prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); } } else { if (javacWarningsEntry.contains(ASSERT_IDENTIFIER) || javacWarningsEntry.contains('+' + ASSERT_IDENTIFIER) || javacWarningsEntry.contains('-' + ASSERT_IDENTIFIER)) { @@ -355,7 +363,7 @@ warningToken = join(assertToken, enumToken); if (warningToken.length() > 0) { message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_WARNINGS_PREFIX, PDECoreMessages.BuildErrorReporter_DisallowIdentifiers); - prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_EE); + prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); } } } @@ -486,7 +494,7 @@ } if (!exists) { - prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_FATAL); + prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDDITION, fBinInclSeverity, PDEMarkerFactory.CAT_FATAL); } } @@ -550,7 +558,7 @@ found = true; } if (!found) - prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_FATAL); + prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDDITION, fBinInclSeverity, PDEMarkerFactory.CAT_FATAL); } } @@ -565,7 +573,7 @@ for (int i = 0; i < cpes.length; i++) { if (cpes[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) { if (!sourceEntryKeys.contains(DEF_SOURCE_ENTRY)) - prepareError(DEF_SOURCE_ENTRY, null, PDECoreMessages.BuildErrorReporter_sourceMissing, PDEMarkerFactory.NO_RESOLUTION, PDEMarkerFactory.CAT_OTHER); + prepareError(DEF_SOURCE_ENTRY, null, PDECoreMessages.BuildErrorReporter_sourceMissing, PDEMarkerFactory.NO_RESOLUTION, fSrcInclSeverity, PDEMarkerFactory.CAT_OTHER); break; } } @@ -579,7 +587,7 @@ for (int j = 0; j < cpes.length; j++) { if (cpes[j].getEntryKind() == IClasspathEntry.CPE_SOURCE) { if (!sourceEntryKeys.contains(DEF_SOURCE_ENTRY)) - prepareError(DEF_SOURCE_ENTRY, null, PDECoreMessages.BuildErrorReporter_sourceMissing, PDEMarkerFactory.NO_RESOLUTION, PDEMarkerFactory.CAT_OTHER); + prepareError(DEF_SOURCE_ENTRY, null, PDECoreMessages.BuildErrorReporter_sourceMissing, PDEMarkerFactory.NO_RESOLUTION, fSrcInclSeverity, PDEMarkerFactory.CAT_OTHER); break; } } @@ -650,9 +658,9 @@ return; if (sourceEntries.size() == 1) { String name = ((IBuildEntry) sourceEntries.get(0)).getName(); - prepareError(name, null, NLS.bind(PDECoreMessages.BuildErrorReporter_classpathEntryMissing1, unlistedEntries, name), PDEMarkerFactory.B_SOURCE_ADDITION, PDEMarkerFactory.CAT_OTHER); + prepareError(name, null, NLS.bind(PDECoreMessages.BuildErrorReporter_classpathEntryMissing1, unlistedEntries, name), PDEMarkerFactory.B_SOURCE_ADDITION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER); } else - prepareError(DEF_SOURCE_ENTRY, null, NLS.bind(PDECoreMessages.BuildErrorReporter_classpathEntryMissing, unlistedEntries), PDEMarkerFactory.B_SOURCE_ADDITION, PDEMarkerFactory.CAT_OTHER); + prepareError(DEF_SOURCE_ENTRY, null, NLS.bind(PDECoreMessages.BuildErrorReporter_classpathEntryMissing, unlistedEntries), PDEMarkerFactory.B_SOURCE_ADDITION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER); } @@ -689,13 +697,13 @@ } if (errorMessage != null) { - prepareError(includes.getName(), tokens[i], errorMessage, PDEMarkerFactory.B_REMOVAL, PDEMarkerFactory.CAT_OTHER); + prepareError(includes.getName(), tokens[i], errorMessage, PDEMarkerFactory.B_REMOVAL, fSrcInclSeverity, PDEMarkerFactory.CAT_OTHER); } } } - private void validateIncludes(IBuildEntry includes, ArrayList sourceIncludes) { + private void validateIncludes(IBuildEntry includes, ArrayList sourceIncludes, int severity) { if (includes == null) return; String[] tokens = includes.getTokens(); @@ -730,7 +738,7 @@ } if (message != null) - prepareError(includes.getName(), token, message, fixId, PDEMarkerFactory.CAT_OTHER); + prepareError(includes.getName(), token, message, fixId, severity, PDEMarkerFactory.CAT_OTHER); } } Index: src/org/eclipse/pde/internal/core/builders/CompilerFlags.java =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/CompilerFlags.java,v retrieving revision 1.16 diff -u -r1.16 CompilerFlags.java --- src/org/eclipse/pde/internal/core/builders/CompilerFlags.java 2 Dec 2009 20:01:29 -0000 1.16 +++ src/org/eclipse/pde/internal/core/builders/CompilerFlags.java 8 Jan 2010 20:30:07 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 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 @@ -55,6 +55,11 @@ public static final String P_NOT_EXTERNALIZED = "compilers.p.not-externalized-att"; //$NON-NLS-1$ public static final String P_BUILD = "compilers.p.build"; //$NON-NLS-1$ public static final String P_BUILD_MISSING_OUTPUT = "compilers.p.build.missing.output"; //$NON-NLS-1$ + public static final String P_BUILD_SOURCE_LIBRARY = "compilers.p.build.source.library"; //$NON-NLS-1$ + public static final String P_BUILD_OUTPUT_LIBRARY = "compilers.p.build.output.library"; //$NON-NLS-1$ + public static final String P_BUILD_SRC_INCLUDES = "compilers.p.build.src.includes"; //$NON-NLS-1$ + public static final String P_BUILD_BIN_INCLUDES = "compilers.p.build.bin.includes"; //$NON-NLS-1$ + public static final String P_BUILD_JAVA_COMPLIANCE = "compilers.p.build.java.compliance"; //$NON-NLS-1$ public static final String P_INCOMPATIBLE_ENV = "compilers.incompatible-environment"; //$NON-NLS-1$ public static final String P_MISSING_EXPORT_PKGS = "compilers.p.missing-packages"; //$NON-NLS-1$ public static final String P_DEPRECATED = "compilers.p.deprecated"; //$NON-NLS-1$ Index: src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java,v retrieving revision 1.7 diff -u -r1.7 SourceEntryErrorReporter.java --- src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java 7 Jan 2010 14:49:45 -0000 1.7 +++ src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java 8 Jan 2010 20:30:07 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 IBM Corporation and others. + * Copyright (c) 2009, 2010 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 @@ -21,9 +21,8 @@ public class SourceEntryErrorReporter extends BuildErrorReporter { - public SourceEntryErrorReporter(IFile file, int buildSeverity) { + public SourceEntryErrorReporter(IFile file) { super(file); - fBuildSeverity = buildSeverity; } class ProjectFolder { @@ -132,8 +131,8 @@ } - HashMap fSourceFolderMap = new HashMap(4); - HashMap fOutputFolderMap = new HashMap(4); + private HashMap fSourceFolderMap = new HashMap(4); + private HashMap fOutputFolderMap = new HashMap(4); public void initialize(ArrayList sourceEntries, ArrayList outputEntries, IClasspathEntry[] cpes, IProject project) { @@ -238,7 +237,7 @@ message = NLS.bind(PDECoreMessages.BuildErrorReporter_missingFolder, outputPath.toString()); else message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_InvalidOutputFolder, outputPath.toString()); - prepareError(PROPERTY_OUTPUT_PREFIX + libName, outputFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, PDEMarkerFactory.CAT_OTHER); + prepareError(PROPERTY_OUTPUT_PREFIX + libName, outputFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER); } } } else { @@ -268,19 +267,19 @@ for (int k = 0; k < srcFolder.getLibs().size(); k++) { String libName = (String) srcFolder.getLibs().get(k); String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_DifferentTargetLibrary, erringSrcFolders); - prepareError(PROPERTY_SOURCE_PREFIX + libName, srcFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, PDEMarkerFactory.CAT_OTHER); + prepareError(PROPERTY_SOURCE_PREFIX + libName, srcFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER); } } } } for (int i = 0; i < outputFolderLibs.size(); i++) { String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_ExtraOutputFolder, outputFolder.getPath().toString(), PROPERTY_SOURCE_PREFIX + outputFolderLibs.get(i)); - prepareError(PROPERTY_OUTPUT_PREFIX + outputFolderLibs.get(i), outputFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, PDEMarkerFactory.CAT_OTHER); + prepareError(PROPERTY_OUTPUT_PREFIX + outputFolderLibs.get(i), outputFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER); } if (outputFolder.getDupeLibName() != null) { String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_DupeOutputFolder, outputPath.toString(), PROPERTY_OUTPUT_PREFIX + outputFolder.getDupeLibName()); - prepareError(PROPERTY_OUTPUT_PREFIX + outputFolder.getDupeLibName(), outputFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, PDEMarkerFactory.CAT_OTHER); + prepareError(PROPERTY_OUTPUT_PREFIX + outputFolder.getDupeLibName(), outputFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER); } } } @@ -315,7 +314,7 @@ ArrayList srcLibs = sourceFolder.getLibs(); for (int i = 0; i < srcLibs.size(); i++) { String libName = (String) srcLibs.get(i); - prepareError(PROPERTY_SOURCE_PREFIX + libName, sourceFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, PDEMarkerFactory.CAT_OTHER); + prepareError(PROPERTY_SOURCE_PREFIX + libName, sourceFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER); } } else { if (outputFolder.getLibs().size() == 0 && sourceFolder.getLibs().size() == 1) { @@ -338,7 +337,7 @@ if (sourceFolder.getDupeLibName() != null) { String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_DupeSourceFolder, sourcePath.toString(), PROPERTY_SOURCE_PREFIX + sourceFolder.getDupeLibName()); - prepareError(PROPERTY_SOURCE_PREFIX + sourceFolder.getDupeLibName(), sourceFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, PDEMarkerFactory.CAT_OTHER); + prepareError(PROPERTY_SOURCE_PREFIX + sourceFolder.getDupeLibName(), sourceFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER); } } } @@ -347,7 +346,7 @@ String libName = (String) iter.next(); MissingOutputEntry errorEntry = (MissingOutputEntry) missingOutputEntryErrors.get(libName); String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_MissingOutputEntry, errorEntry.get(errorEntry.fSsrcFolders), PROPERTY_OUTPUT_PREFIX + libName); - prepareError(PROPERTY_OUTPUT_PREFIX + libName, errorEntry.get(errorEntry.fOutputFolders), message, PDEMarkerFactory.B_ADDDITION, CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_MISSING_OUTPUT), PDEMarkerFactory.CAT_OTHER); + prepareError(PROPERTY_OUTPUT_PREFIX + libName, errorEntry.get(errorEntry.fOutputFolders), message, PDEMarkerFactory.B_ADDDITION, fMissingOutputLibSeverity, PDEMarkerFactory.CAT_OTHER); } } #P org.eclipse.pde.ui Index: src/org/eclipse/pde/internal/ui/PDEUIMessages.java =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java,v retrieving revision 1.453 diff -u -r1.453 PDEUIMessages.java --- src/org/eclipse/pde/internal/ui/PDEUIMessages.java 14 Dec 2009 17:26:13 -0000 1.453 +++ src/org/eclipse/pde/internal/ui/PDEUIMessages.java 8 Jan 2010 20:30:13 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2010 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 @@ -71,6 +71,11 @@ public static String OrganizeManifestsProcessor_rootMessage; public static String PDECompilersConfigurationBlock_0; + public static String PDECompilersConfigurationBlock_1; + public static String PDECompilersConfigurationBlock_2; + public static String PDECompilersConfigurationBlock_3; + public static String PDECompilersConfigurationBlock_4; + public static String PDECompilersConfigurationBlock_5; public static String PDECompilersConfigurationBlock_general; public static String PDECompilersConfigurationBlock_versioning; @@ -79,6 +84,7 @@ public static String PDECompilersConfigurationBlock_settings_changed; public static String PDECompilersConfigurationBlock_settings_changed_all; public static String PDECompilersConfigurationBlock_usage; + public static String PDECompilersConfigurationBlock_build; public static String PDEWizardNewFileCreationPage_errorMsgStartsWithDot; Index: src/org/eclipse/pde/internal/ui/pderesources.properties =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties,v retrieving revision 1.1108 diff -u -r1.1108 pderesources.properties --- src/org/eclipse/pde/internal/ui/pderesources.properties 14 Dec 2009 17:26:13 -0000 1.1108 +++ src/org/eclipse/pde/internal/ui/pderesources.properties 8 Jan 2010 20:30:15 -0000 @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000, 2009 IBM Corporation and others. +# Copyright (c) 2000, 2010 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 @@ -54,7 +54,12 @@ ToggleLinkWithEditorAction_label = Lin&k with Editor ToggleLinkWithEditorAction_toolTip = Link with Editor ToggleLinkWithEditorAction_description = Link with active editorPDEMultiPageContentOutline.SortingAction.label = Sort -PDECompilersConfigurationBlock_0=Missing &output. entry: +PDECompilersConfigurationBlock_0=Missing output.<&library> entry: +PDECompilersConfigurationBlock_1=Problems with &source. entries: +PDECompilersConfigurationBlock_2=Problems with output. entries: +PDECompilersConfigurationBlock_3=Proble&ms with binary build entry: +PDECompilersConfigurationBlock_4=Problems with source buil&d entry: +PDECompilersConfigurationBlock_5=Missing or incompatible &Java compliance properties: PDECompilersConfigurationBlock_general=General PDECompilersConfigurationBlock_versioning=Versioning PDECompilersConfigurationBlock_references=References @@ -62,6 +67,7 @@ PDECompilersConfigurationBlock_settings_changed=Settings Changed PDECompilersConfigurationBlock_settings_changed_all=Compiler settings have changed. A full build is required for the changes to take effect.\n\nDo a full build now? PDECompilersConfigurationBlock_usage=Usage +PDECompilersConfigurationBlock_build=Build PDEMultiPageContentOutline_SortingAction_label = Sort PDEMultiPageContentOutline_SortingAction_tooltip = Sort PDEMultiPageContentOutline_SortingAction_description = Sorts elements in the outline @@ -1433,9 +1439,9 @@ compilers_p_unknown_resource= References to non-e&xistent resources: compilers_p_unknown_identifier= References to non-exis&tent identifier attributes: compilers_p_no_required_att=Re&quired attributes not defined: -compilers_p_not_externalized_att = Usage of n&on-externalized strings: +compilers_p_not_externalized_att = Usage of non-externali&zed strings: compilers_p_deprecated = Usage of deprecated attributes and &elements: -compilers_p_internal = Usage of internal extension points: +compilers_p_internal = Usage o&f internal extension points: compilers_p_exported_pkgs = Missing exported pac&kages: compilers_p_missing_exp_pkg = Missing versions on exported packages: compilers_p_missing_imp_pkg = Missing versions on imported packages: @@ -1450,7 +1456,7 @@ ContainerRenameParticipant_renameFolders=Rename folders referenced in plug-in manifest and build files ContainerRenameParticipant_renameBundleId=Rename Bundle-SymbolicName -CompilersConfigurationTab_buildPropertiesErrors=Problems in &build.properties files: +CompilersConfigurationTab_buildPropertiesErrors=Other problems with &build.properties files: ControlValidationUtility_errorMsgNotOnClasspath=The specified class is not on the plug-in classpath CompilersConfigurationBlock_building = Building Projects... CompilersConfigurationTab_incompatEnv=Incompatible en&vironment: Index: src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java =================================================================== RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java,v retrieving revision 1.12 diff -u -r1.12 PDECompilersConfigurationBlock.java --- src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java 2 Dec 2009 20:01:32 -0000 1.12 +++ src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java 8 Jan 2010 20:30:15 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 IBM Corporation and others. + * Copyright (c) 2008, 2010 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 @@ -11,8 +11,6 @@ *******************************************************************************/ package org.eclipse.pde.internal.ui.preferences; -import org.eclipse.pde.internal.ui.PDEUIMessages; - import com.ibm.icu.text.MessageFormat; import java.util.*; import java.util.List; @@ -203,6 +201,11 @@ private static final Key KEY_P_NO_REQUIRED_ATT = getPDEPrefKey(CompilerFlags.P_NO_REQUIRED_ATT); private static final Key KEY_P_BUILD = getPDEPrefKey(CompilerFlags.P_BUILD); private static final Key KEY_P_BUILD_MISSING_OUTPUT = getPDEPrefKey(CompilerFlags.P_BUILD_MISSING_OUTPUT); + private static final Key KEY_P_BUILD_SOURCE_LIBRARY = getPDEPrefKey(CompilerFlags.P_BUILD_SOURCE_LIBRARY); + private static final Key KEY_P_BUILD_OUTPUT_LIBRARY = getPDEPrefKey(CompilerFlags.P_BUILD_OUTPUT_LIBRARY); + private static final Key KEY_P_BUILD_SRC_INCLUDES = getPDEPrefKey(CompilerFlags.P_BUILD_SRC_INCLUDES); + private static final Key KEY_P_BUILD_BIN_INCLUDES = getPDEPrefKey(CompilerFlags.P_BUILD_BIN_INCLUDES); + private static final Key KEY_P_BUILD_JAVA_COMPLIANCE = getPDEPrefKey(CompilerFlags.P_BUILD_JAVA_COMPLIANCE); private static final Key KEY_P_NOT_EXTERNALIZED = getPDEPrefKey(CompilerFlags.P_NOT_EXTERNALIZED); private static final Key KEY_P_INCOMPATIBLE_ENV = getPDEPrefKey(CompilerFlags.P_INCOMPATIBLE_ENV); private static final Key KEY_P_MISSING_EXPORT_PKGS = getPDEPrefKey(CompilerFlags.P_MISSING_EXPORT_PKGS); @@ -220,7 +223,7 @@ private static String[] SEVERITIES = {PDEUIMessages.PDECompilersConfigurationBlock_error, PDEUIMessages.PDECompilersConfigurationBlock_warning, PDEUIMessages.PDECompilersConfigurationBlock_ignore}; - private static Key[] fgAllKeys = {KEY_F_UNRESOLVED_FEATURES, KEY_F_UNRESOLVED_PLUGINS, KEY_P_BUILD, KEY_P_BUILD_MISSING_OUTPUT, 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}; + 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}; /** * Constant representing the {@link IDialogSettings} section for this block @@ -511,7 +514,10 @@ scomp.setContent(sbody); // General Composite client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_general); - initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_no_required_att, PDEUIMessages.CompilersConfigurationTab_buildPropertiesErrors, PDEUIMessages.PDECompilersConfigurationBlock_0, PDEUIMessages.CompilersConfigurationTab_incompatEnv, PDEUIMessages.compilers_p_exported_pkgs}, new Key[] {KEY_P_NO_REQUIRED_ATT, KEY_P_BUILD, KEY_P_BUILD_MISSING_OUTPUT, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS}, CompilerFlags.PLUGIN_FLAGS); + 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); + //build.properties + client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_build); + 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); // Versioning client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_versioning); 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);