PostfixTemplateEditor (@Nullable PostfixTemplate templateToEdit) { if (templateToEdit == null || templateToEdit instanceof JavaEditablePostfixTemplate && // cannot be editable until there is no UI for editing template variables !(templateToEdit instanceof ForIndexedPostfixTemplate) && !(templateToEdit instanceof ForeachPostfixTemplate) && !(templateToEdit instanceof SoutvPostfixTemplate) && !(templateToEdit instanceof ArgumentPostfixTemplate) && !(templateToEdit instanceof OptionalPostfixTemplate)) { JavaPostfixTemplateEditor editor = new JavaPostfixTemplateEditor(this); editor.setTemplate(templateToEdit); return editor; } return null; }