fix javadoc link completion in the middle of the comment

This commit is contained in:
peter
2016-02-15 18:00:00 +01:00
parent 09e3715524
commit 2235dac78c
2 changed files with 3 additions and 3 deletions
@@ -180,7 +180,7 @@ public class JavaDocCompletionContributor extends CompletionContributor {
suggestSimilarParameterDescriptions(result, position, param);
}
suggestLinkWrappingVariants(parameters, result, position);
suggestLinkWrappingVariants(parameters, result.withPrefixMatcher(CompletionUtil.findJavaIdentifierPrefix(parameters)), position);
if (!result.getPrefixMatcher().getPrefix().isEmpty()) {
for (String keyword : ContainerUtil.ar("null", "true", "false")) {
@@ -610,10 +610,10 @@ class Foo {
}
public void "test insert link to method"() {
myFixture.configureByText 'a.java', "/** #fo<caret> */ interface Foo { void foo(int a); }}"
myFixture.configureByText 'a.java', "/** a. #fo<caret> */ interface Foo { void foo(int a); }}"
myFixture.completeBasic()
myFixture.type('\n')
myFixture.checkResult "/** {@link #foo(int)}<caret> */ interface Foo { void foo(int a); }}"
myFixture.checkResult "/** a. {@link #foo(int)}<caret> */ interface Foo { void foo(int a); }}"
}
public void "test wrap null into code tag"() {