mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SaveProjectAsTemplateAction: read action & default template name
This commit is contained in:
@@ -120,13 +120,17 @@ public class SaveProjectAsTemplateAction extends AnAction {
|
||||
|
||||
final Map<String, String> parameters = new HashMap<String, String>();
|
||||
if (replaceParameters) {
|
||||
ProjectTemplateParameterFactory[] extensions = Extensions.getExtensions(ProjectTemplateParameterFactory.EP_NAME);
|
||||
for (ProjectTemplateParameterFactory extension : extensions) {
|
||||
String value = extension.detectParameterValue(project);
|
||||
if (value != null) {
|
||||
parameters.put(value, extension.getParameterId());
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
public void run() {
|
||||
ProjectTemplateParameterFactory[] extensions = Extensions.getExtensions(ProjectTemplateParameterFactory.EP_NAME);
|
||||
for (ProjectTemplateParameterFactory extension : extensions) {
|
||||
String value = extension.detectParameterValue(project);
|
||||
if (value != null) {
|
||||
parameters.put(value, extension.getParameterId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
indicator.setText("Saving project...");
|
||||
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
|
||||
|
||||
@@ -59,6 +59,8 @@ public class SaveProjectAsTemplateDialog extends DialogWrapper {
|
||||
myProject = project;
|
||||
|
||||
setTitle("Save Project As Template");
|
||||
myName.setText(project.getName());
|
||||
|
||||
Module[] modules = ModuleManager.getInstance(project).getModules();
|
||||
if (modules.length < 2) {
|
||||
myModuleLabel.setVisible(false);
|
||||
|
||||
Reference in New Issue
Block a user