String (PsiTemplate template) { StringBuilder sb = new StringBuilder(); boolean separator = false; for (PsiFragment fragment : template.getFragments()) { if (separator) { sb.append('?'); } else { separator = true; } sb.append(fragment.getValue()); } return sb.toString(); }