Re: flymake integration for the eclipse java compiler
"Jason Coffin" <[email protected]> Fri, 27 Apr 2007 15:05:35 -0400
| Newsgroups | gmane.emacs.jdee |
|---|---|
| Message-ID | <[email protected]> |
On 4/26/07, Suraj Acharya <[email protected]> wrote: > Looks like another windows issue - filename expansion this time. Can > you try this ? > > (defun jde-ecj-server-flymake-init () > "Run the Eclipse Java compiler to collect flymake errors. > To use this funtion set the java line in `flymake-allowed-file-name-masks' to > (\"\\.java\\'\" jde-ecj-server-flymake-init jde-ecj-flymake-cleanup)" > > (unless jde-ecj-server-setup-called > (jde-ecj-server-setup)) > > (if (not (object-of-class-p (jde-compile-get-the-compiler) > 'jde-compile-ejc-server)) > (error "The ecj option for flymake can only be set when the > jde-compiler is also set to ecj") > ;; else > (let* ((temp-file (flymake-init-create-temp-buffer-copy > 'jde-ecj-create-temp-file)) > (directory-sep-char ?/) > (args (append (jde-compile-classpath-arg > (jde-compile-get-the-compiler)) > (list "-Xemacs" "-noExit") > jde-ecj-command-line-args)) > (arg-array (concat "new String[] {")) > (bsh-process (oref (oref (oref 'jde-bsh the-bsh) buffer) process))) > > (unless (jde-bsh-running-p) > (bsh-launch (oref 'jde-bsh the-bsh)) > (bsh-eval (oref 'jde-bsh the-bsh) (jde-create-prj-values-str))) > > (if args (setq arg-array (concat arg-array > (mapconcat > (lambda (arg) > (concat "\"" arg "\"")) args ",") > ","))) > > (setq arg-array (concat arg-array "\"" temp-file "\"}")) > > > (list (cons bsh-process ;; server process > "bsh %") ;; output end marker > ;; compile command > (concat (format > "(new > org.eclipse.jdt.internal.compiler.batch.Main(new > java.io.PrintWriter(System.out), > > new java.io.PrintWriter(System.err), true)).compile(%s);" > arg-array)))))) Done. But the same issue is happening, only the first line of my source file is highlighted. Below is the output (I wonder if the: parsed 'bsh % ', no line-err-info has anything to do with it). received 287 byte(s) of output from process 3532 output : c:\Documents and Settings\jcoffin\Local Settings\Temp\-12027872\ISPSpamComplaintHandler.java:50: error: Syntax error on token "stati", static expected public stati final String MAIL_SERVER_NAME = "backoffice.ISPSpamCompliantHandler.ServerName."; ^^^^^ 1 problem (1 error) bsh % file e:/work/LTY-P000039/backoffice/process/src/main/java/com/upromise/backoffice/daemons/ISPSpamComplaintHandler.java, init=jde-ecj-server-flymake-init parse line: file-idx=2 line-idx=4 file=c:\Documents and Settings\jcoffin\Local Settings\Temp\-12027872\ISPSpamComplaintHandler.java line=50 text=error: Syntax error on token "stati", static expected get-real-file-name: file-name=c:\Documents and Settings\jcoffin\Local Settings\Temp\-12027872\ISPSpamComplaintHandler.java real-name=c:/Documents and Settings/jcoffin/Local Settings/Temp/-12027872/ISPSpamComplaintHandler.java parsed 'c:\Documents and Settings\jcoffin\Local Settings\Temp\-12027872\ISPSpamComplaintHandler.java:50: error: Syntax error on token "stati", static expected', got line-err-info parsed ' public stati final String MAIL_SERVER_NAME = "backoffice.ISPSpamCompliantHandler.ServerName.";', no line-err-info parsed ' ^^^^^', no line-err-info parsed '1 problem (1 error)', no line-err-info file e:/work/LTY-P000039/backoffice/process/src/main/java/com/upromise/backoffice/daemons/ISPSpamComplaintHandler.java, init=jde-ecj-server-flymake-init server process 3532 "exited" with output c:\Documents and Settings\jcoffin\Local Settings\Temp\-12027872\ISPSpamComplaintHandler.java:50: error: Syntax error on token "stati", static expected public stati final String MAIL_SERVER_NAME = "backoffice.ISPSpamCompliantHandler.ServerName."; ^^^^^ 1 problem (1 error) bsh % cleaning up using jde-ecj-flymake-cleanup deleted file c:/DOCUME~1/jcoffin/LOCALS~1/Temp/-12027872/ISPSpamComplaintHandler.java file e:/work/LTY-P000039/backoffice/process/src/main/java/com/upromise/backoffice/daemons/ISPSpamComplaintHandler.java, init=jde-ecj-server-flymake-init parsed 'bsh % ', no line-err-info created an overlay at (1-41) ISPSpamComplaintHandler.java: 1 error(s), 0 warning(s) in 0.72 second(s)