forked from qt-creator/qt-creator
Tasks: Show tool tips with information about the categories
When hovering an entry in the filter menu in the Issues view. Also remove some categories that shouldn't be there. Change-Id: Ifb367d69b9396c2fdc45b83ec5ffd88ac2f0eda7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -77,9 +77,10 @@ ClangCodeModelPlugin::~ClangCodeModelPlugin()
|
|||||||
|
|
||||||
void ClangCodeModelPlugin::initialize()
|
void ClangCodeModelPlugin::initialize()
|
||||||
{
|
{
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_DIAGNOSTICS, Tr::tr("Clang Code Model")});
|
TaskHub::addCategory({Constants::TASK_CATEGORY_DIAGNOSTICS,
|
||||||
CppEditor::CppModelManager::activateClangCodeModel(
|
Tr::tr("Clang Code Model"),
|
||||||
std::make_unique<ClangModelManagerSupport>());
|
Tr::tr("C++ code issues that Clangd found in the current document.")});
|
||||||
|
CppEditor::CppModelManager::activateClangCodeModel(std::make_unique<ClangModelManagerSupport>());
|
||||||
createCompilationDBAction();
|
createCompilationDBAction();
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
|
@@ -89,7 +89,9 @@ ClangToolsPlugin::~ClangToolsPlugin()
|
|||||||
|
|
||||||
void ClangToolsPlugin::initialize()
|
void ClangToolsPlugin::initialize()
|
||||||
{
|
{
|
||||||
TaskHub::addCategory({taskCategory(), Tr::tr("Clang Tools")});
|
TaskHub::addCategory({taskCategory(),
|
||||||
|
Tr::tr("Clang Tools"),
|
||||||
|
Tr::tr("Issues that Clang-Tidy and Clazy found when analyzing code.")});
|
||||||
|
|
||||||
// Import tidy/clazy diagnostic configs from CppEditor now
|
// Import tidy/clazy diagnostic configs from CppEditor now
|
||||||
// instead of at opening time of the settings page
|
// instead of at opening time of the settings page
|
||||||
|
@@ -42,7 +42,6 @@ const char C_DEBUGGER_NOTRUNNING[] = "Debugger.NotRunning";
|
|||||||
|
|
||||||
const char PRESET_PERSPECTIVE_ID[] = "Debugger.Perspective.Preset";
|
const char PRESET_PERSPECTIVE_ID[] = "Debugger.Perspective.Preset";
|
||||||
|
|
||||||
const char TASK_CATEGORY_DEBUGGER_DEBUGINFO[] = "Debuginfo";
|
|
||||||
const char TASK_CATEGORY_DEBUGGER_RUNTIME[] = "DebugRuntime";
|
const char TASK_CATEGORY_DEBUGGER_RUNTIME[] = "DebugRuntime";
|
||||||
|
|
||||||
const char TEXT_MARK_CATEGORY_BREAKPOINT[] = "Debugger.Mark.Breakpoint";
|
const char TEXT_MARK_CATEGORY_BREAKPOINT[] = "Debugger.Mark.Breakpoint";
|
||||||
|
@@ -723,7 +723,9 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
|
|||||||
|
|
||||||
// Task integration.
|
// Task integration.
|
||||||
//: Category under which Analyzer tasks are listed in Issues view
|
//: Category under which Analyzer tasks are listed in Issues view
|
||||||
TaskHub::addCategory({ANALYZERTASK_ID, Tr::tr("Debugger")});
|
TaskHub::addCategory({ANALYZERTASK_ID,
|
||||||
|
Tr::tr("Valgrind"),
|
||||||
|
Tr::tr("Issues that the Valgrind tools found when analyzing the code.")});
|
||||||
|
|
||||||
const Context debuggerNotRunning(C_DEBUGGER_NOTRUNNING);
|
const Context debuggerNotRunning(C_DEBUGGER_NOTRUNNING);
|
||||||
ICore::addAdditionalContext(debuggerNotRunning);
|
ICore::addAdditionalContext(debuggerNotRunning);
|
||||||
@@ -765,8 +767,9 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
|
|||||||
act->setEnabled(false);
|
act->setEnabled(false);
|
||||||
Command *cmd = ActionManager::registerAction(act, Constants::OPEN_MEMORY_EDITOR);
|
Command *cmd = ActionManager::registerAction(act, Constants::OPEN_MEMORY_EDITOR);
|
||||||
|
|
||||||
TaskHub::addCategory({TASK_CATEGORY_DEBUGGER_DEBUGINFO, Tr::tr("Debug Information")});
|
TaskHub::addCategory({TASK_CATEGORY_DEBUGGER_RUNTIME,
|
||||||
TaskHub::addCategory({TASK_CATEGORY_DEBUGGER_RUNTIME, Tr::tr("Debugger Runtime")});
|
Tr::tr("Debugger Runtime"),
|
||||||
|
Tr::tr("Issues with starting the debugger.")});
|
||||||
|
|
||||||
m_debuggerSettings.readSettings();
|
m_debuggerSettings.readSettings();
|
||||||
|
|
||||||
|
@@ -427,7 +427,6 @@ void DebuggerRunTool::addSearchDirectory(const Utils::FilePath &dir)
|
|||||||
|
|
||||||
void DebuggerRunTool::start()
|
void DebuggerRunTool::start()
|
||||||
{
|
{
|
||||||
TaskHub::clearTasks(Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO);
|
|
||||||
TaskHub::clearTasks(Constants::TASK_CATEGORY_DEBUGGER_RUNTIME);
|
TaskHub::clearTasks(Constants::TASK_CATEGORY_DEBUGGER_RUNTIME);
|
||||||
|
|
||||||
if (d->portsGatherer) {
|
if (d->portsGatherer) {
|
||||||
|
@@ -42,9 +42,6 @@ const QString C_NIMCOMPILERBUILDSTEP_TARGETNIMFILE = QStringLiteral("Nim.NimComp
|
|||||||
// NimCompilerCleanStep
|
// NimCompilerCleanStep
|
||||||
const char C_NIMCOMPILERCLEANSTEP_ID[] = "Nim.NimCompilerCleanStep";
|
const char C_NIMCOMPILERCLEANSTEP_ID[] = "Nim.NimCompilerCleanStep";
|
||||||
|
|
||||||
// Nim task category (Issues pane)
|
|
||||||
const char C_NIMPARSE_ID[] = "Nim.NimParse";
|
|
||||||
|
|
||||||
const char C_NIMLANGUAGE_ID[] = "Nim";
|
const char C_NIMLANGUAGE_ID[] = "Nim";
|
||||||
const char C_NIMCODESTYLESETTINGSPAGE_ID[] = "Nim.NimCodeStyleSettings";
|
const char C_NIMCODESTYLESETTINGSPAGE_ID[] = "Nim.NimCodeStyleSettings";
|
||||||
const char C_NIMCODESTYLESETTINGSPAGE_CATEGORY[] = "Z.Nim";
|
const char C_NIMCODESTYLESETTINGSPAGE_CATEGORY[] = "Z.Nim";
|
||||||
|
@@ -97,7 +97,6 @@ void NimPlugin::extensionsInitialized()
|
|||||||
FileIconProvider::registerIconOverlayForMimeType(icon, Constants::C_NIM_SCRIPT_MIMETYPE);
|
FileIconProvider::registerIconOverlayForMimeType(icon, Constants::C_NIM_SCRIPT_MIMETYPE);
|
||||||
FileIconProvider::registerIconOverlayForMimeType(icon, Constants::C_NIMBLE_MIMETYPE);
|
FileIconProvider::registerIconOverlayForMimeType(icon, Constants::C_NIMBLE_MIMETYPE);
|
||||||
}
|
}
|
||||||
TaskHub::addCategory({Constants::C_NIMPARSE_ID, "Nim"});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Nim
|
} // namespace Nim
|
||||||
|
@@ -39,7 +39,7 @@ static std::vector<NimbleTask> parseTasks(const FilePath &nimblePath, const File
|
|||||||
std::vector<NimbleTask> result;
|
std::vector<NimbleTask> result;
|
||||||
|
|
||||||
if (process.exitCode() != 0) {
|
if (process.exitCode() != 0) {
|
||||||
TaskHub::addTask(Task(Task::Error, process.cleanedStdOut(), {}, -1, Constants::C_NIMPARSE_ID));
|
TaskHub::addTask(ProjectExplorer::BuildSystemTask(Task::Error, process.cleanedStdOut()));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ static NimbleMetadata parseMetadata(const FilePath &nimblePath, const FilePath &
|
|||||||
NimbleMetadata result = {};
|
NimbleMetadata result = {};
|
||||||
|
|
||||||
if (process.exitCode() != 0) {
|
if (process.exitCode() != 0) {
|
||||||
TaskHub::addTask(Task(Task::Error, process.cleanedStdOut(), {}, -1, Constants::C_NIMPARSE_ID));
|
TaskHub::addTask(ProjectExplorer::BuildSystemTask(Task::Error, process.cleanedStdOut()));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
const QList<QByteArray> &lines = linesFromProcessOutput(&process);
|
const QList<QByteArray> &lines = linesFromProcessOutput(&process);
|
||||||
@@ -141,7 +141,6 @@ void NimbleBuildSystem::triggerParsing()
|
|||||||
|
|
||||||
void NimbleBuildSystem::updateProject()
|
void NimbleBuildSystem::updateProject()
|
||||||
{
|
{
|
||||||
TaskHub::clearTasks(Constants::C_NIMPARSE_ID);
|
|
||||||
const FilePath projectDir = projectDirectory();
|
const FilePath projectDir = projectDirectory();
|
||||||
const FilePath nimble = Nim::nimblePathFromKit(kit());
|
const FilePath nimble = Nim::nimblePathFromKit(kit());
|
||||||
|
|
||||||
|
@@ -293,16 +293,26 @@ void BuildManager::extensionsInitialized()
|
|||||||
{
|
{
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_COMPILE,
|
TaskHub::addCategory({Constants::TASK_CATEGORY_COMPILE,
|
||||||
Tr::tr("Compile", "Category for compiler issues listed under 'Issues'"),
|
Tr::tr("Compile", "Category for compiler issues listed under 'Issues'"),
|
||||||
true, 100});
|
Tr::tr("Issues parsed from the compile output."),
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_BUILDSYSTEM,
|
true,
|
||||||
|
100});
|
||||||
|
TaskHub::addCategory(
|
||||||
|
{Constants::TASK_CATEGORY_BUILDSYSTEM,
|
||||||
Tr::tr("Build System", "Category for build system issues listed under 'Issues'"),
|
Tr::tr("Build System", "Category for build system issues listed under 'Issues'"),
|
||||||
true, 100});
|
Tr::tr("Issues from the build system, such as CMake or qmake."),
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_DEPLOYMENT,
|
true,
|
||||||
|
100});
|
||||||
|
TaskHub::addCategory(
|
||||||
|
{Constants::TASK_CATEGORY_DEPLOYMENT,
|
||||||
Tr::tr("Deployment", "Category for deployment issues listed under 'Issues'"),
|
Tr::tr("Deployment", "Category for deployment issues listed under 'Issues'"),
|
||||||
true, 100});
|
Tr::tr("Issues found when deploying applications to devices."),
|
||||||
|
true,
|
||||||
|
100});
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_AUTOTEST,
|
TaskHub::addCategory({Constants::TASK_CATEGORY_AUTOTEST,
|
||||||
Tr::tr("Autotests", "Category for autotest issues listed under 'Issues'"),
|
Tr::tr("Autotests", "Category for autotest issues listed under 'Issues'"),
|
||||||
true, 100});
|
Tr::tr("Issues found when running tests."),
|
||||||
|
true,
|
||||||
|
100});
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildManager::buildProjectWithoutDependencies(Project *project)
|
void BuildManager::buildProjectWithoutDependencies(Project *project)
|
||||||
|
@@ -2075,8 +2075,11 @@ void ProjectExplorerPlugin::extensionsInitialized()
|
|||||||
|
|
||||||
BuildManager::extensionsInitialized();
|
BuildManager::extensionsInitialized();
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_SANITIZER,
|
TaskHub::addCategory({Constants::TASK_CATEGORY_SANITIZER,
|
||||||
Tr::tr("Sanitizer", "Category for sanitizer issues listed under 'Issues'")});
|
Tr::tr("Sanitizer", "Category for sanitizer issues listed under 'Issues'"),
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_TASKLIST_ID, Tr::tr("My Tasks")});
|
Tr::tr("Memory handling issues that the address sanitizer found.")});
|
||||||
|
TaskHub::addCategory({Constants::TASK_CATEGORY_TASKLIST_ID,
|
||||||
|
Tr::tr("My Tasks"),
|
||||||
|
Tr::tr("Issues from a task list file (.tasks).")});
|
||||||
|
|
||||||
SshSettings::loadSettings(ICore::settings());
|
SshSettings::loadSettings(ICore::settings());
|
||||||
const auto searchPathRetriever = [] {
|
const auto searchPathRetriever = [] {
|
||||||
|
@@ -17,6 +17,7 @@ class PROJECTEXPLORER_EXPORT TaskCategory
|
|||||||
public:
|
public:
|
||||||
Utils::Id id;
|
Utils::Id id;
|
||||||
QString displayName;
|
QString displayName;
|
||||||
|
QString description;
|
||||||
bool visible = true;
|
bool visible = true;
|
||||||
int priority = 0;
|
int priority = 0;
|
||||||
};
|
};
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <coreplugin/session.h>
|
#include <coreplugin/session.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
#include <utils/execmenu.h>
|
||||||
#include <utils/fileinprojectfinder.h>
|
#include <utils/fileinprojectfinder.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/itemviews.h>
|
#include <utils/itemviews.h>
|
||||||
@@ -221,6 +222,7 @@ TaskWindow::TaskWindow() : d(std::make_unique<TaskWindowPrivate>())
|
|||||||
|
|
||||||
d->m_categoriesMenu = new QMenu(d->m_categoriesButton);
|
d->m_categoriesMenu = new QMenu(d->m_categoriesButton);
|
||||||
connect(d->m_categoriesMenu, &QMenu::aboutToShow, this, &TaskWindow::updateCategoriesMenu);
|
connect(d->m_categoriesMenu, &QMenu::aboutToShow, this, &TaskWindow::updateCategoriesMenu);
|
||||||
|
Utils::addToolTipsToMenu(d->m_categoriesMenu);
|
||||||
|
|
||||||
d->m_categoriesButton->setMenu(d->m_categoriesMenu);
|
d->m_categoriesButton->setMenu(d->m_categoriesMenu);
|
||||||
|
|
||||||
@@ -475,6 +477,7 @@ void TaskWindow::updateCategoriesMenu()
|
|||||||
auto action = new QAction(d->m_categoriesMenu);
|
auto action = new QAction(d->m_categoriesMenu);
|
||||||
action->setCheckable(true);
|
action->setCheckable(true);
|
||||||
action->setText(c.displayName);
|
action->setText(c.displayName);
|
||||||
|
action->setToolTip(c.description);
|
||||||
action->setChecked(!filteredCategories.contains(c.id));
|
action->setChecked(!filteredCategories.contains(c.id));
|
||||||
connect(action, &QAction::triggered, this, [this, action, id = c.id] {
|
connect(action, &QAction::triggered, this, [this, action, id = c.id] {
|
||||||
setCategoryVisibility(id, action->isChecked());
|
setCategoryVisibility(id, action->isChecked());
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
#include "pythonproject.h"
|
#include "pythonproject.h"
|
||||||
#include "pythonrunconfiguration.h"
|
#include "pythonrunconfiguration.h"
|
||||||
#include "pythonsettings.h"
|
#include "pythonsettings.h"
|
||||||
|
#include "pythontr.h"
|
||||||
#include "pythonwizardpage.h"
|
#include "pythonwizardpage.h"
|
||||||
|
|
||||||
#include <projectexplorer/buildtargetinfo.h>
|
#include <projectexplorer/buildtargetinfo.h>
|
||||||
@@ -70,7 +71,10 @@ void PythonPlugin::extensionsInitialized()
|
|||||||
::Constants::FILEOVERLAY_PY);
|
::Constants::FILEOVERLAY_PY);
|
||||||
FileIconProvider::registerIconOverlayForSuffix(imageFile, "py");
|
FileIconProvider::registerIconOverlayForSuffix(imageFile, "py");
|
||||||
|
|
||||||
TaskHub::addCategory({PythonErrorTaskCategory, "Python", true});
|
TaskHub::addCategory({PythonErrorTaskCategory,
|
||||||
|
"Python",
|
||||||
|
Tr::tr("Issues parsed from Python runtime output."),
|
||||||
|
true});
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Python::Internal
|
} // Python::Internal
|
||||||
|
@@ -39,7 +39,9 @@ namespace QmlDesigner {
|
|||||||
AssetExporterPlugin::AssetExporterPlugin()
|
AssetExporterPlugin::AssetExporterPlugin()
|
||||||
{
|
{
|
||||||
ProjectExplorer::TaskHub::addCategory({Constants::TASK_CATEGORY_ASSET_EXPORT,
|
ProjectExplorer::TaskHub::addCategory({Constants::TASK_CATEGORY_ASSET_EXPORT,
|
||||||
tr("Asset Export"), false});
|
tr("Asset Export"),
|
||||||
|
tr("Issues with exporting assets."),
|
||||||
|
false});
|
||||||
|
|
||||||
auto *designerPlugin = QmlDesigner::QmlDesignerPlugin::instance();
|
auto *designerPlugin = QmlDesigner::QmlDesignerPlugin::instance();
|
||||||
auto &viewManager = designerPlugin->viewManager();
|
auto &viewManager = designerPlugin->viewManager();
|
||||||
|
@@ -205,8 +205,13 @@ void QmlJSEditorPlugin::extensionsInitialized()
|
|||||||
FileIconProvider::registerIconOverlayForMimeType(ProjectExplorer::Constants::FILEOVERLAY_UI,
|
FileIconProvider::registerIconOverlayForMimeType(ProjectExplorer::Constants::FILEOVERLAY_UI,
|
||||||
"application/x-qt.ui+qml");
|
"application/x-qt.ui+qml");
|
||||||
|
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_QML, Tr::tr("QML")});
|
TaskHub::addCategory({Constants::TASK_CATEGORY_QML,
|
||||||
TaskHub::addCategory({Constants::TASK_CATEGORY_QML_ANALYSIS, Tr::tr("QML Analysis"), false});
|
Tr::tr("QML"),
|
||||||
|
Tr::tr("Issues that the QML code parser found.")});
|
||||||
|
TaskHub::addCategory({Constants::TASK_CATEGORY_QML_ANALYSIS,
|
||||||
|
Tr::tr("QML Analysis"),
|
||||||
|
Tr::tr("Issues that the QML static analyzer found."),
|
||||||
|
false});
|
||||||
QmllsSettingsManager::instance()->setupAutoupdate();
|
QmllsSettingsManager::instance()->setupAutoupdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user