Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
google java format eclipse插件忽略格式化程序:关闭注释_Java_Eclipse_Formatter - Fatal编程技术网

google java format eclipse插件忽略格式化程序:关闭注释

google java format eclipse插件忽略格式化程序:关闭注释,java,eclipse,formatter,Java,Eclipse,Formatter,我在这里使用google java格式插件: 在我的EclipseSTS(版本:4.5.0.RELEASE)中 在定义Camel Java DSL路由时,我试图忽略格式化程序,以便获得以下缩进代码: @Component public class MyRoute extends SpringRouteBuilder { @Override public void configure() throws Exception { super.configure(); from

我在这里使用google java格式插件: 在我的EclipseSTS(版本:4.5.0.RELEASE)中

在定义Camel Java DSL路由时,我试图忽略格式化程序,以便获得以下缩进代码:

@Component
public class MyRoute extends SpringRouteBuilder
{

  @Override
  public void configure() throws Exception
  {
   super.configure();
   from("direct:myendpointh").routeId("foo")
    .setBody().method(MyClass.class, "calc(${body})")
    .setHeader("bar").method(BarCalc.class, "compute(${body})")
    .choice()
       .when().ognl("request.body.isConditionMet")
       .to("direct:ConditionalRoute").endChoice()
    .otherwise()
       .routingSlip(header("mySlip"))
    .end();
  }
}
现在,如果我将格式化程序从eclipse更改为google java格式:

并按照中的说明添加忽略格式注释

它仍然以每行1个方法调用的方式格式化,并且丢失了choice()缩进:

@Component
public class MyRoute extends SpringRouteBuilder
{
  //@formatter:off
  @Override
  public void configure() throws Exception
  {
   super.configure();
   from("direct:myendpointh")
    .routeId("foo")
    .setBody()
    .method(MyClass.class, "calc(${body})")
    .setHeader("bar")
    .method(BarCalc.class, "compute(${body})")
    .choice()
    .when()
    .ognl("request.body.isConditionMet")
    .to("direct:ConditionalRoute")
    .endChoice()
    .otherwise()
    .routingSlip(header("mySlip"))
    .end();
  }
  //@formatter:on
}

有没有办法切换特定文件的格式化程序。。。e、 g.对某些需要方法链缩进的文件禁用google java格式?

看起来他们没有实现这一点