git-svn-id: svn://db.shs.com.ru/libs@363 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-03-05 09:25:33 +00:00
parent 300d30109d
commit 44c4a85237
3 changed files with 49 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
#include "projectfilesystemplugin.h"
#include "projectfilesystempluginconstants.h"
#include "projectfilesystemwidget.h"
#include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
@@ -7,6 +8,7 @@
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/coreconstants.h>
#include <utils/macroexpander.h>
#include <QAction>
#include <QMessageBox>
@@ -59,6 +61,9 @@ namespace ProjectFilesystemPlugin {
void ProjectFilesystemPluginPlugin::extensionsInitialized()
{
Utils::globalMacroExpander()->registerPrefix("ProjectFilesystem", "Project filesystem plugin", [](QString v) -> QString {return v;} );
Utils::globalMacroExpander()->registerFileVariables("ProjectFilesystem", "Selected item",
[]() -> QString { return QDir(projectfs_menu_target.absoluteFilePath()).path();});
// Retrieve objects from the plugin manager's object pool
// In the extensionsInitialized function, a plugin can be sure that all
// plugins that depend on it are completely initialized.