showing file name

This commit is contained in:
Dmitry Avdeev
2012-10-03 19:02:20 +04:00
parent 2def6e2c62
commit af0edeceb5
6 changed files with 10 additions and 3 deletions
@@ -19,6 +19,7 @@ import com.intellij.ide.util.projectWizard.ModuleWizardStep;
import com.intellij.ide.util.projectWizard.WizardContext;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.platform.ProjectTemplate;
import com.intellij.platform.ProjectTemplatesFactory;
import com.intellij.psi.codeStyle.MinusculeMatcher;
@@ -86,7 +87,7 @@ public class SelectTemplateStep extends ModuleWizardStep {
mySettingsPanel.setVisible(settingsPanel != null);
String description = template.getDescription();
myDescriptionPane.setText(description);
myDescriptionPanel.setVisible(description != null);
myDescriptionPanel.setVisible(StringUtil.isNotEmpty(description));
}
mySettingsPanel.revalidate();
mySettingsPanel.repaint();
@@ -60,6 +60,7 @@ public class ArchivedProjectTemplate implements ProjectTemplate {
myContext = context;
}
@NotNull
@Override
public String getName() {
return myDisplayName;
@@ -34,6 +34,8 @@ import java.util.*;
*/
public class ArchivedTemplatesFactory implements ProjectTemplatesFactory {
private static final String ZIP = ".zip";
@NotNull
@Override
public ProjectTemplate[] createTemplates(WizardContext context) {
@@ -55,9 +57,9 @@ public class ArchivedTemplatesFactory implements ProjectTemplatesFactory {
try {
final List<String> children = UrlUtil.getChildrenRelativePaths(url);
for (String child : children) {
if (child.endsWith(".zip")) {
if (child.endsWith(ZIP)) {
final URL templateUrl = new URL(url.toExternalForm() + "/" + child);
templates.add(new ArchivedProjectTemplate(child, templateUrl, context));
templates.add(new ArchivedProjectTemplate(child.substring(0, child.length() - ZIP.length()), templateUrl, context));
}
}
}
@@ -24,6 +24,7 @@ public abstract class AbstractGithubTagDownloadedProjectGenerator extends WebPro
private static final Logger LOG = Logger.getInstance(AbstractGithubTagDownloadedProjectGenerator.class);
@NotNull
@Nls
@Override
public final String getName() {
@@ -27,6 +27,7 @@ import javax.swing.*;
*/
public interface ProjectTemplate {
@NotNull
String getName();
@Nullable
@@ -38,6 +38,7 @@ import javax.swing.*;
*/
public abstract class WebProjectGenerator<T> implements DirectoryProjectGenerator<T> {
@NotNull
@Nls
@Override
public abstract String getName();