forked from qt-creator/qt-creator
VcsBase: Add Js Extension for querying VCS configuration state
This enables JSON wizards to check for that. Change-Id: If6bfc580b37f712168b707ac51412df8f1cbbf25 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -37,8 +37,10 @@
|
||||
#include "vcsoutputwindow.h"
|
||||
#include "corelistener.h"
|
||||
#include "wizard/vcsconfigurationpage.h"
|
||||
#include "wizard/vcsjsextension.h"
|
||||
|
||||
#include <coreplugin/iversioncontrol.h>
|
||||
#include <coreplugin/jsexpander.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
|
||||
@@ -93,6 +95,8 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
JsonWizardFactory::registerPageFactory(new Internal::VcsConfigurationPageFactory);
|
||||
|
||||
JsExpander::registerQObjectForJs(QLatin1String("Vcs"), new VcsJsExtension);
|
||||
|
||||
Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
||||
expander->registerVariable(Constants::VAR_VCS_NAME,
|
||||
tr("Name of the version control system in use by the current project."),
|
||||
|
||||
Reference in New Issue
Block a user