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:
Tobias Hunger
2015-01-19 15:42:22 +01:00
parent 0efe82475f
commit db215dcf69
5 changed files with 113 additions and 0 deletions

View File

@@ -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."),