void (VirtualFile file, PySignature signature) { String dataString = readAttribute(file); String[] lines; if (dataString != null) { lines = dataString.split("\n"); } else { lines = ArrayUtilRt.EMPTY_STRING_ARRAY; } boolean found = false; int i = 0; for (String sign : lines) { String[] parts = sign.split("\t"); if (parts.length > 0 && parts[0].equals(signature.getFunctionName())) { found = true; lines[i] = changeSignatureString(file.getCanonicalPath(), signature, lines[i]); } i++; } if (!found) { String[] lines2 = new String[lines.length + 1]; System.arraycopy(lines, 0, lines2, 0, lines.length); lines2[lines2.length - 1] = signatureToString(signature); lines = lines2; } String attrString = StringUtil.join(lines, "\n"); writeAttribute(file, attrString); }