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

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

      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.

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes