summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/basehoverhandler.h
Commit message (Collapse)AuthorAgeFilesLines
* Copilot: add copilot suggestion tooltipsDavid Schulz2023-03-291-1/+2
| | | | | | | | | These tooltips allow to switch the currently visible suggestion as well as applying it using the mouse. Change-Id: I30b9a76ae57c66887f4e1b1311e1a7248ed0f194 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Fix wrong tooltip when split mode is usedMikhail Khachayants2022-12-121-0/+2
| | | | | | | | | It was possible to get a tooltip with cached text from other editor area Fixes: QTCREATORBUG-28571 Change-Id: I4250856e6c165eed70ddb4a6c888e16b4a6b045d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Allow explicitly passing the text format for tool tipsEike Ziller2019-11-061-1/+2
| | | | | Change-Id: I6e592a73fa6a3229cda9e76a4ab33f2c0ca330c5 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Do not change the text format for tool tipsEike Ziller2019-11-061-2/+1
| | | | | | | | | We should not force the tool tip text to HTML when help content is available or when adding the F1 icon. Instead add help content and F1 icon into the tool tip layout. Change-Id: Ibe2d4fa2fb81bcda4e5aeb0d7d86dbf63fcf3ce6 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Privatize BaseHoverHandler::decorateToolTip()hjk2019-07-241-1/+1
| | | | | | | | Never overridden, and does not look safe to invoke more than once. Change-Id: If5f3830f3fbf26badb6335443defd628c05cf65a Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: David Schulz <david.schulz@qt.io>
* Rename IContext::HelpIdCallback -> IContext::HelpCallbackEike Ziller2019-01-291-2/+2
| | | | | | | | It no longer takes an ID but a HelpItem. Change-Id: I0aa738549fea4fcfd0151adc2dfd642c63f0f60d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Move Help item from text editor to coreEike Ziller2019-01-251-4/+4
| | | | | | | The functionality is not text editor specific. Change-Id: Iee531572f14673e75129f4bfbb64a1437899d31e Reviewed-by: David Schulz <david.schulz@qt.io>
* Clang: Show help with F1 even if there is a diagnosticNikolai Kosjar2019-01-101-0/+3
| | | | | | | | | | | | | | | | | ...at that particular location. For example, the code new QSignalMapper; produced a deprecated warning with Qt 5.12 and F1 led to "No documentation available" as the diagnostic was always prioritized. Task-number: QTCREATORBUG-21686 Change-Id: Icf03000fb6b9de04e467e758da6167018d154a21 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Let BaseHoverHandler handle help id callbacksNikolai Kosjar2018-01-191-1/+7
| | | | | | | ...to support asynchronous hover handlers like ClangHoverHandler. Change-Id: I8dc7189db37ec3a923cf493b8957c59ec9be447c Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Return hover handler priority by callbackNikolai Kosjar2018-01-191-8/+6
| | | | | | | ...to get rid of the asynchronous code path. Change-Id: I56377510440631b0be712333b2a4018717c86389 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Allow asynchronous hover handlersNikolai Kosjar2017-07-031-2/+13
| | | | | Change-Id: I956b126e2c779aa81f86e4432d127b45ac1912ff Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Reduce BaseHoverHandler::identifyMatch() callsNikolai Kosjar2017-06-301-1/+1
| | | | | | | ...because they are potentially expensive. Change-Id: Iaa235ea1fa864a0a67f3ed10b7f89d23179c642b Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Avoid unneeded calls in BaseHoverHandlerNikolai Kosjar2017-06-291-2/+1
| | | | | | | | | | | | | | In checkToolTip(), the call to decorateToolTip() is not needed since it does not affect the priority. In showToolTip(), we can assume that checkToolTip() was called and thus avoid a call to identifyMatch(). TextEditorWidgetPrivate::processTooltipRequest() is the only caller of checkToolTip() and showToolTip(). Change-Id: I362c697754b6a29c9c0b34f85d3022f00e3e1031 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Remove unneeded functions in BaseHoverHandlerNikolai Kosjar2017-06-291-5/+0
| | | | | Change-Id: Ic61babb48cca0711812256b766f1db62895901f6 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Clean up BaseHoverHandlerNikolai Kosjar2017-06-291-16/+12
| | | | | Change-Id: Ie2f0c8c0a46377ae18ff4e31c7e43b1242cb7372 Reviewed-by: David Schulz <david.schulz@qt.io>
* De-qobjectify BaseHoverHandler and derivativesNikolai Kosjar2017-06-291-5/+5
| | | | | Change-Id: I9bc1d849349f85b5c7fd6013396b8b15b6cb1568 Reviewed-by: David Schulz <david.schulz@qt.io>
* Wholesale conversion to #pragma oncehjk2016-03-301-4/+1
| | | | | | | Kudos to cgmb and https://github.com/cgmb/guardonce Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* TextEditor: Implement BaseHoverHandler::identifyMatch()Ulf Hermann2016-02-091-1/+1
| | | | | | | | | 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>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* hoverhandler: add priority system to determine which tooltip is shownMarc Reilly2016-01-181-0/+12
| | | | | | | | | | | | | | | | Hover handlers now have a priority which is used to determine which handler's tooltip is shown. The handler with the highest priority is used, or, in the case of equal rankings, the first registered handler. The base handler implements a default basic priority system based on the diagnostic and help properties. Derived handlers can manually set the ranking value as part of the identifyMatch() call. A new checkToolTip() method is added so the handler can analyze whether a tooltip is valid without it being shown. Change-Id: I9d82fb9cc52f1d3cd53a8b197d75cd923651b79d Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* Fix that html tags instead of F1 button were for QML tool tipsEike Ziller2015-12-041-2/+2
| | | | | | | | | | | Regression introduced by 6ed775f56a17a6fc3bb48323bd43373d8589b7b0 Change-Id: Ibef3453339d431dcd7b890d18c27f42f198070e8 Task-number: QTCREATORBUG-15225 Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com> Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Fix wrong context help if tool tip was not shown for focus widgetEike Ziller2015-09-301-2/+0
| | | | | | | | | | | | | The tool tip never has focus, so it cannot become the IContext that is checked for context help. So, integrate the help id into Utils::ToolTip and check the tool tip first when checking for context help. As a side effect the [F1] button and help id for the tool tip is now also available for use outside of the text editors. Task-number: QTCREATORBUG-5345 Change-Id: Id975703caf161d1183c247e8ad8bb693b90fd306 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* Clean exported headers of the TextEditor plugin.Friedemann Kleint2015-02-261-1/+2
| | | | | Change-Id: I1e7dd34ba5a51fb0b34d137dc03add4457b32ed1 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Merge remote-tracking branch 'origin/3.2'Eike Ziller2014-10-141-7/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/ipaddresslineedit.cpp src/libs/utils/logging.h src/plugins/analyzerbase/AnalyzerBase.pluginspec.in src/plugins/android/Android.pluginspec.in src/plugins/android/androiddeploystep.cpp src/plugins/android/androiddeploystep.h src/plugins/android/androiddeploystepfactory.cpp src/plugins/android/androiddeploystepwidget.cpp src/plugins/android/androidpackagecreationfactory.cpp src/plugins/android/androidpackagecreationstep.cpp src/plugins/android/androidpackagecreationstep.h src/plugins/android/androidpackagecreationwidget.cpp src/plugins/android/androidpackagecreationwidget.h src/plugins/android/javafilewizard.cpp src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/baremetal/BareMetal.pluginspec.in src/plugins/bazaar/Bazaar.pluginspec.in src/plugins/beautifier/Beautifier.pluginspec.in src/plugins/bineditor/BinEditor.pluginspec.in src/plugins/bookmarks/Bookmarks.pluginspec.in src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in src/plugins/clangcodemodel/clanghighlightingsupport.cpp src/plugins/clangcodemodel/clangsymbolsearcher.cpp src/plugins/classview/ClassView.pluginspec.in src/plugins/clearcase/ClearCase.pluginspec.in src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp src/plugins/cmakeprojectmanager/cmakehighlighter.cpp src/plugins/coreplugin/Core.pluginspec.in src/plugins/cpaster/CodePaster.pluginspec.in src/plugins/cppeditor/CppEditor.pluginspec.in src/plugins/cppeditor/cppfilewizard.cpp src/plugins/cpptools/CppTools.pluginspec.in src/plugins/cpptools/cpphighlightingsupportinternal.cpp src/plugins/cpptools/cppmodelmanagerinterface.cpp src/plugins/cpptools/cppmodelmanagerinterface.h src/plugins/cvs/CVS.pluginspec.in src/plugins/debugger/Debugger.pluginspec.in src/plugins/designer/Designer.pluginspec.in src/plugins/diffeditor/DiffEditor.pluginspec.in src/plugins/emacskeys/EmacsKeys.pluginspec.in src/plugins/fakevim/FakeVim.pluginspec.in src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in src/plugins/git/Git.pluginspec.in src/plugins/git/gitorious/gitorious.cpp src/plugins/git/gitorious/gitorious.h src/plugins/git/gitorious/gitoriousclonewizard.cpp src/plugins/git/gitorious/gitorioushostwidget.cpp src/plugins/git/gitorious/gitorioushostwidget.h src/plugins/git/gitorious/gitorioushostwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwidget.cpp src/plugins/git/gitorious/gitoriousprojectwidget.h src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwizardpage.h src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp src/plugins/git/gitorious/gitoriousrepositorywizardpage.h src/plugins/glsleditor/GLSLEditor.pluginspec.in src/plugins/glsleditor/glsleditorfactory.cpp src/plugins/glsleditor/glslfilewizard.cpp src/plugins/helloworld/HelloWorld.pluginspec.in src/plugins/help/Help.pluginspec.in src/plugins/imageviewer/ImageViewer.pluginspec.in src/plugins/ios/Ios.pluginspec.in src/plugins/macros/Macros.pluginspec.in src/plugins/mercurial/Mercurial.pluginspec.in src/plugins/perforce/Perforce.pluginspec.in src/plugins/projectexplorer/ProjectExplorer.pluginspec.in src/plugins/pythoneditor/PythonEditor.pluginspec.in src/plugins/pythoneditor/pythoneditorwidget.cpp src/plugins/pythoneditor/wizard/pythonfilewizard.cpp src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in src/plugins/qmakeprojectmanager/profileeditorfactory.cpp src/plugins/qmldesigner/QmlDesigner.pluginspec.in src/plugins/qmljseditor/QmlJSEditor.pluginspec.in src/plugins/qmljseditor/qmljseditorfactory.cpp src/plugins/qmljstools/QmlJSTools.pluginspec.in src/plugins/qmlprofiler/QmlProfiler.pluginspec.in src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in src/plugins/qnx/Qnx.pluginspec.in src/plugins/qtsupport/QtSupport.pluginspec.in src/plugins/remotelinux/RemoteLinux.pluginspec.in src/plugins/resourceeditor/ResourceEditor.pluginspec.in src/plugins/resourceeditor/resourcewizard.h src/plugins/subversion/Subversion.pluginspec.in src/plugins/tasklist/TaskList.pluginspec.in src/plugins/texteditor/TextEditor.pluginspec.in src/plugins/texteditor/basetexteditor_p.h src/plugins/texteditor/basetextmark.cpp src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h src/plugins/texteditor/codeassist/defaultassistinterface.h src/plugins/texteditor/codeassist/iassistproposalitem.cpp src/plugins/texteditor/itexteditor.cpp src/plugins/texteditor/itexteditor.h src/plugins/texteditor/itextmark.cpp src/plugins/texteditor/plaintexteditor.cpp src/plugins/texteditor/plaintexteditor.h src/plugins/texteditor/texteditoractionhandler.cpp src/plugins/todo/Todo.pluginspec.in src/plugins/updateinfo/UpdateInfo.pluginspec.in src/plugins/valgrind/Valgrind.pluginspec.in src/plugins/vcsbase/VcsBase.pluginspec.in src/plugins/welcome/Welcome.pluginspec.in src/plugins/winrt/WinRt.pluginspec.in tests/auto/debugger/temporarydir.h Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
| * License updateEike Ziller2014-10-091-7/+8
| | | | | | | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | TextEditor: Simplify HoverHandler handlinghjk2014-09-301-7/+5
| | | | | | | | | | | | | | | | | | | | The editor factories are already a central place to associate hover handlers with editors, no need to retrieve them later from the object pool again. This also allows for easy handling of more than one active handler per editor. Change-Id: Ie716b96f5ce6b526ee897468635e03e909d81538 Reviewed-by: David Schulz <david.schulz@digia.com>
* | TextEditor: Rename BaseTextEditorWidget to TextEditorWidgethjk2014-09-291-3/+3
| | | | | | | | | | | | | | ... and some of the related implementation details Change-Id: I1f03aa5acf2d3fb2cfc2a6a7845f3d3578b0408d Reviewed-by: David Schulz <david.schulz@digia.com>
* | TextEditor: Move some hover handler operation from Editor to Widgethjk2014-09-101-14/+7
| | | | | | | | | | Change-Id: Ie54bf52d3f89c76f379d20c4807b1e252af51505 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Merge ITextEditor and BaseTextEditorhjk2014-07-251-6/+6
|/ | | | | | | Adjust all callers, de-export BaseTextEditorAnimator Change-Id: I2329d976c1398e2449844bb480a4d4ed29859506 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Clean up single namespace forward-declarationsOrgad Shaneh2014-02-121-3/+1
| | | | | | | | | | | | | | | | | | Done using the following ruby script: Dir.glob('**/*.h').each { |file| if File.file?(file) s = File.read(file) t = s.gsub(/^namespace .+ \{\n\s*class .*;\n\s*\}.*$/) { |m| m.gsub(/\n\s*/, ' ').gsub(/\s*\/\/.*$/, '') } if t != s puts file File.open(file, 'w').write(t) end end } Change-Id: Iffcb966e90eb8e1a625eccd5dd0b94f000ae368e Reviewed-by: hjk <hjk121@nokiamail.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* BaseHoverHandler: Code cosmeticshjk2013-10-111-3/+2
| | | | | Change-Id: Ib91f3ffd0c0539712d0797fa1ef378d96bd82db6 Reviewed-by: David Schulz <david.schulz@digia.com>
* Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Removed module names from #include directives.Erik Verbruggen2012-02-151-2/+2
| | | | | | | | Getting the #include directives ready for Qt5. This includes the new-project wizards. Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Long live the king!hjk2012-01-261-1/+1
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* Merge remote-tracking branch 'origin/2.4'Eike Ziller2011-11-111-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/qmljs/qmljsinterpreter.cpp src/libs/qmljs/qmljsinterpreter.h src/plugins/debugger/qml/scriptconsole.cpp src/plugins/git/gitplugin.cpp src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
| * all: s/info@qt.nokia.com/qt-info@nokia.com/hjk2011-11-031-2/+2
| | | | | | | | | | Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* | Implement context help for pro file editorJarek Kobus2011-11-101-2/+0
|/ | | | | | Task-number: QTCREATORBUG-6325 Change-Id: Ie8b2eb582eb527eac6af56d0c69a8ae1dafdc1df Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* Fix/add copyright headersTobias Hunger2011-05-061-1/+1
| | | | Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
* Update license.hjk2011-04-131-14/+13
|
* texteditor: merge ITextEditable into ITextEditorhjk2011-02-221-2/+2
| | | | | | | | rename BastTextEditor->BaseTextEditorWidget, BaseTextEditorEditable->BaseTextEditor rename BaseTextEditor{,Widget} subclasses rename editableInterface->editorInterface rename createEditableInterface->createEditor minor cleanups after renamings
* C++ editor: Try to find a help item if there is a syntax errorLeandro Melo2011-01-171-0/+4
| | | | Task-number: QTCREATORBUG-2674
* It's 2011 now.con2011-01-121-1/+1
| | | | Reviewed-by: hjk
* License headers.con2010-12-171-7/+11
|
* Add destructor to BaseHoverHandler.Leandro Melo2010-09-241-0/+1
|