Cannot remove block comment in Eclipse after formatting

后端 未结 5 1691
野趣味
野趣味 2020-12-15 16:22

Eclipse\'s automatic formatter changes block comments such that the Source > Remove Block Comment does not completely remove the block comment. Source > Add Block Comment ad

5条回答
  •  清酒与你
    2020-12-15 17:07

    I dont know if this helps solve your problem, but I found this very much helpful in my case. Consider this text -

    String abc="abc";
    String def="def";
    System.out.println(abc+def);
    System.exit(0);
    

    After applying a block comment using CTRL + SHIFT + F.

    /*  String abc="abc";
    String def="def";
    System.out.println(abc+def);
    */System.exit(0);
    

    Just add - after /* to exclude this block from formatting -

    /*-  String abc="abc";
    String def="def";
    System.out.println(abc+def);
    */System.exit(0);
    

    Now Check Again!!!

提交回复
热议问题