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 42947 Details for
Bug 144248
[batch] Progressive help text
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Implementation + amended test cases
org.eclipse.jdt.core_03.txt (text/plain), 14.52 KB, created by
Maxime Daniel
on 2006-05-30 09:34:04 EDT
(
hide
)
Description:
Implementation + amended test cases
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2006-05-30 09:34:04 EDT
Size:
14.52 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.59.2.3 >diff -u -r1.59.2.3 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 29 May 2006 12:20:10 -0000 1.59.2.3 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 29 May 2006 16:32:41 -0000 >@@ -898,8 +898,75 @@ > " \n" + > " Warning options:\n" + > " -deprecation + deprecation outside deprecated code\n" + >- " -nowarn disable all warnings\n" + >- " -warn:none disable all warnings\n" + >+ " -nowarn -warn:none disable all warnings\n" + >+ " -?:warn -help:warn display advanced warning options\n" + >+ " \n" + >+ " Debug options:\n" + >+ " -g[:lines,vars,source] custom debug info\n" + >+ " -g:lines,source + both lines table and source debug info\n" + >+ " -g all debug info\n" + >+ " -g:none no debug info\n" + >+ " -preserveAllLocals preserve unused local vars for debug purpose\n" + >+ " \n" + >+ " Ignored options:\n" + >+ " -J<option> pass option to virtual machine (ignored)\n" + >+ " -X<option> specify non-standard option (ignored)\n" + >+ " -X print non-standard options and exit (ignored)\n" + >+ " -O optimize for execution time (ignored)\n" + >+ " \n" + >+ " Advanced options:\n" + >+ " @<file> read command line arguments from file\n" + >+ " -maxProblems <n> max number of problems per compilation unit (100 by\n" + >+ " default)\n" + >+ " -log <file> log to a file. If the file extension is ''.xml'', then\n" + >+ " the log will be a xml file.\n" + >+ " -proceedOnError do not stop at first error, dumping class files with\n" + >+ " problem methods\n" + >+ " -verbose enable verbose output\n" + >+ " -referenceInfo compute reference info\n" + >+ " -progress show progress (only in -log mode)\n" + >+ " -time display speed information \n" + >+ " -noExit do not call System.exit(n) at end of compilation (n==0\n" + >+ " if no error)\n" + >+ " -repeat <n> repeat compilation process <n> times for perf analysis\n" + >+ " -inlineJSR inline JSR bytecode (implicit if target >= 1.5)\n" + >+ " -enableJavadoc consider references in javadoc\n" + >+ " -Xemacs used to enable emacs-style output\n" + >+ " \n" + >+ " -? -help print this help message\n" + >+ " -v -version print compiler version\n" + >+ " -showversion print compiler version and continue\n" + >+ "\n"; >+ >+ this.runConformTest( >+ new String[0], >+ " -help -referenceInfo", >+ MessageFormat.format(expectedOutput, new String[] { >+ Main.bind("compiler.name"), >+ Main.bind("compiler.version"), >+ Main.bind("compiler.copyright") >+ // because misc.version is mono-line - reconsider if this changes >+// MessageFormat.format(expectedOutput, new String[] { >+// Main.bind("misc.version", new String[] { >+// Main.bind("compiler.name"), >+// Main.bind("compiler.version"), >+// Main.bind("compiler.copyright") >+// }), >+ // File.pathSeparator >+ }), >+ "", true); >+} >+//command line - help >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=144248 >+// Progressive help text modifies the help options and messages. >+public void test012b(){ >+ final String expectedOutput = >+ "{0} {1}\n" + >+ "{2}\n" + >+ " \n" + >+ " Warning options:\n" + >+ " -deprecation + deprecation outside deprecated code\n" + >+ " -nowarn -warn:none disable all warnings\n" + > " -warn:<warnings separated by ,> enable exactly the listed warnings\n" + > " -warn:+<warnings separated by ,> enable additional warnings\n" + > " -warn:-<warnings separated by ,> disable specific warnings\n" + >@@ -962,46 +1029,13 @@ > " varargsCast + varargs argument need explicit cast\n" + > " warningToken + unhandled warning token in @SuppressWarnings\n" + > " \n" + >- " Debug options:\n" + >- " -g[:lines,vars,source] custom debug info\n" + >- " -g:lines,source + both lines table and source debug info\n" + >- " -g all debug info\n" + >- " -g:none no debug info\n" + >- " -preserveAllLocals preserve unused local vars for debug purpose\n" + >- " \n" + >- " Ignored options:\n" + >- " -J<option> pass option to virtual machine (ignored)\n" + >- " -X<option> specify non-standard option (ignored)\n" + >- " -X print non-standard options and exit (ignored)\n" + >- " -O optimize for execution time (ignored)\n" + >- " \n" + > " Advanced options:\n" + >- " @<file> read command line arguments from file\n" + >- " -maxProblems <n> max number of problems per compilation unit (100 by\n" + >- " default)\n" + >- " -log <file> log to a file. If the file extension is ''.xml'', then\n" + >- " the log will be a xml file.\n" + >- " -proceedOnError do not stop at first error, dumping class files with\n" + >- " problem methods\n" + >- " -verbose enable verbose output\n" + >- " -referenceInfo compute reference info\n" + >- " -progress show progress (only in -log mode)\n" + >- " -time display speed information \n" + >- " -noExit do not call System.exit(n) at end of compilation (n==0\n" + >- " if no error)\n" + >- " -repeat <n> repeat compilation process <n> times for perf analysis\n" + >- " -inlineJSR inline JSR bytecode (implicit if target >= 1.5)\n" + >- " -enableJavadoc consider references in javadoc\n" + >- " -Xemacs used to enable emacs-style output\n" + >- " \n" + >- " -? -help print this help message\n" + >- " -v -version print compiler version\n" + >- " -showversion print compiler version and continue\n" + >+ " -? -help print the help message\n" + > "\n"; > > this.runConformTest( > new String[0], >- " -help -referenceInfo", >+ " -help:warn -referenceInfo", > MessageFormat.format(expectedOutput, new String[] { > Main.bind("compiler.name"), > Main.bind("compiler.version"), >#P org.eclipse.jdt.core >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.537.2.4 >diff -u -r1.537.2.4 messages.properties >--- batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 29 May 2006 12:19:58 -0000 1.537.2.4 >+++ batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 29 May 2006 16:32:44 -0000 >@@ -146,8 +146,50 @@ > \ \n\ > \ Warning options:\n\ > \ -deprecation + deprecation outside deprecated code\n\ >-\ -nowarn disable all warnings\n\ >-\ -warn:none disable all warnings\n\ >+\ -nowarn -warn:none disable all warnings\n\ >+\ -?:warn -help:warn display advanced warning options\n\ >+\ \n\ >+\ Debug options:\n\ >+\ -g[:lines,vars,source] custom debug info\n\ >+\ -g:lines,source + both lines table and source debug info\n\ >+\ -g all debug info\n\ >+\ -g:none no debug info\n\ >+\ -preserveAllLocals preserve unused local vars for debug purpose\n\ >+\ \n\ >+\ Ignored options:\n\ >+\ -J<option> pass option to virtual machine (ignored)\n\ >+\ -X<option> specify non-standard option (ignored)\n\ >+\ -X print non-standard options and exit (ignored)\n\ >+\ -O optimize for execution time (ignored)\n\ >+\ \n\ >+\ Advanced options:\n\ >+\ @<file> read command line arguments from file\n\ >+\ -maxProblems <n> max number of problems per compilation unit (100 by\n\ >+\ default)\n\ >+\ -log <file> log to a file. If the file extension is ''.xml'', then\n\ >+\ the log will be a xml file.\n\ >+\ -proceedOnError do not stop at first error, dumping class files with\n\ >+\ problem methods\n\ >+\ -verbose enable verbose output\n\ >+\ -referenceInfo compute reference info\n\ >+\ -progress show progress (only in -log mode)\n\ >+\ -time display speed information \n\ >+\ -noExit do not call System.exit(n) at end of compilation (n==0\n\ >+\ if no error)\n\ >+\ -repeat <n> repeat compilation process <n> times for perf analysis\n\ >+\ -inlineJSR inline JSR bytecode (implicit if target >= 1.5)\n\ >+\ -enableJavadoc consider references in javadoc\n\ >+\ -Xemacs used to enable emacs-style output\n\ >+\ \n\ >+\ -? -help print this help message\n\ >+\ -v -version print compiler version\n\ >+\ -showversion print compiler version and continue\n >+misc.usage.warn = {1} {2}\n\ >+{3}\n\ >+\ \n\ >+\ Warning options:\n\ >+\ -deprecation + deprecation outside deprecated code\n\ >+\ -nowarn -warn:none disable all warnings\n\ > \ -warn:<warnings separated by ,> enable exactly the listed warnings\n\ > \ -warn:+<warnings separated by ,> enable additional warnings\n\ > \ -warn:-<warnings separated by ,> disable specific warnings\n\ >@@ -210,41 +252,8 @@ > \ varargsCast + varargs argument need explicit cast\n\ > \ warningToken + unhandled warning token in @SuppressWarnings\n\ > \ \n\ >-\ Debug options:\n\ >-\ -g[:lines,vars,source] custom debug info\n\ >-\ -g:lines,source + both lines table and source debug info\n\ >-\ -g all debug info\n\ >-\ -g:none no debug info\n\ >-\ -preserveAllLocals preserve unused local vars for debug purpose\n\ >-\ \n\ >-\ Ignored options:\n\ >-\ -J<option> pass option to virtual machine (ignored)\n\ >-\ -X<option> specify non-standard option (ignored)\n\ >-\ -X print non-standard options and exit (ignored)\n\ >-\ -O optimize for execution time (ignored)\n\ >-\ \n\ > \ Advanced options:\n\ >-\ @<file> read command line arguments from file\n\ >-\ -maxProblems <n> max number of problems per compilation unit (100 by\n\ >-\ default)\n\ >-\ -log <file> log to a file. If the file extension is ''.xml'', then\n\ >-\ the log will be a xml file.\n\ >-\ -proceedOnError do not stop at first error, dumping class files with\n\ >-\ problem methods\n\ >-\ -verbose enable verbose output\n\ >-\ -referenceInfo compute reference info\n\ >-\ -progress show progress (only in -log mode)\n\ >-\ -time display speed information \n\ >-\ -noExit do not call System.exit(n) at end of compilation (n==0\n\ >-\ if no error)\n\ >-\ -repeat <n> repeat compilation process <n> times for perf analysis\n\ >-\ -inlineJSR inline JSR bytecode (implicit if target >= 1.5)\n\ >-\ -enableJavadoc consider references in javadoc\n\ >-\ -Xemacs used to enable emacs-style output\n\ >-\ \n\ >-\ -? -help print this help message\n\ >-\ -v -version print compiler version\n\ >-\ -showversion print compiler version and continue\n >+\ -? -help print the help message\n\ > > # templates > ### access restrictions >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.254 >diff -u -r1.254 Main.java >--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 2 May 2006 13:45:31 -0000 1.254 >+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 29 May 2006 16:32:44 -0000 >@@ -1425,6 +1425,7 @@ > int mode = DEFAULT; > this.repetitions = 0; > boolean printUsageRequired = false; >+ String usageSection = null; > boolean printVersionRequired = false; > > boolean didSpecifyDefaultEncoding = false; >@@ -1725,6 +1726,12 @@ > mode = DEFAULT; > continue; > } >+ if (currentArg.equals("-help:warn") || //$NON-NLS-1$ >+ currentArg.equals("-?:warn")) { //$NON-NLS-1$ >+ printUsageRequired = true; >+ usageSection = "misc.usage.warn"; //$NON-NLS-1$ >+ continue; >+ } > if (currentArg.equals("-noExit")) { //$NON-NLS-1$ > this.systemExitWhenFinished = false; > mode = DEFAULT; >@@ -2389,7 +2396,11 @@ > this.logger.logVersion(printVersionRequired); > > if (printUsageRequired || filesCount == 0) { >- printUsage(); >+ if (usageSection == null) { >+ printUsage(); // default >+ } else { >+ printUsage(usageSection); >+ } > this.proceed = false; > return; > } >@@ -2957,14 +2968,18 @@ > environment.cleanup(); > } > public void printUsage() { >- this.logger.logUsage(Main.bind("misc.usage", //$NON-NLS-1$ >- new String[] { >- System.getProperty("path.separator"), //$NON-NLS-1$ >- Main.bind("compiler.name"), //$NON-NLS-1$ >- Main.bind("compiler.version"), //$NON-NLS-1$ >- Main.bind("compiler.copyright") //$NON-NLS-1$ >- } >- )); >+ printUsage("misc.usage"); //$NON-NLS-1$ >+} >+private void printUsage(String sectionID) { >+ this.logger.logUsage( >+ Main.bind( >+ sectionID, >+ new String[] { >+ System.getProperty("path.separator"), //$NON-NLS-1$ >+ Main.bind("compiler.name"), //$NON-NLS-1$ >+ Main.bind("compiler.version"), //$NON-NLS-1$ >+ Main.bind("compiler.copyright") //$NON-NLS-1$ >+ })); > this.logger.flush(); > } >
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 144248
: 42947