use of org.jetbrains.plugins.groovy.doc.GenerateGroovyDocDialog in project intellij-community by JetBrains.
the class GenerateGroovyDocAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
final DataContext dataContext = e.getDataContext();
final Project project = CommonDataKeys.PROJECT.getData(dataContext);
final Module module = LangDataKeys.MODULE.getData(dataContext);
if (module == null)
return;
GroovyDocConfiguration configuration = new GroovyDocConfiguration();
final VirtualFile[] files = ModuleRootManager.getInstance(module).getContentRoots();
if (files.length == 1) {
configuration.INPUT_DIRECTORY = files[0].getPath();
}
final GenerateGroovyDocDialog dialog = new GenerateGroovyDocDialog(project, configuration);
if (!dialog.showAndGet()) {
return;
}
generateGroovydoc(configuration, project);
}
Aggregations