From 0f90a322e1e004d7a7e001bbe7c0c5ecb2f7ff3c Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 11 Aug 2017 16:57:56 +0200 Subject: [PATCH] [ui] correct product name in project wizard messages --- .../ide/util/projectWizard/NamePathComponent.java | 12 ++++++------ .../ide/util/projectWizard/ProjectNameStep.java | 11 +++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java b/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java index 6d32b4c03d15..51c92655a439 100644 --- a/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java +++ b/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import com.intellij.ide.IdeBundle; import com.intellij.ide.highlighter.ProjectFileType; import com.intellij.ide.impl.ProjectUtil; import com.intellij.ide.util.BrowseFilesListener; -import com.intellij.openapi.application.ApplicationInfo; +import com.intellij.openapi.application.ApplicationNamesInfo; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.fileChooser.FileChooserDescriptor; import com.intellij.openapi.options.ConfigurationException; @@ -143,8 +143,8 @@ public class NamePathComponent extends JPanel{ public boolean validateNameAndPath(WizardContext context, boolean defaultFormat) throws ConfigurationException { String name = getNameValue(); if (StringUtil.isEmptyOrSpaces(name)) { - ApplicationInfo info = ApplicationInfo.getInstance(); - throw new ConfigurationException(IdeBundle.message("prompt.new.project.file.name", info.getVersionName(), context.getPresentationName())); + ApplicationNamesInfo info = ApplicationNamesInfo.getInstance(); + throw new ConfigurationException(IdeBundle.message("prompt.new.project.file.name", info.getFullProductName(), context.getPresentationName())); } String projectDirectory = getPath(); @@ -218,7 +218,7 @@ public class NamePathComponent extends JPanel{ public JTextField getNameComponent() { return myTfName; } - + @NotNull public JLabel getPathLabel() { return myPathLabel; @@ -227,7 +227,7 @@ public class NamePathComponent extends JPanel{ public JTextField getPathComponent() { return myTfPath; } - + @NotNull public FieldPanel getPathPanel() { return myPathPanel; diff --git a/java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java b/java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java index 94a2692c6edf..df96d8d9ea58 100644 --- a/java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java +++ b/java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ package com.intellij.ide.util.projectWizard; import com.intellij.ide.IdeBundle; import com.intellij.ide.highlighter.ModuleFileType; import com.intellij.ide.highlighter.ProjectFileType; -import com.intellij.openapi.application.ApplicationInfo; +import com.intellij.openapi.application.ApplicationNamesInfo; import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.Messages; @@ -52,8 +52,7 @@ public class ProjectNameStep extends ModuleWizardStep { myPanel = new JPanel(new GridBagLayout()); myPanel.setBorder(BorderFactory.createEtchedBorder()); - ApplicationInfo info = ApplicationInfo.getInstance(); - String appName = info.getVersionName(); + String appName = ApplicationNamesInfo.getInstance().getFullProductName(); myPanel.add(new JLabel(IdeBundle.message("label.please.enter.project.name", appName, wizardContext.getPresentationName())), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(8, 10), 0, 0)); @@ -101,8 +100,8 @@ public class ProjectNameStep extends ModuleWizardStep { public boolean validate() throws ConfigurationException { String name = myNamePathComponent.getNameValue(); if (name.length() == 0) { - final ApplicationInfo info = ApplicationInfo.getInstance(); - throw new ConfigurationException(IdeBundle.message("prompt.new.project.file.name", info.getVersionName(), myWizardContext.getPresentationName())); + ApplicationNamesInfo info = ApplicationNamesInfo.getInstance(); + throw new ConfigurationException(IdeBundle.message("prompt.new.project.file.name", info.getFullProductName(), myWizardContext.getPresentationName())); } final String projectFileDirectory = getProjectFileDirectory();