Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 165495 Details for
Bug 291528
Synchronize project warning/error settings to build.properties
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch to pde.build
291528.txt (text/plain), 7.23 KB, created by
Andrew Niefer
on 2010-04-20 16:15:14 EDT
(
hide
)
Description:
patch to pde.build
Filename:
MIME Type:
Creator:
Andrew Niefer
Created:
2010-04-20 16:15:14 EDT
Size:
7.23 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.build >Index: src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java,v >retrieving revision 1.56 >diff -u -r1.56 IBuildPropertiesConstants.java >--- src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java 7 Apr 2010 20:06:10 -0000 1.56 >+++ src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java 20 Apr 2010 20:03:53 -0000 >@@ -62,6 +62,7 @@ > public static final String PROPERTY_JAVAC_CUSTOM_ENCODINGS_PREFIX = "javacCustomEncodings."; //$NON-NLS-1$ > public static final String PROPERTY_JAVAC_WARNINGS_PREFIX = "javacWarnings."; //$NON-NLS-1$ > public static final String PROPERTY_JAVAC_ERRORS_PREFIX = "javacErrors."; //$NON-NLS-1$ >+ public static final String PROPERTY_USE_PROJECT_WARNINGS = "javacWarnings.projectSettings"; //$NON-NLS-1$ > > public static final String DEFAULT_MATCH_ALL = "*"; //$NON-NLS-1$ > public static final String DEFAULT_FINAL_SHAPE = "*"; //$NON-NLS-1$ >@@ -141,4 +142,5 @@ > > public static final String PROPERTY_PACKAGER_MODE = "packagerMode"; //$NON-NLS-1$ > public static final String PROPERTY_PACKAGER_AS_NORMALIZER = "packagerAsNormalizer"; //$NON-NLS-1$ >+ > } >Index: src/org/eclipse/pde/internal/build/IPDEBuildConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IPDEBuildConstants.java,v >retrieving revision 1.53 >diff -u -r1.53 IPDEBuildConstants.java >--- src/org/eclipse/pde/internal/build/IPDEBuildConstants.java 1 Mar 2010 23:19:26 -0000 1.53 >+++ src/org/eclipse/pde/internal/build/IPDEBuildConstants.java 20 Apr 2010 20:03:53 -0000 >@@ -146,4 +146,7 @@ > //container feature used in building .product files > public final static String CONTAINER_FEATURE = "org.eclipse.pde.build.container.feature"; //$NON-NLS-1$ > public final static String UI_CONTAINER_FEATURE = "org.eclipse.pde.container.feature"; //$NON-NLS-1$ >+ >+ public final static String JDT_CORE_PREFS = ".settings/org.eclipse.jdt.core.prefs"; //$NON-NLS-1$ >+ public final static String TOKEN_BASEDIR = "%BASEDIR%"; //$NON-NLS-1$ > } >Index: src/org/eclipse/pde/internal/build/ant/AntScript.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/AntScript.java,v >retrieving revision 1.70 >diff -u -r1.70 AntScript.java >--- src/org/eclipse/pde/internal/build/ant/AntScript.java 21 Jan 2010 16:41:31 -0000 1.70 >+++ src/org/eclipse/pde/internal/build/ant/AntScript.java 20 Apr 2010 20:03:53 -0000 >@@ -1068,4 +1068,12 @@ > return String.valueOf(c); > } > } >+ >+ public void printReplaceTask(String file, String token, String value) { >+ Map arguments = new HashMap(); >+ arguments.put("file", file); //$NON-NLS-1$ >+ arguments.put("token", token); //$NON-NLS-1$ >+ arguments.put("value", value); //$NON-NLS-1$ >+ printElement("replace", arguments); //$NON-NLS-1$ >+ } > } >Index: src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java,v >retrieving revision 1.141 >diff -u -r1.141 ModelBuildScriptGenerator.java >--- src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java 7 Apr 2010 20:06:10 -0000 1.141 >+++ src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java 20 Apr 2010 20:03:53 -0000 >@@ -1302,7 +1302,7 @@ > * @param javac > * @param entry > */ >- private void generateCompilerSettings(JavacTask javac, CompiledEntry entry, List classpath) { >+ private File generateCompilerSettings(JavacTask javac, CompiledEntry entry, List classpath) { > final String ADAPTER_ENCODING = "#ADAPTER#ENCODING#"; //$NON-NLS-1$ > final String ADAPTER_ACCESS = "#ADAPTER#ACCESS#"; //$NON-NLS-1$ > >@@ -1310,10 +1310,10 @@ > try { > properties = getBuildProperties(); > } catch (CoreException e) { >- return; >+ return null; > } > if (properties == null && classpath.size() == 0) >- return; >+ return null; > > String name = entry.getName(false); > >@@ -1345,8 +1345,19 @@ > String warningLevels = properties.getProperty(PROPERTY_JAVAC_WARNINGS_PREFIX + name); > String errorLevels = properties.getProperty(PROPERTY_JAVAC_ERRORS_PREFIX + name); > >- if (customEncodingsVal == null && warningLevels == null && errorLevels == null && classpath.size() == 0) { >- return; >+ String projectWarningSettings = properties.getProperty(PROPERTY_USE_PROJECT_WARNINGS); >+ String warningPrefs = null; >+ if (Boolean.valueOf(projectWarningSettings).booleanValue()) { >+ //find default prefs file >+ if (new File(model.getLocation(), JDT_CORE_PREFS).exists()) >+ warningPrefs = JDT_CORE_PREFS; >+ } else if (projectWarningSettings != null && !FALSE.equalsIgnoreCase(projectWarningSettings)) { >+ if (new File(model.getLocation(), projectWarningSettings).exists()) >+ warningPrefs = projectWarningSettings; >+ } >+ >+ if (customEncodingsVal == null && warningLevels == null && errorLevels == null && classpath.size() == 0 && warningPrefs == null) { >+ return null; > } > > String root = getLocation(model); >@@ -1358,7 +1369,7 @@ > try { > try { > //only create the file if we are going to write something in it >- if (warningLevels != null || customEncodingsVal != null || errorLevels != null) >+ if (warningLevels != null || customEncodingsVal != null || errorLevels != null || warningPrefs != null) > writer = new BufferedWriter(new FileWriter(file)); > > if (warningLevels != null) { >@@ -1369,6 +1380,9 @@ > writer.write("-err:" + errorLevels + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ > } > >+ if (warningPrefs != null) >+ writer.write("-properties \"" + TOKEN_BASEDIR + '/' + warningPrefs + "\"\n"); //$NON-NLS-1$ //$NON-NLS-2$ >+ > if (customEncodingsVal != null) { > String[] encodings = customEncodingsVal.split(","); //$NON-NLS-1$ > if (encodings.length > 0) { >@@ -1407,6 +1421,7 @@ > } catch (IOException e1) { > //ignore > } >+ return file; > } > > /** >@@ -1461,7 +1476,6 @@ > } > } > } else { >- script.printComment("compile the source code"); //$NON-NLS-1$ > JavacTask javac = new JavacTask(); > javac.setClasspathId(name + PROPERTY_CLASSPATH); > javac.setBootClasspath(Utils.getPropertyFormat(PROPERTY_BUNDLE_BOOTCLASSPATH)); >@@ -1477,8 +1491,12 @@ > javac.setLogExtension(Utils.getPropertyFormat(PROPERTY_LOG_EXTENSION)); > if (generateErrorPropertyAttribute) > javac.setErrorProperty(PROPERTY_COMPILATION_ERROR); >- generateCompilerSettings(javac, entry, classpath); > >+ File argFile = generateCompilerSettings(javac, entry, classpath); >+ if (argFile != null) >+ script.printReplaceTask(Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + argFile.getName(), TOKEN_BASEDIR, Utils.getPropertyFormat(PROPERTY_BASEDIR)); >+ >+ script.printComment("compile the source code"); //$NON-NLS-1$ > script.print(javac); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 291528
:
165473
|
165495
|
165570
|
165606
|
165630