mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[java-typing] IDEA-333031 Auto-multilining for String doesn't work if there is a string template in the code
GitOrigin-RevId: 86ca76290687aeb3c0023c745069dfd897145af6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8bab980bbd
commit
7014be59fd
@@ -102,12 +102,13 @@ public class JavaQuoteHandler extends SimpleTokenSetQuoteHandler implements Java
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getClosingQuote(@NotNull HighlighterIterator iterator, int offset) {
|
||||
return iterator.getTokenType() == JavaTokenType.TEXT_BLOCK_LITERAL && offset == iterator.getStart() + 3 ? "\"\"\"" : null;
|
||||
return (iterator.getTokenType() == JavaTokenType.TEXT_BLOCK_LITERAL || iterator.getTokenType() == JavaTokenType.TEXT_BLOCK_TEMPLATE_BEGIN)
|
||||
&& offset == iterator.getStart() + 3 ? "\"\"\"" : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNonClosedLiteral(Editor editor, HighlighterIterator iterator, int offset) {
|
||||
if (iterator.getTokenType() == JavaTokenType.TEXT_BLOCK_LITERAL) {
|
||||
if (iterator.getTokenType() == JavaTokenType.TEXT_BLOCK_LITERAL || iterator.getTokenType() == JavaTokenType.TEXT_BLOCK_TEMPLATE_BEGIN) {
|
||||
Document document = editor.getDocument();
|
||||
Project project = editor.getProject();
|
||||
PsiFile file = project == null ? null : PsiDocumentManager.getInstance(project).getPsiFile(document);
|
||||
|
||||
Reference in New Issue
Block a user