mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
[java] makes "convert to basic latin" action tolerable to unclosed doc comments (IDEA-211695)
GitOrigin-RevId: afe4cff35979b4f3ec0c72512d0e555b3f21ac78
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2637084bd4
commit
5146c45ba8
+1
-6
@@ -160,7 +160,7 @@ public class ConvertToBasicLatinAction extends PsiElementBaseIntentionAction {
|
||||
|
||||
@Override
|
||||
protected PsiElement getSubstitution(PsiElementFactory factory, PsiElement element, String newText) {
|
||||
return factory.createDocCommentFromText(newText);
|
||||
return factory.createCommentFromText(newText, element.getParent());
|
||||
}
|
||||
|
||||
private static void loadEntities(Project project) {
|
||||
@@ -205,10 +205,5 @@ public class ConvertToBasicLatinAction extends PsiElementBaseIntentionAction {
|
||||
PsiElement findApplicable(PsiElement element) {
|
||||
return element instanceof PsiComment ? element : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PsiElement getSubstitution(PsiElementFactory factory, PsiElement element, String newText) {
|
||||
return factory.createCommentFromText(newText, element.getParent());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
/**<caret>
|
||||
* Copyright © 2000-2010 JetBrains s.r.o.
|
||||
@@ -0,0 +1,2 @@
|
||||
/**
|
||||
* Copyright © 2000-2010 JetBrains s.r.o.
|
||||
@@ -0,0 +1 @@
|
||||
/*<caret> © 2010 JetBrains
|
||||
+1
@@ -0,0 +1 @@
|
||||
/* © 2010 JetBrains
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
String s = "<caret>Áî
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
String s = "\u00c1\u00ee
|
||||
}
|
||||
+3
@@ -19,6 +19,9 @@ public class ConvertToBasicLatinTest extends LightCodeInsightFixtureTestCase {
|
||||
public void testPlainComment() { doTest(); }
|
||||
public void testDocComment() { doTest(); }
|
||||
public void testDocTag() { doTest(); }
|
||||
public void testUnclosedStringLiteral() { doTest(); }
|
||||
public void testUnclosedPlainComment() { doTest(); }
|
||||
public void testUnclosedDocComment() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
doEncodingTest(getProject(), "UTF-8", null, () -> {
|
||||
|
||||
Reference in New Issue
Block a user