VariableChooser: Rework

Allow multiple expanders to be registered for lineedits, e.g. a
local and the global ones, and actually show them.

Use a tree view in the chooser for somewhat more structured display.

Change-Id: I769f92144e5249f45e54381de52aa6973eb20118
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
hjk
2014-10-13 18:49:44 +02:00
parent e279c7e007
commit 3119d93b79
38 changed files with 285 additions and 140 deletions

View File

@@ -45,11 +45,11 @@
#include "textmarkregistry.h"
#include <coreplugin/icore.h>
#include <coreplugin/variablemanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/externaltoolmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
#include <utils/macroexpander.h>
#include <QtPlugin>
#include <QAction>
@@ -147,7 +147,7 @@ void TextEditorPlugin::extensionsInitialized()
addAutoReleasedObject(new FindInCurrentFile);
addAutoReleasedObject(new FindInOpenFiles);
Utils::MacroExpander *expander = globalMacroExpander();
Utils::MacroExpander *expander = Utils::globalMacroExpander();
expander->registerVariable(kCurrentDocumentSelection,
tr("Selected text within the current document."),