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 33911 Details for
Bug 125961
Add "emacs style" output to batch compiler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch to add -Xemacs flag
P (text/plain), 4.73 KB, created by
Tom Tromey
on 2006-01-31 19:57:09 EST
(
hide
)
Description:
patch to add -Xemacs flag
Filename:
MIME Type:
Creator:
Tom Tromey
Created:
2006-01-31 19:57:09 EST
Size:
4.73 KB
patch
obsolete
>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.228 >diff -u -r1.228 Main.java >--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 30 Jan 2006 15:13:48 -0000 1.228 >+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 1 Feb 2006 00:53:38 -0000 >@@ -170,6 +170,7 @@ > } > private PrintWriter err; > boolean isXml; >+ private boolean isEmacs; > private PrintWriter log; > private PrintWriter out; > private int tab; >@@ -179,6 +180,7 @@ > this.out = out; > this.err = err; > this.isXml = false; >+ this.isEmacs = false; > this.parameters = new HashMap(); > } > >@@ -222,6 +224,10 @@ > this.printlnOut(Main.bind("progress.compiling")); //$NON-NLS-1$ > } > >+ public void setEmacs() { >+ this.isEmacs = true; >+ } >+ > /** > * Used to stop logging problems. > * Only use in xml mode. >@@ -492,26 +498,39 @@ > > private void logProblem(IProblem problem, int localErrorCount, > int globalErrorCount, char[] unitSource) { >- if (localErrorCount == 0) { >- this.printlnErr("----------"); //$NON-NLS-1$ >+ if (this.isEmacs) { >+ String result = (new String(problem.getOriginatingFileName()) >+ + ":" //$NON-NLS-1$ >+ + problem.getSourceLineNumber() >+ + ": " //$NON-NLS-1$ >+ + (problem.isError() ? Main.bind("Main.emacs.error") : Main.bind("Main.emacs.warning")) //$NON-NLS-1$ //$NON-NLS-2$ >+ + ": " //$NON-NLS-1$ >+ + problem.getMessage()); >+ this.printlnErr(result); >+ } else { >+ if (localErrorCount == 0) { >+ this.printlnErr("----------"); //$NON-NLS-1$ >+ } >+ this.printlnErr(problem.isError() ? >+ Main.bind( >+ "requestor.error", //$NON-NLS-1$ >+ Integer.toString(globalErrorCount), >+ new String(problem.getOriginatingFileName())) >+ : Main.bind( >+ "requestor.warning", //$NON-NLS-1$ >+ Integer.toString(globalErrorCount), >+ new String(problem.getOriginatingFileName()))); > } >- this.printlnErr(problem.isError() ? >- Main.bind( >- "requestor.error", //$NON-NLS-1$ >- Integer.toString(globalErrorCount), >- new String(problem.getOriginatingFileName())) >- : Main.bind( >- "requestor.warning", //$NON-NLS-1$ >- Integer.toString(globalErrorCount), >- new String(problem.getOriginatingFileName()))); > try { > this.printlnErr(((DefaultProblem) problem).errorReportSource(unitSource)); >- this.printlnErr(problem.getMessage()); >+ if (! this.isEmacs) >+ this.printlnErr(problem.getMessage()); > } catch (Exception e) { > this.printlnErr(Main.bind( > "requestor.notRetrieveErrorMessage", problem.toString())); //$NON-NLS-1$ > } >- this.printlnErr("----------"); //$NON-NLS-1$ >+ if (! this.isEmacs) >+ this.printlnErr("----------"); //$NON-NLS-1$ > } > > /** >@@ -578,6 +597,8 @@ > })); > } > } >+ if (this.isEmacs) >+ this.printlnErr(""); //$NON-NLS-1$ > } > > public int logProblems(IProblem[] problems, char[] unitSource, Main currentMain) { >@@ -1960,6 +1981,11 @@ > useEnableJavadoc = true; > continue; > } >+ if (currentArg.equals("-Xemacs")) { //$NON-NLS-1$ >+ mode = Default; >+ this.logger.setEmacs(); >+ continue; >+ } > // tolerated javac options - quietly filtered out > if (currentArg.startsWith("-X")) { //$NON-NLS-1$ > mode = Default; >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.491 >diff -u -r1.491 messages.properties >--- batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 31 Jan 2006 11:19:01 -0000 1.491 >+++ batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 1 Feb 2006 00:53:39 -0000 >@@ -223,3 +223,5 @@ > template.restrictedAccess.field = The field {0} from the type {1} is not accessible due to restriction on classpath entry {2} > template.restrictedAccess.method = The method {0} from the type {1} is not accessible due to restriction on classpath entry {2} > >+Main.emacs.error=error >+Main.emacs.warning=warning >Index: .settings/org.eclipse.core.resources.prefs >=================================================================== >RCS file: .settings/org.eclipse.core.resources.prefs >diff -N .settings/org.eclipse.core.resources.prefs >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .settings/org.eclipse.core.resources.prefs 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,3 @@ >+#Tue Jan 31 16:52:17 MST 2006 >+eclipse.preferences.version=1 >+encoding//compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java=ISO-8859-1
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 125961
: 33911