Search in sources :

Example 1 with CreateClassAction

use of com.android.tools.idea.actions.CreateClassAction in project android by JetBrains.

the class AndroidStudioInitializer method setUpNewProjectActions.

private static void setUpNewProjectActions() {
    replaceAction("NewClass", new CreateClassAction());
    // Update the text for the file creation templates.
    FileTemplateManager fileTemplateManager = FileTemplateManager.getDefaultInstance();
    fileTemplateManager.getTemplate("Singleton").setText(fileTemplateManager.getJ2eeTemplate("Singleton").getText());
    for (String templateName : new String[] { "Class", "Interface", "Enum", "AnnotationType" }) {
        FileTemplate template = fileTemplateManager.getInternalTemplate(templateName);
        template.setText(fileTemplateManager.getJ2eeTemplate(templateName).getText());
    }
}
Also used : CreateClassAction(com.android.tools.idea.actions.CreateClassAction) FileTemplate(com.intellij.ide.fileTemplates.FileTemplate) FileTemplateManager(com.intellij.ide.fileTemplates.FileTemplateManager)

Aggregations

CreateClassAction (com.android.tools.idea.actions.CreateClassAction)1 FileTemplate (com.intellij.ide.fileTemplates.FileTemplate)1 FileTemplateManager (com.intellij.ide.fileTemplates.FileTemplateManager)1