forked from qt-creator/qt-creator
ClangTools: Add action for running on current file
Ideally, we would build the particular file before running the analyzer, but not every project manager supports that. For now, skip building the project for this action. Change-Id: Ibc516c41dd0dbeb7b17b44c0ac35ae4b46ae801d Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -61,12 +61,13 @@
|
||||
#include <QMessageBox>
|
||||
#include <QMenu>
|
||||
|
||||
using namespace Core;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace ClangTools {
|
||||
namespace Internal {
|
||||
|
||||
class ClangToolsOptionsPage : public Core::IOptionsPage
|
||||
class ClangToolsOptionsPage : public IOptionsPage
|
||||
{
|
||||
public:
|
||||
ClangToolsOptionsPage()
|
||||
@@ -121,6 +122,11 @@ bool ClangToolsPlugin::initialize(const QStringList &arguments, QString *errorSt
|
||||
|
||||
d = new ClangToolsPluginPrivate;
|
||||
|
||||
ActionManager::registerAction(d->clangTidyClazyTool.startAction(),
|
||||
Constants::RUN_ON_PROJECT);
|
||||
ActionManager::registerAction(d->clangTidyClazyTool.startOnCurrentFileAction(),
|
||||
Constants::RUN_ON_CURRENT_FILE);
|
||||
|
||||
auto panelFactory = new ProjectPanelFactory();
|
||||
panelFactory->setPriority(100);
|
||||
panelFactory->setDisplayName(tr("Clang Tools"));
|
||||
|
||||
Reference in New Issue
Block a user