forked from qt-creator/qt-creator
ProjectExplorer: Let a RunConfiguration specify a Runnable.
The (target specific) RunConfiguationFactory can specify what it considers a Runnable for the target. The (also target specific) RunControlFactory can use that either unmodified or tweak it to set up a RunControl, (and finally, target specific code runs it). So this still keeps the target code in full control on what is passed where, but reduces the need for boilerplate in the cases where the produced and consumed Runnables are the same (or similar). Change-Id: Ied59430462f4a45ad0006a99c1efd8b07cd181b2 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -361,6 +361,34 @@ IRunConfigurationAspect *RunConfiguration::extraAspect(Core::Id id) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
\class ProjectExplorer::Runnable
|
||||
|
||||
\brief The ProjectExplorer::Runnable class wraps information needed
|
||||
to execute a process on a target device.
|
||||
|
||||
A target specific \l RunConfiguration implementation can specify
|
||||
what information it considers necessary to execute a process
|
||||
on the target. Target specific) \n IRunControlFactory implementation
|
||||
can use that information either unmodified or tweak it or ignore
|
||||
it when setting up a RunControl.
|
||||
|
||||
From Qt Creator's core perspective a Runnable object is opaque.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
\brief Returns a \l Runnable described by this RunConfiguration.
|
||||
*/
|
||||
|
||||
Runnable RunConfiguration::runnable() const
|
||||
{
|
||||
return Runnable();
|
||||
}
|
||||
|
||||
Utils::OutputFormatter *RunConfiguration::createOutputFormatter() const
|
||||
{
|
||||
return new Utils::OutputFormatter();
|
||||
|
@@ -251,6 +251,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual Runnable runnable() const;
|
||||
virtual Abi abi() const;
|
||||
|
||||
void addExtraAspects();
|
||||
|
Reference in New Issue
Block a user