aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/texteditor.qbs
Commit message (Collapse)AuthorAgeFilesLines
* TextEditor: remove text editor action handlerDavid Schulz2024-04-091-2/+0
| | | | | | | | | | Give each editor a context and register editor actions individually for that context. This removes the need to tell the action handler the current editor. Additionally all actions are now available in editor widgets outside of the EditorManager. Change-Id: I0109866b180889762f8bd8aa07874d8d7c55bfa6 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* TextEditor: handle syntax highlight in batchesDavid Schulz2024-03-251-2/+0
| | | | | | | | | | | | | | | | | Use an elapsed timer in the syntax highlighter to periodically return from the highlight and push a continue highlight to the end of the event loop. This allows the user to interact with the editor in between those batches. If the user modifies the document in between highlighting batches, the area that still needs a rehighlight is increased if needed. This also reverts 62ea85ee6ad15c8e4d9cb5e35b1f10bee3c49ac7 and the related changes. Task-number: QTCREATORBUG-28727 Change-Id: I7c394dbdff658330bb72f3b68b9928980947db75 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Add type hierarchy infrastructureChristian Kandeler2024-03-121-1/+4
| | | | | | | | We want to support more than one back-end in the future. Task-number: QTCREATORBUG-28116 Change-Id: I72020c94b36072a297e13f44130e5e2482922cd4 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Simplify setup of line number filterhjk2024-01-171-1/+0
| | | | | | Change-Id: Ida977fc959f3fe6052151ba8e2461a64699d0a41 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* TextEditor: Move test setup closer to tested codehjk2024-01-171-0/+1
| | | | | Change-Id: Ib6edee42b20830a322d47fc1ba071d3cdf2d7538 Reviewed-by: David Schulz <david.schulz@qt.io>
* SyntaxHighlighter: Move SyntaxHighlighter to separate threadArtem Sokolovskii2023-12-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change involves the relocation of SyntaxHighlighter processing to another thread. The core idea is to create a duplicate of the original TextDocument using SyntaxHighlighterRunnerPrivate::cloneDocument. A new SyntaxHighlighter is then instantiated by SyntaxHighLighterCreator for the cloned document. The entire SyntaxHighLighterCreator class is moved to a new thread, where it performs highlighting on the cloned document. Upon completion of the highlighting process, the resultsReady signal is emitted, and the updated highlighting data is applied to the original document. This shift of SyntaxHighlighter to another thread enhances the user experience by preventing UI slowdowns during the highlighting process. - Introduction of BaseSyntaxHighlighterRunner as an interface class for future *SyntaxHighlighterRunner. - Inclusion of DirectSyntaxHighlighterRunner class for performing highlighting in the main thread, suitable for syntax highlighters that cannot be moved to another thread. - Introduction of ThreadedSyntaxHighlighterRunner class for highlighting in a separate thread, preventing UI blocking during the process. - Addition of Result data to the SyntaxHighlighter class to facilitate data exchange between threads. Task-number: QTCREATORBUG-28727 Change-Id: I4b6a38d15f5ec9b8828055d38d2a0c6f21a657b4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Fix Qbs buildChristian Stenger2023-11-211-0/+2
| | | | | | | Amends b26c43f133fd692e6ab7d8fba309f8e5204fd3ec. Change-Id: Ib2dcee8280c1a91f7a8ade344fd43c4ecd787775 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: remove texteditor_p.hDavid Schulz2023-11-071-1/+0
| | | | | | | | There is no need to have an extra file for one struct that is only used inside texteditor.cpp Change-Id: Iee8f7ce5e0d19da7b444660d81c350eb10b501ef Reviewed-by: hjk <hjk@qt.io>
* Bookmarks: Merge plugin into TextEditorhjk2023-09-281-0/+6
| | | | | Change-Id: I4c9438f3596daff2c18680a731764bf5010e1e25 Reviewed-by: David Schulz <david.schulz@qt.io>
* qbs build: Remove unneeded Project itemsChristian Kandeler2023-09-141-221/+218
| | | | | | | Also update type descriptions. Change-Id: I2b7d8814913cfb72cb8280601338ab763d8fabe6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: add json indenterDavid Schulz2023-08-281-0/+2
| | | | | | | Use an EditorFactory that sets up a custom indenter for json files. Change-Id: Id5ade9f9f551835131a62e381a972f0b6032e7c0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Add tests for the generic highlighterDavid Schulz2023-06-071-0/+2
| | | | | | | Change-Id: I5a5092ed0a997800bf6653ab25d69f08f4aa0c37 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: add tests for the code assistantDavid Schulz2023-05-311-0/+2
| | | | | | Task-number: QTCREATORBUG-28989 Change-Id: Id76d5df589ab50c7deb96b8ad29d1f29bc368e59 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Qbs build system: Add a component for test files groupsAlessandro Portale2023-03-211-3/+1
| | | | | | | | | Mainly in order to enforce a unified group name across QtC libraries and plugins. Change-Id: I6eafe0f9d227ec73d8c9029675866c67063768fb Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* MarkdownView: Merge into TextEditorhjk2023-02-211-0/+2
| | | | | | | | | Make it a bit more compact, too. Change-Id: I448164371c5a1d6969a292feba17caa2826f58c3 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: unify assist processor handlingDavid Schulz2022-11-141-2/+2
| | | | | | | | | | | Define the run type of the processor by its implementation instead of a enum value of the provider. The execution of a processor inside the assist now follows a unified procedure. Change-Id: Ibe9fab324c6072e77702c2663946d7a9f562a085 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* TextEditor: inline snippetssettingspage.uiAlessandro Portale2022-08-171-1/+0
| | | | | | Change-Id: I483bc07b39328a491af373ce76b365e968176828 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Factor out codec chooserOrgad Shaneh2022-08-031-0/+2
| | | | | | Change-Id: I664f7ba484f379b8d2b8254d4f880c0d37d70ff8 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: inline highlightersettingspage.uihjk2022-07-271-1/+0
| | | | | | Change-Id: Icc4b2fe7013f2ebb2eb57cc5f581798c87866ff5 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* TextEditor: inline displaysettingspage.uihjk2022-07-271-1/+0
| | | | | Change-Id: Ifb57a37d7ecc5a7b30ef495c6beec762a2df00be Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: inline colorschemeedit.uihjk2022-07-261-1/+0
| | | | | Change-Id: I8a0d129fca74940eeb28860a0b69476f2b459e22 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: inline tabsettingswidget.uihjk2022-07-261-1/+0
| | | | | | Change-Id: I9afe5978df1b1313c9d88493dcec9cfe3b7a6af9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: inline completionsettingspage.uihjk2022-07-261-1/+0
| | | | | | Change-Id: I41f9b6376b3478a7a6aa0e96ee1165f9aa94d46e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: Inline behaviorsettingswidget.uihjk2022-07-261-1/+0
| | | | | Change-Id: I255636d4da8c0282356cfcf307bd6a5a2daaa4fe Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: inline codestyleselectorwidget.uihjk2022-07-251-1/+0
| | | | | Change-Id: Id545fbee532e463fa41cdc4f8dfc2b9bcd807186 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* TextEditor: inline fontsettingspage.uihjk2022-07-251-1/+0
| | | | | Change-Id: I6bcfa9135ad66146850b0500c6d35889ab5c5df7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Add plugintr.h files to all pluginshjk2022-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* TextEditor: Inline behaviorsettingspage.uihjk2022-06-221-1/+0
| | | | | | | | Less code, indirections and allocations. Change-Id: I41011f90255a035eabe8f755fed6213f8f773a7e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: Allow defining custom snippet parser functionDavid Schulz2021-05-251-0/+2
| | | | | | Task-number: QTCREATORBUG-22406 Change-Id: I21ae9740d348d4e0869029343d51b70f9df9cdac Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: move snippet overlay into own cpp fileDavid Schulz2021-05-031-2/+4
| | | | | Change-Id: I3343d9abf19e4edc7bd88077bf8fe6666a901e1b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* qbs build: Remove code for creating deployment packagesChristian Kandeler2021-02-171-2/+0
| | | | | | | | Not a use case anymore, and if it were, we'd do it using built-in capabilities. Change-Id: I4c588ad7fb282530880210cb4c5795677074b1e0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: move CodecSelector dialog to CoreDavid Schulz2020-04-151-2/+0
| | | | | | Task-number: QTCREATORBUG-23835 Change-Id: I824ae9650c244fffc064ade718fc788fc2908ada Reviewed-by: hjk <hjk@qt.io>
* TextEditor: Use simple text indentation as defaultEike Ziller2020-03-041-2/+0
| | | | | | | | | | | | | Simple indentation based on the previous line was already available in the NormalIndenter class. Merge that up the hierarchy chain into TextIndenter which is the base for other text-based indenters, and make that the default indenter for text editor factories. Text editor factories that don't have a special indenter get at least basic indentation support for free that way. Change-Id: Ib977a990f10a99bead82bc8a8348c02a106665f1 Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: add formatter supportDavid Schulz2020-01-221-0/+1
| | | | | Change-Id: I65590273b2541e08a39970cd9bb4739a5634b2f7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Dissolve TextEditorOptionsPage intermediate hierarchy levelhjk2020-01-161-2/+0
| | | | | | | | It's effectively setting only three properties nowadays, not enough to justify a case of reuse-by-inheritance anymore. Change-Id: I947fbc51e76c8d908da662dd58dce91614c28e08 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: replace generic highlighter with ksyntaxhighlightingDavid Schulz2019-01-281-47/+14
| | | | | | Fixes: QTCREATORBUG-21029 Change-Id: I9894c4384e0e47da6bf030b7b8e07c3ad4737ff3 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Move Help item from text editor to coreEike Ziller2019-01-251-2/+0
| | | | | | | The functionality is not text editor specific. Change-Id: Iee531572f14673e75129f4bfbb64a1437899d31e Reviewed-by: David Schulz <david.schulz@qt.io>
* ClangFormat: Refactor indenter to allow ClangFormat unit-testsIvan Donchevskii2019-01-221-1/+2
| | | | | | | | | | We do not build texteditor files in unit-tests so some tricks were required to make ClangFormatIndenter available. First simple unit-test proofs it builds and runs. Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Beautifier: Move formatting tools to TextEditorIvan Donchevskii2018-08-301-0/+4
| | | | | | | | | | | | Formatting is moved from Beautifier plugin to formattexteditor.h/.cpp. Diff and Differ classes are extracted from DiffEditor to Utils to prevent extra TextEditor dependencies. This change will make possible to use formatCurrentFile and similar functions not only from Beautifier code. Change-Id: Ic5ca668afe88f4e9376d49e6bd3594807172b0dd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: add document content completerDavid Schulz2018-02-141-0/+2
| | | | | | | | | | Add completion based on words of the document. This provides basic assistance for programming languages without a code model. Task-number: QTCREATORBUG-13869 Change-Id: I3a9c59c741dfd6895442fc0524cfd1bd3b2b0111 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Dissolve QuickFixAssistProcessorhjk2017-12-151-2/+0
| | | | | | | | | | | ... into QuickFixAssistProcessor and QmlJSQuickFixAssistProcessor, by essentially duplicating the class, but moving the actual work to a new a GenericProposal::createProposal(...QuickFixOperations...) Less indirection, and less code in total. Change-Id: I2f8cba970bf587c9cbf04321269a60ed51bfae2a Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Remove QuickFixAssistProviderhjk2017-12-151-2/+0
| | | | | | | | It did not contain any functionality beyond the base IAssistProvider anymore. Change-Id: I0198b3d629f81be8c994ffed3904b5f12ee7f9b9 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: move convenience from texteditor to utilsIvan Donchevskii2017-09-221-2/+0
| | | | | | | Allows to use this header without texteditor dependency. Change-Id: I706f42799c3ea42473a716fa9ef9f3cfbef6fdd4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* TextEditor: Simplify TextMarkRegistryDavid Schulz2017-05-301-1/+0
| | | | | | | | The registry is an implementation detail and doesn't need to be exported so move it to the textmark.cpp file. Change-Id: Ic103b122cb20063fa4bc220bdc90cecff27054aa Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove the need to create ISnippetProvider subclassesEike Ziller2017-04-251-4/+2
| | | | | Change-Id: I1810aaa945136d9726a66dad41377429a6adc8e1 Reviewed-by: David Schulz <david.schulz@qt.io>
* qbs build: More steps toward creating a "development installation".Christian Kandeler2016-06-131-260/+264
| | | | | | | | | | | | | | | Namely: - Install header files. - Install imports and modules. - Create modules from products and install them. This is most of what we need. The main thing still left to do is dealing with paths in Export items. These have to be translated somehow. (Currently we only copy the Depends items out of the Export items and ignore everything else.) Change-Id: I12d49fa31d1c1e05bc77a0e0ce3ec9c78c27192a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qbs build: Introduce new module "qtc".Christian Kandeler2016-06-081-1/+1
| | | | | | | | | The qtc module gathers properties that used to live in the top-level project file. This is the first step towards making it possible to build plugins against an installed Qt Creator ("out of source build"). Change-Id: Ia1514cc9c888e80be01b308e908de48980fcbdb8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move completion settings page to TextEditor plugin.David Schulz2016-05-301-0/+5
| | | | | | Change-Id: I12b7828d23d599e5903237d0cc2a3c0440e1b07d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* qbs build: remove unnecessary script dependencyTim Jenssen2016-05-131-1/+1
| | | | | Change-Id: I0e5764ffc9a6146932c43d96a31138451260c161 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Merge remote-tracking branch 'origin/4.0'Eike Ziller2016-05-031-0/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggerruncontrol.cpp src/plugins/projectexplorer/projectwizardpage.cpp src/plugins/projectexplorer/xcodebuildparser.h src/plugins/qmldesigner/qmldesignerplugin.cpp src/tools/clangbackend/ipcsource/translationunits.cpp Change-Id: Ibf0857cf8dbf95fc9ac13d5c2112b3f4a2ca7de6