2016-12-16 1 views

ответ

1

Решение было следующим:

// we create the actual class 
final VirtualFile newFile = JavaDirectoryService.getInstance().createClass(directory, className, templateName).getContainingFile().getVirtualFile(); 
// open to the new file in the editor 
FileEditorManager.getInstance(project).openFile(newFile, true, true);