copy/paste whole string with caret inside dbl quoting eliminated (IDEA-65819 )
authoranna <Anna.Kozlova@jetbrains.com>
Mon, 28 Feb 2011 11:09:07 +0000 (12:09 +0100)
committeranna <Anna.Kozlova@jetbrains.com>
Mon, 28 Feb 2011 11:16:01 +0000 (12:16 +0100)
java/java-impl/src/com/intellij/codeInsight/editorActions/StringLiteralCopyPasteProcessor.java

index eec7be77ca19707dcad65330938479625f858108..72edc6aeadb442375ad4a0ec2ea1b3b1718b3b67 100644 (file)
@@ -35,8 +35,8 @@ public class StringLiteralCopyPasteProcessor implements CopyPastePreProcessor {
       final PsiElement elementAtCaret = file.findElementAt(startOffset);
       if (!(elementAtCaret instanceof PsiJavaToken &&
             (((PsiJavaToken) elementAtCaret)).getTokenType() == JavaTokenType.STRING_LITERAL &&
-            startOffset > elementAtCaret.getTextRange().getStartOffset() &&
-            endOffsets[i] < elementAtCaret.getTextRange().getEndOffset())) {
+            startOffset >= elementAtCaret.getTextRange().getStartOffset() &&
+            endOffsets[i] <= elementAtCaret.getTextRange().getEndOffset())) {
         isLiteral = false;
       }
     }