rewrite editor info bar handling

the info about the bars is now stored in the IFile, not in the
EditorView. this is somewhat more expensive for the bars which
identically apply to all editors of one type, but fixes consistency
issues between views.

additionally, it is now possible to set several simultaneous
info bars per file, which ensures that no information is lost.

Co-authored-by: mae
This commit is contained in:
Oswald Buddenhagen
2011-05-06 12:48:44 +02:00
parent 46c09e77cd
commit 882e34ee28
21 changed files with 446 additions and 217 deletions

View File

@@ -51,6 +51,7 @@
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
#include <coreplugin/editormanager/editormanager.h>
#include <QtCore/QMap>
@@ -195,7 +196,9 @@ bool CMakeProject::parseCMakeLists()
!activeTarget()->activeBuildConfiguration())
return false;
Core::EditorManager::instance()->hideEditorInfoBar("CMakeEditor.RunCMake");
foreach (Core::IEditor *editor, Core::EditorManager::instance()->openedEditors())
if (isProjectFile(editor->file()->fileName()))
editor->file()->infoBar()->removeInfo(QLatin1String("CMakeEditor.RunCMake"));
// Find cbp file
CMakeBuildConfiguration *activeBC = activeTarget()->activeBuildConfiguration();