IDEA-98656 Java doc not generated when an other Java doc has been commented after.

This commit is contained in:
peter
2013-09-18 17:28:05 +04:00
parent 1554b753f3
commit 077e89f136
6 changed files with 38 additions and 0 deletions
@@ -0,0 +1,15 @@
class Test {
/**
* <caret>
*/
void test() {
}
// /**
// *
// * @param arg
// */
// public void secondMethod(int arg) {
// }
}
@@ -0,0 +1,3 @@
/**
* <caret>Foo//bar */
class Example{}
@@ -0,0 +1,13 @@
class Test {
/**<caret>
void test() {
}
// /**
// *
// * @param arg
// */
// public void secondMethod(int arg) {
// }
}
@@ -0,0 +1,2 @@
/** <caret>Foo//bar */
class Example{}
@@ -16,6 +16,8 @@ public class GenerateJavadocTest extends CodeInsightTestCase {
public void test3() throws Exception { doTest(); }
public void testIdeadev2328() throws Exception { doTest(); }
public void testIdeadev2328_2() throws Exception { doTest(); }
public void testBeforeCommentedJavadoc() throws Exception { doTest(); }
public void testDoubleSlashInJavadoc() throws Exception { doTest(); }
private void doTest() throws Exception {
String name = getTestName(false);
@@ -222,6 +222,9 @@ public class EnterHandler extends BaseEnterHandler {
if (tokenType == commenter.getDocumentationCommentTokenType() || tokenType == commenter.getBlockCommentTokenType()) {
return false;
}
if (tokenType == commenter.getLineCommentTokenType() && lexer.getTokenText().contains(commentPrefix)) {
return false;
}
if (lexer.getTokenEnd() == commentText.length()) {
if (tokenType == commenter.getLineCommentTokenType()) {
String prefix = commenter.getLineCommentPrefix();