mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Java: Simplify handling the comments by using CommentTracker (IDEA-182669)
This commit is contained in:
+4
-2
@@ -5,10 +5,12 @@ class T {
|
||||
for (int i=0; i<a.length; i++) {
|
||||
if (n < a[i]) n = a[i];
|
||||
if (n > 100) {
|
||||
return /* return 1 */ n /* return 2 */;// at the end 1
|
||||
// at the end 1
|
||||
return /* return 1 */ n /* return 2 */;
|
||||
}
|
||||
if (n < 0) {
|
||||
return /* return 1 */ 0 /* return 2 */;// at the end 2
|
||||
// at the end 2
|
||||
return /* return 1 */ 0 /* return 2 */;
|
||||
/* inline */
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -3,16 +3,17 @@ class T {
|
||||
String f(String a) {
|
||||
String s = a;
|
||||
if (s == null) {
|
||||
return ""; // return comment
|
||||
// end of line
|
||||
return ""; // return comment
|
||||
}
|
||||
else if (s.startsWith("@")) {
|
||||
/* inline 1 */
|
||||
/* inline 2 */
|
||||
return s.substring(1); // return comment
|
||||
/* inline 1 *//* inline 2 */
|
||||
}
|
||||
else if (s.startsWith("#")) {
|
||||
return "#"; // return comment
|
||||
/* inline */
|
||||
return "#"; // return comment
|
||||
}
|
||||
return s; // return comment
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user