mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AppCode: setting project name from the xcodeproj file, not from the containing directory
This commit is contained in:
@@ -37,11 +37,13 @@ import com.intellij.openapi.components.impl.stores.UnknownMacroNotification;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.project.DumbAwareRunnable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.openapi.project.ProjectManagerAdapter;
|
||||
import com.intellij.openapi.project.ex.ProjectEx;
|
||||
import com.intellij.openapi.project.ex.ProjectManagerEx;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.ui.ex.MessagesEx;
|
||||
import com.intellij.openapi.util.Key;
|
||||
@@ -60,6 +62,7 @@ import org.picocontainer.*;
|
||||
import org.picocontainer.defaults.CachingComponentAdapter;
|
||||
import org.picocontainer.defaults.ConstructorInjectionComponentAdapter;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -107,7 +110,18 @@ public class ProjectImpl extends ComponentManagerImpl implements ProjectEx {
|
||||
if (!projectName.equals(myName)) {
|
||||
myOldName = myName;
|
||||
myName = projectName;
|
||||
WindowManager.getInstance().getFrame(this).setTitle(FrameTitleBuilder.getInstance().getProjectTitle(this));
|
||||
StartupManager.getInstance(this).runWhenProjectIsInitialized(new DumbAwareRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isDisposed()) return;
|
||||
|
||||
JFrame frame = WindowManager.getInstance().getFrame(ProjectImpl.this);
|
||||
String title = FrameTitleBuilder.getInstance().getProjectTitle(ProjectImpl.this);
|
||||
if (frame != null && title != null) {
|
||||
frame.setTitle(title);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user