CPP-8004 Set CLion's project name from CMake's ${PROJECT_NAME}: reset names cache on the welcome screen

This commit is contained in:
Anton Makeev
2016-11-24 12:33:23 +03:00
parent d95f1d515d
commit 86d9bf61cd
@@ -15,6 +15,7 @@
*/
package com.intellij.openapi.project.impl;
import com.intellij.ide.RecentProjectsManager;
import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.startup.StartupManagerEx;
import com.intellij.openapi.application.ApplicationManager;
@@ -133,6 +134,8 @@ public class ProjectImpl extends PlatformComponentManagerImpl implements Project
public void setProjectName(@NotNull String projectName) {
if (!projectName.equals(myName)) {
myName = projectName;
RecentProjectsManager.getInstance().clearNameCache();
StartupManager.getInstance(this).runWhenProjectIsInitialized((DumbAwareRunnable)() -> {
if (isDisposed()) return;