use of com.intellij.openapi.vcs.FileStatusManager in project intellij-community by JetBrains.
the class FileEditorManagerImpl method projectOpened.
protected void projectOpened(@NotNull MessageBusConnection connection) {
//myFocusWatcher.install(myWindows.getComponent ());
getMainSplitters().startListeningFocus();
final FileStatusManager fileStatusManager = FileStatusManager.getInstance(myProject);
if (fileStatusManager != null) {
/*
Updates tabs colors
*/
final MyFileStatusListener myFileStatusListener = new MyFileStatusListener();
fileStatusManager.addFileStatusListener(myFileStatusListener, myProject);
}
connection.subscribe(FileTypeManager.TOPIC, new MyFileTypeListener());
connection.subscribe(ProjectTopics.PROJECT_ROOTS, new MyRootsListener());
/*
Updates tabs names
*/
final MyVirtualFileListener myVirtualFileListener = new MyVirtualFileListener();
VirtualFileManager.getInstance().addVirtualFileListener(myVirtualFileListener, myProject);
/*
Extends/cuts number of opened tabs. Also updates location of tabs.
*/
connection.subscribe(UISettingsListener.TOPIC, new MyUISettingsListener());
StartupManager.getInstance(myProject).registerPostStartupActivity((DumbAwareRunnable) () -> {
if (myProject.isDisposed())
return;
setTabsMode(UISettings.getInstance().getEditorTabPlacement() != UISettings.TABS_NONE);
ToolWindowManager.getInstance(myProject).invokeLater(() -> {
if (!myProject.isDisposed()) {
CommandProcessor.getInstance().executeCommand(myProject, () -> {
ApplicationManager.getApplication().invokeLater(() -> {
long currentTime = System.nanoTime();
Long startTime = myProject.getUserData(ProjectImpl.CREATION_TIME);
if (startTime != null) {
LOG.info("Project opening took " + (currentTime - startTime.longValue()) / 1000000 + " ms");
PluginManagerCore.dumpPluginClassStatistics();
}
}, myProject.getDisposed());
}, "", null);
}
});
});
}
Aggregations