Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109006 qmlls: Provide go-to support
  3. QTBUG-111409

qmlls: scriptexpression support for go-to definition

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Fixed
    • P2: Important
    • 6.7, 6.x
    • QML: Tooling
    • None
    • ebed9f91f (dev), 6d58a20fb (dev), 2ecf887c0 (dev), f0c7d1695 (dev), 80e265ab4 (6.6)

    Description

      Implement scriptexpression support for go-to definition.

       

      Example from Fabian:

      Item {
          property int i // (1)
          function f(a /*(2)*/ , b) {return a /*  go to definition on a leads to (2) */  > b};  // (4)
          Component.onCompleted: {
              let x = 42 (3)
              f(x, i) // goto definition on f goes to 4, on x goes to (3) and on i goes to (1)
          }
      }
      

      Note from Fabian:

      The QMLDOM is completely unaware of what's in script expressions so far – you might need to get access to the QQmlJSScope of the file for doing resolution in there. Given that we run the linter already, you should however be able to get access to a valid scope.

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-111409
          # Subject Branch Project Status CR V

          Activity

            People

              sami.shalayel Sami Shalayel
              sami.shalayel Sami Shalayel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes