option not to reformat created groovy file

This commit is contained in:
Max Medvedev
2013-11-12 12:18:41 +04:00
parent c3de0e639a
commit c3f7b37f0c
2 changed files with 3 additions and 3 deletions
@@ -436,7 +436,7 @@ public class GrIntroduceConstantDialog extends DialogWrapper
final AccessToken lock = ApplicationManager.getApplication().acquireWriteActionLock(GrIntroduceConstantDialog.class);
try {
final GroovyFile file =
(GroovyFile)GroovyTemplatesFactory.createFromTemplate(psiDirectory, shortName, fileName, GroovyTemplates.GROOVY_CLASS);
(GroovyFile)GroovyTemplatesFactory.createFromTemplate(psiDirectory, shortName, fileName, GroovyTemplates.GROOVY_CLASS, true);
return file.getTypeDefinitions()[0];
}
finally {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -123,7 +123,7 @@ public class MoveGroovyClassHandler implements MoveClassHandler {
correctSelfReferences(aClass, newPackage);
final PsiFile fromTemplate =
GroovyTemplatesFactory.createFromTemplate(moveDestination, aClass.getName(), aClass.getName() + NewGroovyActionBase.GROOVY_EXTENSION, GroovyTemplates.GROOVY_CLASS);
GroovyTemplatesFactory.createFromTemplate(moveDestination, aClass.getName(), aClass.getName() + NewGroovyActionBase.GROOVY_EXTENSION, GroovyTemplates.GROOVY_CLASS, true);
final PsiClass created = ((GroovyFile)fromTemplate).getClasses()[0];
PsiDocComment docComment = aClass.getDocComment();
if (docComment != null) {