Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92876

Dom: model JS expressions/statements in QmlDom and add qmlls (find usages, go to definition, ...) support for them

    XMLWordPrintable

Details

    • 89b096041 (dev), be92908ac (dev), 1c566c512 (dev), fba9a80d4 (dev), a9e821d6a (dev), 4a1559862 (dev), 447fbe918 (dev), 091191853 (dev), af6234be9 (dev), 087a988ef (dev), ed131e936 (dev), 81f3dca10 (dev), 83f3213ba (dev), c98719b8c (dev), 70977b0d1 (dev)

    Description

      QmlJSScope supports js scopes and usages, it should be cleanly integrated in the Dom, to give access to declarations and usages in QML code. As QQmlJSScope itself is not enough to implement all the LSP-features, model JS statements and expressions in the DOM to complement its information.

      For example, implementing findUsages in qmlls cannot be done only with QQmlJSScope's, as the semantic scopes contain the definitions of JS identifiers but not their usages in the code. Also, the current JS-reformatting works directly on the AST-classes used by the Parser and the DOM for JS statements/expressions might leave a door open to move the reformatting implementation inside the DOM JS classes for later...

      Also implement support (or at least add tests) for

      • find usages
      • go to definition
      • go to type definition
      • completions
      • rename usage
        on the newly introduced dom representations!

      Mostly, all of the JS support for classes can be left out for now, assuming that most of the users are using QML objects instead.

      List of statements/expressions to model in the DOM:

      done

      to be done

      do not do

      in progress

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.
          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              sami.shalayel Sami Shalayel
              fawzi Fawzi Mohamed
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes