Commit Graph

22 Commits

Author SHA1 Message Date
Eike Ziller
177f14b115 TextEditor: Do not change the text format for tool tips
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>
2019-11-06 09:43:20 +00:00
hjk
e23664cc42 TextEditor: Privatize BaseHoverHandler::decorateToolTip()
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>
2019-07-24 06:50:34 +00:00
Eike Ziller
d4415b02af Add fallback help IDs to built-in model
Task-number: QTCREATORBUG-15959
Change-Id: I1e022450d09cb0e8565573079e412b26d09ce662
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-02-12 07:40:43 +00:00
Eike Ziller
443931c1da Help: Move resolution of help from multiple candidate IDs to HelpItem
No need for code duplication.

Change-Id: I3d2c795d072b8de5818e1844b8126e526339c0da
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-01 11:28:02 +00:00
Eike Ziller
4faefe7343 CppHoverHandler: Remove unused function
Change-Id: I76aad25e16424e0d0dad16732b7562a90819c407
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-28 09:50:11 +00:00
Eike Ziller
6c10d36f87 Try harder to get context help in presence of diagnostics
- even if there are diagnostics still try to retrieve symbol info
  and help
- fall back to text based keyword extraction in case code model
  info fails
- if both a code model tool tip (e.g. function signature or type)
  and help are available, show both

Task-number: QTCREATORBUG-15959
Change-Id: Id85a223c24849ead1b25d63776d64a7da1cc73ef
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-21 10:30:03 +00:00
Nikolai Kosjar
0a4073ef90 TextEditor: Return hover handler priority by callback
...to get rid of the asynchronous code path.

Change-Id: I56377510440631b0be712333b2a4018717c86389
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-19 13:57:57 +00:00
Nikolai Kosjar
76c25bcd6a Clang: Provide tooltips
This includes also the query data for the help system (F1) for an
identifier under cursor.

Regressions (libclang changes necessary):
 - Function signatures do not contain default values.
 - Aliases are not resolved for/at:
   - template types
   - qualified name of a type

Fixes/Improvements:
 - Resolve "auto"
 - On a template type, show also the template parameter.
 - For a typedef like
     typedef long long superlong;
   the tooltip was "long long superlong", which was confusing.
   Now, "long long" is shown.

New:
 - Show first or \brief paragraph of a documentation comment.
 - Show size of a class at definition.
 - Show size of a field member in class definition.

Task-number: QTCREATORBUG-11259
Change-Id: Ie1a07930d0e882015d07dc43e35bb81a685cdeb8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-01-16 15:32:15 +00:00
Nikolai Kosjar
d7409e01a7 CppTools: Fix showing main help sentence in tooltip
Mouse hover on e.g. "QString" is supposed to show

   QString
   The QString class provides...

The sentence was removed unintentionally by

  commit a7e8406ced
  TextEditor: Remove unneeded functions in BaseHoverHandler

Change-Id: I356e66c0c21c528822c0f2e37f8058fa7b7d89bf
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-16 08:31:19 +00:00
Nikolai Kosjar
5e861d2be6 CppTools: Move CppHoverHandler to CppTools
This is in preparation for clang code model to provide its own hover
handler.

Change-Id: Ifbdd96f427989bd5d1fbc4badb9c38108485c2f2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-16 08:31:11 +00:00
Thorbjørn Lindeijer
1efe71992b Moved the CppHoverHandler to the CppEditor plugin
It used to be in CppTools, but since the hover handler only makes sense
in the context of the C++ editor, this is a better place.
2008-12-16 12:27:13 +01:00
mae
364a869e38 check for !doc 2008-12-12 12:08:02 +01:00
Roberto Raggi
bab60d14b3 Introduced CPlusPlus::Snapshot, it contains a snap shot of the indexer's current state.
This change removes a number of wrong usages of the CppModelManager::documents()/document().
2008-12-12 10:07:58 +01:00
Roberto Raggi
d454607264 Implemented tooltip and lookat for #include directives. 2008-12-10 17:21:28 +01:00
Thorbjørn Lindeijer
037a9bb579 Set the help id for macros to their name
Enables F1 for opening their help pages. Seems to work nicely.
2008-12-10 12:09:17 +01:00
Thorbjørn Lindeijer
a6c6b2c4ae Fixed macro tooltip overriding type information
The macro tooltip is supposed to be a fallback, since otherwise you
won't be able to see type information for macro parameters.

Reviewed-by: Roberto Raggi
2008-12-10 12:09:17 +01:00
Roberto Raggi
20e36cc364 tooltip for macro definitions. 2008-12-09 15:24:26 +01:00
Patrick Star
c37f4d05d8 Fixes: - missing F1 in tooltip on first IDE start 2008-12-04 13:44:15 +01:00
hjk
df7aacd637 more file cosmetics 2008-12-02 15:08:31 +01:00
hjk
ab83dcd87c off-by-one in headers 2008-12-02 14:20:25 +01:00
hjk
8a43d9b9f3 end-of-line whitespace correction of the new headers 2008-12-02 14:17:16 +01:00
con
05c35356ab Initial import 2008-12-02 12:01:29 +01:00