http://www.jindent.com |
|
Next: Jindent Plugins |
//J+ and //J- Comments |
//J-
to leave original code untouched and use //J+
to
make Jindent taking up its formatting again.
class Demo { //J- int sillyStyle1(int x) // This style will be kept { x += 2; return x; } //J+ int sillyStyle2(int y) { y += 2; return y; } } |
class Demo { //J- int sillyStyle1(int x) // This style will be kept { x += 2; return x; } //J+ int sillyStyle2(int y) { y += 2; return y; } } |
//J-
and //J+
is not formatted and keeps the style
from the original input source code.//J+
should follow
after each //J-
.//JDOC- Comment |
//JDOC-
can be used to suppress automatical JavaDoc insertion.
public class Test { /** * Some text ... * * @param input input string * * @throws Exception if anything went wrong */ public void run(String input) throws Exception { // do something ... } } public class ExtendedTest extends Test { public void run(String input) throws Exception { // do something more ... } ... } |
/** * New inserted JavaDoc * * * @author ... */ public class Test { /** * Some text ... * * @param input input string * * @throws Exception if anything went wrong */ public void run(String input) throws Exception { // do something ... } } /** * New inserted JavaDoc * * * @author ... */ public class ExtendedTest extends Test { /** * New inserted JavaDoc * * @param input ... * * @throws Exception ... */ public void run(String input) throws Exception { // do something more ... } ... } |
ExtendedTest.run(String)
is unwanted. We rather would like to get
no insertion at this place. Therefore we keep the inherited JavaDoc comment from method Test.run(String)
.//JDOC-
to tell Jindent not to insert any JavaDoc comment at this
place.
public class Test { /** * Some text ... * * @param input input string * * @throws Exception if anything went wrong */ public void run(String input) throws Exception { // do something ... } } public class ExtendedTest extends Test { //JDOC- public void run(String input) throws Exception { // do something more ... } ... } |
ExtendedTest.run(String)
and the JavaDoc inheritance will be kept.