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

Integrate QmlJS rewriter in the Dom model

    XMLWordPrintable

    Details

    • Type: Task
    • Status: In Progress
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: QML: Tooling
    • Labels:
    • Technical Risk:
      Normal

      Description

      We need to write out the Dom back to QML after in memory modifications.
      Unfortunately the approach taken by qmlformat is a bit a dead end mainly because:

      • it cannot reformat a prt of the document, or a code snippet
      • it cannot reindent part of the document keeping in account the choices done by the user in the rest

      These two features are needed by the LSP, and a rewriter able to do these can do a global reformatting, whereas the opposite is not true.

      Fortunately the Qmljs library in creator has these, but lot of the reindenting is tightly connected to Qt/Creator (QTextBlock,...).

      So one should abstract away those parts and bring them to the Dom to avoid having duplicated code later.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              fawzi Fawzi Mohamed
              Reporter:
              fawzi Fawzi Mohamed
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There is 1 open Gerrit change