List<ReferenceTransferableData> (@NotNull Transferable content) { ReferenceTransferableData referenceData = null; if (CodeInsightSettings.getInstance().ADD_IMPORTS_ON_PASTE != CodeInsightSettings.NO) { try { DataFlavor flavor = ReferenceData.getDataFlavor(); if (flavor != null) { referenceData = (ReferenceTransferableData)content.getTransferData(flavor); } } catch (UnsupportedFlavorException | IOException ignored) { } } if (referenceData != null) { // copy to prevent changing of original by convertLineSeparators return Collections.singletonList(referenceData.clone()); } return Collections.emptyList(); }