public class JavaCopyPasteReferenceProcessor extends CopyPasteReferenceProcessor<PsiJavaCodeReferenceElement>
EP_NAME
Constructor and Description |
---|
JavaCopyPasteReferenceProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addReferenceData(PsiFile file,
int startOffset,
PsiElement element,
java.util.ArrayList<ReferenceData> to) |
protected PsiJavaCodeReferenceElement [] |
findReferencesToRestore(PsiFile file,
RangeMarker bounds,
ReferenceData[] referenceData) |
protected void |
removeImports(PsiFile file,
java.util.Set<java.lang.String> imports) |
static void |
removeImports(PsiJavaFile javaFile,
java.util.Set<java.lang.String> imports)
Remove imports on
imports (including static imports in format Class_Name.Member_Name)
To ensure that on-demand import expands when one of the import inside was deleted, let's do optimize imports. |
protected void |
restoreReferences(ReferenceData[] referenceData,
PsiJavaCodeReferenceElement[] refs,
java.util.Set<java.lang.String> imported) |
addReferenceData, collectTransferableData, extractTransferableData, processTransferableData, resolveReferenceIgnoreOverriding
protected void addReferenceData(PsiFile file, int startOffset, PsiElement element, java.util.ArrayList<ReferenceData> to)
addReferenceData
in class CopyPasteReferenceProcessor<PsiJavaCodeReferenceElement>
protected void removeImports(PsiFile file, java.util.Set<java.lang.String> imports)
removeImports
in class CopyPasteReferenceProcessor<PsiJavaCodeReferenceElement>
public static void removeImports(PsiJavaFile javaFile, java.util.Set<java.lang.String> imports)
imports
(including static imports in format Class_Name.Member_Name)
To ensure that on-demand import expands when one of the import inside was deleted, let's do optimize imports.
This may change some unrelated importsprotected PsiJavaCodeReferenceElement [] findReferencesToRestore(PsiFile file, RangeMarker bounds, ReferenceData[] referenceData)
findReferencesToRestore
in class CopyPasteReferenceProcessor<PsiJavaCodeReferenceElement>
protected void restoreReferences(ReferenceData[] referenceData, PsiJavaCodeReferenceElement[] refs, java.util.Set<java.lang.String> imported)
restoreReferences
in class CopyPasteReferenceProcessor<PsiJavaCodeReferenceElement>