IDEA-155075 Why file template settings are marked as per-project?

This commit is contained in:
Dmitry Avdeev
2017-01-24 10:03:29 +03:00
parent ed51fbe99b
commit b3404163ca
@@ -62,7 +62,8 @@ import static com.intellij.ide.fileTemplates.FileTemplateManager.*;
* Time: 12:44:56 PM
*/
public class AllFileTemplatesConfigurable implements SearchableConfigurable, Configurable.NoMargin, Configurable.NoScroll {
public class AllFileTemplatesConfigurable implements SearchableConfigurable, Configurable.NoMargin, Configurable.NoScroll,
Configurable.VariableProjectAppLevel {
private static final Logger LOG = Logger.getInstance("#com.intellij.ide.fileTemplates.impl.AllFileTemplatesConfigurable");
private static final String TEMPLATES_TITLE = IdeBundle.message("tab.filetemplates.templates");
@@ -450,6 +451,11 @@ public class AllFileTemplatesConfigurable implements SearchableConfigurable, Con
}
}
@Override
public boolean isProjectLevel() {
return myScheme != null && !myScheme.getProject().isDefault();
}
// internal template could not be removed and should be rendered bold
public static boolean isInternalTemplate(String templateName, String templateTabTitle) {
if (templateName == null) {