Netbeans Ant build.compiler.emacs

Netbeans Ant build.compiler.emacs,netbeans,emacs,ant,jikes,Netbeans,Emacs,Ant,Jikes,Netbeans中的默认ant设置将属性build.compiler.emacs设置为true。这是什么意思?ant文档只是说 启用与emacs兼容的错误消息 我知道emacs是一个编辑器,尽管我没有使用过它。将此属性设置为true或false会产生什么影响?您可能没有注意到描述javac任务的部分在“Jikes注释”中。这是一种在使用编译器时修改编译结果消息格式的设置,当Emacs编辑器调用ant时(例如,在使用时),编辑器可以解析结果消息并在与消息相关的文件中的正确位置跳转 NB包含了这样一

Netbeans中的默认ant设置将属性
build.compiler.emacs
设置为
true
。这是什么意思?ant文档只是说

启用与emacs兼容的错误消息


我知道emacs是一个编辑器,尽管我没有使用过它。将此属性设置为true或false会产生什么影响?

您可能没有注意到描述javac任务的部分在“Jikes注释”中。这是一种在使用编译器时修改编译结果消息格式的设置,当Emacs编辑器调用ant时(例如,在使用时),编辑器可以解析结果消息并在与消息相关的文件中的正确位置跳转

NB包含了这样一个编译器设置,这确实有点奇怪,它不是标准的,而且似乎已经被抛弃了近十年

给定以下ant
build.xml
文件

当您通过将
build.compiler.emacs
属性更改为
on
获得此输出时:

Buildfile: /Users/seb/projets/java/ant/build.xml

compile:
    [javac] Compiling 1 source file to /Users/seb/projets/java/ant
    [javac] Hello.java:5:52:5:54: Semantic Error: No accessible field named "foo" was found in type "Hello".

BUILD FAILED
/Users/seb/projets/java/ant/build.xml:5: Compile failed; see the compiler error output for details.

Total time: 1 second
在后一个版本中,消息没有那么新奇,Emacs更能解析它们

Buildfile: /Users/seb/projets/java/ant/build.xml

compile:
    [javac] Compiling 1 source file to /Users/seb/projets/java/ant
    [javac] 
    [javac] Found 1 semantic error compiling "Hello.java":
    [javac] 
    [javac]      5.                 System.out.println("Hello, World!"+foo);
    [javac]                                                            ^-^
    [javac] *** Semantic Error: No accessible field named "foo" was found in type "Hello".

BUILD FAILED
/Users/seb/projets/java/ant/build.xml:5: Compile failed; see the compiler error output for details.

Total time: 1 second
Buildfile: /Users/seb/projets/java/ant/build.xml

compile:
    [javac] Compiling 1 source file to /Users/seb/projets/java/ant
    [javac] Hello.java:5:52:5:54: Semantic Error: No accessible field named "foo" was found in type "Hello".

BUILD FAILED
/Users/seb/projets/java/ant/build.xml:5: Compile failed; see the compiler error output for details.

Total time: 1 second