String (List<String> methodNames) { StringBuilder sb = new StringBuilder() .append("<idea-plugin>\n") .append(" <id>com.intellij</id>\n") .append(" <name>myPlugin</name>\n"); sb.append(" <extensionPoints>"); sb.append(" <extensionPoint name=\"stacktrace.fold\"" + " beanClass=\"com.intellij.execution.console.CustomizableConsoleFoldingBean\"/>\n"); sb.append(" <extensionPoint name=\"myEp\" interface=\"java.util.ArrayList\" />\n"); sb.append(" </extensionPoints>"); sb.append("<extensions defaultExtensionNs=\"com.intellij\">"); methodNames.forEach(s -> sb.append("<stacktrace.fold substring=\"at myPkg.MyClass.").append(s).append("(\"/>\n")); sb.append("<myEp implementation=\"myPkg.MyClass\"/>"); // the only valid target for locating sb.append("</extensions>"); sb.append("</idea-plugin>"); return sb.toString(); }