aboutsummaryrefslogtreecommitdiffstats
path: root/qt-qml/src/project.ts
Commit message (Collapse)AuthorAgeFilesLines
* Refactor communication between core and extensionsOrkun Tokdemir2024-12-121-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the previous implementation, the extensions were using only one way to communicate with each other, which was getting a notification when a config value was set or changed. This was problematic on startup because there was no order in which the extensions were activated and when messages were handled. b5bf26ac084823758be18453bb61579fefceb57c partially fixed this issue by adding a way to wait for `qt-cpp` to be ready, but it was still not enough. The extension should read config values when they are ready, not when messages are sent from other extensions. Remove the `lazy` initialization parameter in `Project` classes. Instead of using that parameter, we remove the firing event from `addProject()` and only fire when the project is added after startup. This way, we don't need the `lazy` parameter anymore. Since `processMessage()` is not used during startup, this commit also fixes QTBUG-131702 on the extension side. qt-lib: This commit changes `QtWorkspaceConfigMessage` and removes values in it. `QtWorkspaceConfigMessage` is now used only to notify that a value or values were set. The value `CoreApi` can be accessed by `getValue` and `setValue`. * Update the `CoreApi` interface * Add `setValue` * Rename `update` to `notify` * Remove `get<T>()` from `QtWorkspaceConfigMessage` qt-core: * Remove the internal checking mechanism to understand if a value was set or changed. Instead, just store values. qt-cpp: * Update `processMessage()` for the new usage. * Initialize config values explicitly during startup. qt-qml: * Update `processMessage()` for the new usage. * Separate starting `qmlls` from the constructor. It should be started when the conditions are met. * Get config values and update parameters inside `onProjectAdded()` Task-number: QTBUG-131702 Change-Id: If9831ea1257d123f777e6ae2afb92f33942dd3da Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Dispose event handlers and language client when the project is closedOrkun Tokdemir2024-11-281-1/+1
| | | | | | | | | | | Since event handlers are not disposed properly, they are still active when the project is closed. This can cause those handlers to be called after the project is closed, which can lead to errors. * Dispose project managers inside `Deactivate()` Change-Id: Idd7b8548f7c16c41c0e4fd7052fa7ae988678bc4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qt-cpp: qt-qml: Add build directoryOrkun Tokdemir2024-11-251-0/+8
| | | | | | | | * Pass the build directory to qmlls with `-b` * Detect the build directory change from the CMake extension Change-Id: I8279b444036e174762f9d469fd8b4abdaba66e83 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* qt-qml: Add `-I` and `-E` options to qmllsOrkun Tokdemir2024-11-211-0/+33
| | | | | | | | | | | | | * Add message handling to `qt-qml` extension * Pass qml import obtained from either `qtpaths` or Qt installation * Add `additionalImportPaths` to get additional import paths from the user. * Add `useQmlImportPathEnvVar` to pass `-E` option to qmlls. Fixes: VSCODEEXT-104 Change-Id: Ic84bf7a6834d2d84b738e759a69c27ba47bf1fc5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* qt-qml: Adapt qmlls usage with multiple projectsOrkun Tokdemir2024-11-121-3/+41
| | | | | | | | | | | | | | * Remove the global qmlls usage * Start qmlls instance for each project * Use configuration per project instead of global configuration * Use `workspaceFolder` scope for qmlls configuration * Implement `QMLProjectManager` - When a new version of the QML language server is available, restart all qmlls instances. * Prepare codebase for `qmlls` cli parameters per project Change-Id: If4bbd7f99da5ebd054a550419afa985bd65b2f3f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Improve consistency, remove duplication on project and project managerBen Cho2024-10-151-4/+4
| | | | | | | | | | The `ProjectManager` classes in qt-core, qt-cpp are now derived from the `ProjectManager` template class in qt-lib. Rename `ProjectBase` to `Project` for simplcity and consistency. Change-Id: I66492028f43eb8822e2be5cde87de8a97c214381 Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* qt-official: Separate into qt-cpp & qt-qmlOrkun Tokdemir2024-08-281-0/+27
Amends c45fc76944f8a280ccc9483cc47236fd98275fb6 * Update github actions * Update ci-scripts * Remove unused test folder * Remove unused dependencies & update `ThirdPartyNotices.txt`s * Remove unused activation events Fixes: VSCODEEXT-79 Fixes: VSCODEEXT-80 Change-Id: I450fefdde5209454ef11e1b9cd12162753d4fa36 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>