public class StringLiteralCopyPasteProcessor extends java.lang.Object implements CopyPastePreProcessor
EP_NAME| Constructor and Description |
|---|
StringLiteralCopyPasteProcessor() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
escapeAndSplit(java.lang.String text,
PsiElement token) |
protected java.lang.String |
escapeCharCharacters(java.lang.String s,
PsiElement token) |
protected java.lang.String |
escapeTextBlock(java.lang.String text,
int offset,
boolean escapeStartQuote,
boolean escapeEndQuote) |
protected PsiElement |
findLiteralTokenType(PsiFile file,
int selectionStart,
int selectionEnd) |
protected TextRange |
getEscapedRange(PsiElement token) |
protected java.lang.String |
getLineBreaker(PsiElement token) |
protected boolean |
isCharLiteral(PsiElement token) |
protected boolean |
isStringLiteral(PsiElement token) |
protected boolean |
isTextBlock(PsiElement token) |
java.lang.String |
preprocessOnCopy(PsiFile file,
int[] startOffsets,
int[] endOffsets,
java.lang.String text)
If not-null value is returned by this method, it will replace copied text.
|
java.lang.String |
preprocessOnPaste(Project project,
PsiFile file,
Editor editor,
java.lang.String text,
RawText rawText)
Replaces pasted text.
|
protected java.lang.String |
unescape(java.lang.String text,
PsiElement token) |
public java.lang.String preprocessOnCopy(PsiFile file, int[] startOffsets, int[] endOffsets, java.lang.String text)
CopyPastePreProcessorpreprocessOnCopy in interface CopyPastePreProcessorprotected java.lang.String unescape(java.lang.String text,
PsiElement token)
public java.lang.String preprocessOnPaste(Project project, PsiFile file, Editor editor, java.lang.String text, RawText rawText)
CopyPastePreProcessortext value should be returned if no processing is required.preprocessOnPaste in interface CopyPastePreProcessorpublic java.lang.String escapeAndSplit(java.lang.String text,
PsiElement token)
protected java.lang.String getLineBreaker(PsiElement token)
protected PsiElement findLiteralTokenType(PsiFile file, int selectionStart, int selectionEnd)
protected boolean isCharLiteral(PsiElement token)
protected boolean isStringLiteral(PsiElement token)
protected boolean isTextBlock(PsiElement token)
protected TextRange getEscapedRange(PsiElement token)
protected java.lang.String escapeCharCharacters(java.lang.String s,
PsiElement token)
protected java.lang.String escapeTextBlock(java.lang.String text,
int offset,
boolean escapeStartQuote,
boolean escapeEndQuote)