void addMenuAction(Core::Command *command, const QString &langName,
const QString &group = QString());
+ QStringList supportedLanguages() const;
+
// Changes the active language UI to the one specified by langName.
// Does nothing if automatic switching is toggled off from settings.
void setActiveLanguage(const QString &langName);
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/applicationlauncher.h>
#include <utils/qtcassert.h>
-#include <debugger/debuggerconstants.h>
#include <debugger/debuggerconstants.h>
#include <debugger/debuggeruiswitcher.h>
bool QmlRunControlFactory::canRun(RunConfiguration *runConfiguration,
const QString &mode) const
{
- Q_UNUSED(mode);
- return (qobject_cast<QmlProjectRunConfiguration*>(runConfiguration) != 0);
+ QmlProjectRunConfiguration *config = qobject_cast<QmlProjectRunConfiguration*>(runConfiguration);
+ if (mode == ProjectExplorer::Constants::RUNMODE) {
+ return config != 0;
+ } else {
+ return (config != 0) && Debugger::DebuggerUISwitcher::instance()->supportedLanguages().contains(Qml::Constants::LANG_QML);
+ }
}
RunControl *QmlRunControlFactory::create(RunConfiguration *runConfiguration,