forked from qt-creator/qt-creator
TextEditor: Implement BaseHoverHandler::identifyMatch()
The extra selection tooltips are a good default for a hover match. We use that in the basic plaintext editor to show, for example, syntax errors in XML documents, detected during extra compiler runs. Change-Id: Ib7f755c482ebc04148567105e4779324799fb670 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "texteditorconstants.h"
|
||||
#include "texteditorplugin.h"
|
||||
#include "texteditorsettings.h"
|
||||
#include "basehoverhandler.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/infobar.h>
|
||||
@@ -60,6 +61,7 @@ PlainTextEditorFactory::PlainTextEditorFactory()
|
||||
setDisplayName(qApp->translate("OpenWith::Editors", Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME));
|
||||
addMimeType(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT));
|
||||
addMimeType(QLatin1String("text/css")); // for some reason freedesktop thinks css is text/x-csrc
|
||||
addHoverHandler(new BaseHoverHandler);
|
||||
|
||||
setDocumentCreator([]() { return new TextDocument(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID); });
|
||||
setEditorWidgetCreator([]() { return new PlainTextEditorWidget; });
|
||||
|
||||
Reference in New Issue
Block a user