Currently the efm i used on mac is set efm=%A\ %#[javac]\ %f:%l:\ %m,%A\ %#[aapt]\ %f:%l:\ %m,%-Z\ %#[javac]\ %p^,%-C%.%#. It can actually locate the error location and show a brief error info, but the detail i can only get by switching to terminal.
BTW, the efm works quite good on archlinux.
Here is the output:
-compile:
[javac] Compiling 8 source files to /Users/ccheng/workspace_tb/Android_RollingBall/bin/classes
[javac] /Users/ccheng/workspace_tb/Android_RollingBall/src/hongbosb/rollingball/GLDrawable.java:22: incompatible types
[javac] found : void
[javac] required: int
[javac] mEnvProgram = Utils.loadProgram(context, "environment_vertex_shader.glsl", "environment_fragment_shader.glsl");
[javac] ^
[javac] /Users/ccheng/workspace_tb/Android_RollingBall/src/hongbosb/rollingball/EnvironmentGLDrawable.java:15: cannot find symbol
[javac] symbol : constructor GLDrawable()
[javac] location: class hongbosb.rollingball.GLDrawable
[javac] public EnvironmentGLDrawable(Context context) {
[javac] ^
[javac] /Users/ccheng/workspace_tb/Android_RollingBall/src/hongbosb/rollingball/MyRenderer.java:31: cannot find symbol
[javac] symbol : variable context
[javac] location: class hongbosb.rollingball.MyRenderer
[javac] mEnvironment = new EnvironmentGLDrawable(context);
[javac] ^
[javac] 3 errors
And the following is what my vim missed.
[javac] found : void
[javac] required: int
[javac] mEnvProgram = Utils.loadProgram(context, "environment_vertex_shader.glsl", "environment_fragment_shader.glsl");
[javac] ^
[javac]
Ok I’m going to reformat it so that it’s easier (for me) to deal with…
You only have one line in the javac detector that grabs a message. You just need to add more of them. Add the following somewhere above the
%-Cline:You probably also want to do something similar for the aapt messages although if those are one-liners then I think you just strike the
%Apart that begins its line;%Ameans that it’s the start of a multiline message so it’ll consider everything that follows it part of the aapt message until a%Zis matched. The%-Cbit says “matches for this are uninteresting”; these are things in your multiline message (e.g. the things that aren’t showing up) that you’ve told vim to skip.