forked from qt-creator/qt-creator
ProjectExplorer: Simplify standard run control construction
A lot of the target-and-tool specific run controls nowadays have something like a single main RunWorker. This patch removes the need to have user-implemented RunControlFactories in those cases and adjusts local run, remote linux, python and nim to take advantage. There's more potential use downstream. Change-Id: Ie2d2f839b8be1fad2be3b79e21de3c0e475d88cf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -32,8 +32,8 @@
|
||||
#include "project/nimcompilerbuildstepfactory.h"
|
||||
#include "project/nimcompilercleanstepfactory.h"
|
||||
#include "project/nimproject.h"
|
||||
#include "project/nimrunconfiguration.h"
|
||||
#include "project/nimrunconfigurationfactory.h"
|
||||
#include "project/nimruncontrolfactory.h"
|
||||
#include "project/nimtoolchainfactory.h"
|
||||
#include "settings/nimcodestylepreferencesfactory.h"
|
||||
#include "settings/nimcodestylesettingspage.h"
|
||||
@@ -42,11 +42,13 @@
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
#include <projectexplorer/projectmanager.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <texteditor/snippets/snippetprovider.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
|
||||
using namespace Utils;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Nim {
|
||||
|
||||
@@ -69,13 +71,15 @@ bool NimPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
ProjectExplorer::ToolChainManager::registerLanguage(Constants::C_NIMLANGUAGE_ID, Constants::C_NIMLANGUAGE_NAME);
|
||||
|
||||
RunControl::registerWorker<NimRunConfiguration, SimpleTargetRunner>
|
||||
(ProjectExplorer::Constants::NORMAL_RUN_MODE);
|
||||
|
||||
addAutoReleasedObject(new NimSettings);
|
||||
addAutoReleasedObject(new NimEditorFactory);
|
||||
addAutoReleasedObject(new NimBuildConfigurationFactory);
|
||||
addAutoReleasedObject(new NimRunConfigurationFactory);
|
||||
addAutoReleasedObject(new NimCompilerBuildStepFactory);
|
||||
addAutoReleasedObject(new NimCompilerCleanStepFactory);
|
||||
addAutoReleasedObject(new NimRunControlFactory);
|
||||
addAutoReleasedObject(new NimCodeStyleSettingsPage);
|
||||
addAutoReleasedObject(new NimCodeStylePreferencesFactory);
|
||||
addAutoReleasedObject(new NimToolChainFactory);
|
||||
|
||||
Reference in New Issue
Block a user