copy/paste: open created file in the editor

This commit is contained in:
anna
2011-12-09 20:05:42 +01:00
parent 7464c0a39e
commit 4e0c259e55
@@ -355,7 +355,7 @@ public class CopyClassesHandler extends CopyHandlerDelegateBase {
codeStyleManager.shortenClassReferences(expression);
}
new OptimizeImportsProcessor(project, createdFiles, null).run();
return newElement;
return newElement != null ? newElement : createdFiles.length > 0 ? createdFiles[0] : null;
}
private static PsiFile copy(@NotNull PsiFile file, PsiDirectory directory, String name, String relativePath) {