Add API in texteditor to let plugins contribute extra selections.

Some plugins use extra selections to provide additional editor annotations: code coverage, spelling
mistake... This was possible for C++ editor in previous version, using
CppModelManagerInterface::setExtraDiagnostics(), but this API has been removed.

This commits adds alternative API directly in the editor, allowing to pass a Core::Id instead of
the enum value.

Change-Id: I3040bd144d6fe0876d861dd28e832729bd5d6602
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Francois Ferrand
2014-10-21 17:50:10 +02:00
committed by hjk
parent 8eb08db536
commit a645f78cd6
2 changed files with 49 additions and 24 deletions

View File

@@ -357,6 +357,8 @@ public:
};
void setExtraSelections(ExtraSelectionKind kind, const QList<QTextEdit::ExtraSelection> &selections);
QList<QTextEdit::ExtraSelection> extraSelections(ExtraSelectionKind kind) const;
void setExtraSelections(Core::Id kind, const QList<QTextEdit::ExtraSelection> &selections);
QList<QTextEdit::ExtraSelection> extraSelections(Core::Id kind) const;
QString extraSelectionTooltip(int pos) const;
RefactorMarkers refactorMarkers() const;