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 165570 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]
Proposed fix
patch_291528.txt (text/plain), 7.00 KB, created by
Olivier Thomann
on 2010-04-21 09:11:06 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-04-21 09:11:06 EDT
Size:
7.00 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v >retrieving revision 1.351 >diff -u -r1.351 Main.java >--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 25 Feb 2010 19:17:04 -0000 1.351 >+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2010 13:09:55 -0000 >@@ -15,8 +15,10 @@ > *******************************************************************************/ > package org.eclipse.jdt.internal.compiler.batch; > >+import java.io.BufferedInputStream; > import java.io.ByteArrayInputStream; > import java.io.File; >+import java.io.FileInputStream; > import java.io.FileNotFoundException; > import java.io.FileOutputStream; > import java.io.FilenameFilter; >@@ -41,6 +43,7 @@ > import java.util.Locale; > import java.util.Map; > import java.util.MissingResourceException; >+import java.util.Properties; > import java.util.ResourceBundle; > import java.util.Set; > import java.util.StringTokenizer; >@@ -1713,6 +1716,7 @@ > final int INSIDE_PROCESSOR_start = 18; > final int INSIDE_S_start = 19; > final int INSIDE_CLASS_NAMES = 20; >+ final int INSIDE_WARNINGS_PROPERTIES = 21; > > final int DEFAULT = 0; > ArrayList bootclasspaths = new ArrayList(DEFAULT_SIZE_CLASSPATH); >@@ -2095,7 +2099,7 @@ > continue; > } > if (currentArg.equals("-inlineJSR")) { //$NON-NLS-1$ >- mode = DEFAULT; >+ mode = DEFAULT; > this.options.put( > CompilerOptions.OPTION_InlineJsr, > CompilerOptions.ENABLED); >@@ -2368,6 +2372,10 @@ > mode = INSIDE_CLASS_NAMES; > continue; > } >+ if (currentArg.equals("-properties")) { //$NON-NLS-1$ >+ mode = INSIDE_WARNINGS_PROPERTIES; >+ continue; >+ } > break; > case INSIDE_TARGET : > if (this.didSpecifyTarget) { >@@ -2544,6 +2552,10 @@ > } > mode = DEFAULT; > continue; >+ case INSIDE_WARNINGS_PROPERTIES : >+ initializeWarnings(currentArg); >+ mode = DEFAULT; >+ continue; > } > > // default is input directory, if no custom destination path exists >@@ -2720,6 +2732,37 @@ > this.pendingErrors = null; > } > } >+private void initializeWarnings(String propertiesFile) { >+ File file = new File(propertiesFile); >+ if (!file.exists()) { >+ throw new IllegalArgumentException(this.bind("configure.missingwarningspropertiesfile", propertiesFile)); //$NON-NLS-1$ >+ } >+ BufferedInputStream stream = null; >+ Properties properties = null; >+ try { >+ stream = new BufferedInputStream(new FileInputStream(propertiesFile)); >+ properties = new Properties(); >+ properties.load(stream); >+ } catch(IOException e) { >+ e.printStackTrace(); >+ throw new IllegalArgumentException(this.bind("configure.ioexceptionwarningspropertiesfile", propertiesFile)); //$NON-NLS-1$ >+ } finally { >+ if (stream != null) { >+ try { >+ stream.close(); >+ } catch(IOException e) { >+ // ignore >+ } >+ } >+ } >+ for (Iterator iterator = properties.entrySet().iterator(); iterator.hasNext(); ) { >+ Map.Entry entry = (Map.Entry) iterator.next(); >+ final String key = (String) entry.getKey(); >+ if (key.startsWith("org.eclipse.jdt.core.compiler.problem")) { //$NON-NLS-1$ >+ this.options.put(key, entry.getValue()); >+ } >+ } >+} > protected void disableWarnings() { > Object[] entries = this.options.entrySet().toArray(); > for (int i = 0, max = entries.length; i < max; i++) { >Index: batch/org/eclipse/jdt/internal/compiler/batch/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties,v >retrieving revision 1.891 >diff -u -r1.891 messages.properties >--- batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 20 Apr 2010 11:48:19 -0000 1.891 >+++ batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 21 Apr 2010 13:09:55 -0000 >@@ -95,6 +95,8 @@ > configure.incompatibleComplianceForCldcTarget=Target level ''{0}'' is incompatible with compliance level ''{1}''. A compliance level ''1.4''or lower is required > configure.invalidClasspathSection = invalid Class-Path header in manifest of jar file: {0} > configure.multipleClasspathSections = multiple Class-Path headers in manifest of jar file: {0} >+configure.missingwarningspropertiesfile=properties file {0} does not exist >+configure.ioexceptionwarningspropertiesfile=An IOException occurred while reading the properties file {0} > > ### requestor > requestor.error = {0}. ERROR in {1} >@@ -182,6 +184,12 @@ > \ -err:-<warnings separated by ,> disable specific warnings to be\n\ > \ reported as errors\n\ > \ \n\ >+\ Setting warning or error options using properties file:\n\ >+\ -properties: <file> set warnings/errors option based on the properties\n\ >+\ file contents. This option can be used with -nowarn,\n\ >+\ -err:.. or -warn:.. options, but the last one on the\n\ >+\ command line sets the options to be used.\n\ >+\ \n\ > \ Debug options:\n\ > \ -g[:lines,vars,source] custom debug info\n\ > \ -g:lines,source + both lines table and source debug info\n\ >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v >retrieving revision 1.205 >diff -u -r1.205 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 17 Mar 2010 16:10:02 -0000 1.205 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 21 Apr 2010 13:09:56 -0000 >@@ -48,7 +48,7 @@ > > static { > // TESTS_NAMES = new String[] { "test292_warn_options" }; >-// TESTS_NUMBERS = new int[] { 298 }; >+// TESTS_NUMBERS = new int[] { 12 }; > // TESTS_RANGE = new int[] { 298, -1 }; > } > public BatchCompilerTest(String name) { >@@ -1553,6 +1553,12 @@ > " -err:-<warnings separated by ,> disable specific warnings to be\n" + > " reported as errors\n" + > " \n" + >+ " Setting warning or error options using properties file:\n" + >+ " -properties: <file> set warnings/errors option based on the properties\n" + >+ " file contents. This option can be used with -nowarn,\n" + >+ " -err:.. or -warn:.. options, but the last one on the\n" + >+ " command line sets the options to be used.\n" + >+ " \n" + > " Debug options:\n" + > " -g[:lines,vars,source] custom debug info\n" + > " -g:lines,source + both lines table and source debug info\n" +
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