mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
showing file name
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user