Files
qt-creator/src/plugins/qmljseditor/CMakeLists.txt

36 lines
1.4 KiB
CMake
Raw Normal View History

add_qtc_plugin(QmlJSEditor
DEPENDS LanguageUtils QmlJS QmlEditorWidgets
Automatic qmlls support (experimental) Looks for qmlls (the qml language server of Qt) and if available and set in the preferences uses it instead of the embedded code model for the supported features. Its usage is driven by two flags that can be set in the QtQuick > QML/JS Editing preferences: "use qmlls" activates the use of qmlls if available; "use latest qmlls" always uses the qmlls of the latest Qt, instead of the one of the target (with the one used to compile QtCreator as fallback). To support disabling/enabling of qmlls as soon as one changes the preferences the singleton QmllsSettingsManager can emit a signal on changes. It also keeps track of the latest qmlls binary known. QmlJS::ModelmanagerInterface::ProjectInfo is also extended to keep track of the qmlls binary. QmlJSEditorDocument uses the ProjectInfo and QmllsSettingsManager to decide if a LanguageClient::Client should be started for that document. The client uses the QmllsClient subclass to keep track of the path of the qmlls clients and use the same qmlls process or all files that use the same binary. Currently qmlls <6.4.0 are not considered because they might have too many issues. The enabling/disabling of warnings and highlight is a bit cumbersome because they are handled together in the semantic highlighter, but must be handled separately depending on the qmlls capabilities. The disabling is done at the latest moment stopping the visualization of the embedded model warnings/highlights/suggestions. The computation of the semantic info is not suppressed to support the other features (find usages, semantic highlighting if active,...). When qmlls supports more features a complete removal of the semantic info construction could be evaluated. Change-Id: I3487e1680841025cabba6b339fbfe820ef83f858 Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-28 11:16:49 +02:00
PLUGIN_DEPENDS Core ProjectExplorer QmlJSTools TextEditor LanguageClient
SOURCES
qmlexpressionundercursor.cpp qmlexpressionundercursor.h
Automatic qmlls support (experimental) Looks for qmlls (the qml language server of Qt) and if available and set in the preferences uses it instead of the embedded code model for the supported features. Its usage is driven by two flags that can be set in the QtQuick > QML/JS Editing preferences: "use qmlls" activates the use of qmlls if available; "use latest qmlls" always uses the qmlls of the latest Qt, instead of the one of the target (with the one used to compile QtCreator as fallback). To support disabling/enabling of qmlls as soon as one changes the preferences the singleton QmllsSettingsManager can emit a signal on changes. It also keeps track of the latest qmlls binary known. QmlJS::ModelmanagerInterface::ProjectInfo is also extended to keep track of the qmlls binary. QmlJSEditorDocument uses the ProjectInfo and QmllsSettingsManager to decide if a LanguageClient::Client should be started for that document. The client uses the QmllsClient subclass to keep track of the path of the qmlls clients and use the same qmlls process or all files that use the same binary. Currently qmlls <6.4.0 are not considered because they might have too many issues. The enabling/disabling of warnings and highlight is a bit cumbersome because they are handled together in the semantic highlighter, but must be handled separately depending on the qmlls capabilities. The disabling is done at the latest moment stopping the visualization of the embedded model warnings/highlights/suggestions. The computation of the semantic info is not suppressed to support the other features (find usages, semantic highlighting if active,...). When qmlls supports more features a complete removal of the semantic info construction could be evaluated. Change-Id: I3487e1680841025cabba6b339fbfe820ef83f858 Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-28 11:16:49 +02:00
qmllsclient.h qmllsclient.cpp
qmljsautocompleter.cpp qmljsautocompleter.h
qmljscompletionassist.cpp qmljscompletionassist.h
qmljscomponentfromobjectdef.cpp qmljscomponentfromobjectdef.h
qmljscomponentnamedialog.cpp qmljscomponentnamedialog.h
qmljseditorsettings.cpp qmljseditorsettings.h
qmljseditor.cpp qmljseditor.h
qmljseditor_global.h
Add plugintr.h files to all plugins Except FakeVim, which had it before. for i in [a-eg-z]*/*.json ; do upper=${i##*/} upper=${upper/.json/} lower=${i%/*} trfile=$lower/${lower}tr.h cat << EOT > $lower/${lower}tr.h /**************************************************************************** ** ** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ namespace $upper { struct Tr { Q_DECLARE_TR_FUNCTIONS($upper) }; } // namespace $upper EOT git add $trfile perl -pi -e "s/(${lower}_global.h)/\1\n ${lower}tr.h/" $lower/CMakeLists.txt perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/" $lower/$lower.qbs done Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-22 10:12:01 +02:00
qmljseditortr.h
qmljseditorconstants.h
qmljseditordocument.cpp qmljseditordocument.h qmljseditordocument_p.h
qmljseditorplugin.cpp qmljseditorplugin.h
qmljsfindreferences.cpp qmljsfindreferences.h
qmljshighlighter.cpp qmljshighlighter.h
qmljshoverhandler.cpp qmljshoverhandler.h
qmljsoutline.cpp qmljsoutline.h
qmljsoutlinetreeview.cpp qmljsoutlinetreeview.h
qmljsquickfix.cpp qmljsquickfix.h
qmljsquickfixassist.cpp qmljsquickfixassist.h
qmljsquickfixes.cpp
qmljsreuse.cpp qmljsreuse.h
qmljssemantichighlighter.cpp qmljssemantichighlighter.h
qmljssemanticinfoupdater.cpp qmljssemanticinfoupdater.h
qmljstextmark.cpp qmljstextmark.h
qmljswrapinloader.cpp qmljswrapinloader.h
qmloutlinemodel.cpp qmloutlinemodel.h
qmltaskmanager.cpp qmltaskmanager.h
quicktoolbar.cpp quicktoolbar.h
EXPLICIT_MOC qmljseditor.h
)