File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
plugins/sources/src/org/graalvm/visualvm/sources/java Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 33
33
*/
34
34
final class JavaSourceUtils {
35
35
36
- private static final char COMMENT_MASK_CHAR = '- ' ; // NOI18N
36
+ private static final char COMMENT_MASK_CHAR = ' ' ; // NOI18N
37
37
private static final char STRING_MASK_CHAR = '+' ; // NOI18N
38
38
private static final char NONBLOCK_MASK_CHAR = '=' ; // NOI18N
39
39
private static final char CLASS_MASK_CHAR = '_' ; // NOI18N
@@ -154,14 +154,14 @@ static String maskNonCode(String text) {
154
154
155
155
if (!lineComment && !chardef && !string ) {
156
156
if (!blockComment && '/' == lastChar && '*' == currentChar ) { // NOI18N
157
+ newText [position - 1 ] = COMMENT_MASK_CHAR ;
157
158
blockComment = true ;
158
- } else if (blockComment && '*' == lastChar && '/' == currentChar ) { // NOI18N
159
- blockComment = false ;
160
159
}
161
160
}
162
161
163
162
if (!blockComment && !chardef && !string ) {
164
163
if (!lineComment && '/' == lastChar && '/' == currentChar ) { // NOI18N
164
+ newText [position - 1 ] = COMMENT_MASK_CHAR ;
165
165
lineComment = true ;
166
166
} else if (lineComment && ('\r' == currentChar || '\n' == currentChar )) { // NOI18N
167
167
lineComment = false ;
@@ -203,6 +203,12 @@ static String maskNonCode(String text) {
203
203
else if (lineComment || blockComment ) newText [position ] = COMMENT_MASK_CHAR ;
204
204
else newText [position ] = currentChar ;
205
205
206
+ if (!lineComment && !chardef && !string ) {
207
+ if (blockComment && '*' == lastChar && '/' == currentChar ) { // NOI18N
208
+ blockComment = false ;
209
+ }
210
+ }
211
+
206
212
lastChar = currentChar ;
207
213
}
208
214
You can’t perform that action at this time.
0 commit comments