summaryrefslogtreecommitdiff
path: root/src/plugins/pythoneditor/pythoneditor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* rename PythonEditor plugin to PythonDavid Schulz2019-07-171-65/+0
| | | | | | | | The plugin does not only contain a pure editor, but all kind of support for a programming language like project and run support. Change-Id: I1251367c8db2e7a54986415ffc5b860cb210de3c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ClangFormat: Refactor indenter to allow ClangFormat unit-testsIvan Donchevskii2019-01-221-1/+1
| | | | | | | | | | 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>
* Introduce a basic client for the language server protocolDavid Schulz2018-09-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The language server protocol is used to transport language specific information needed to efficiently edit source files. For example completion, go to operations and symbol information. These information are transferred via JSON-RPC. The complete definition can be found under https://microsoft.github.io/language-server-protocol/specification. This language server protocol support consists of two major parts, the C++ representation of the language server protocol, and the client part for the communication with an external language server. The TypeScript definitions of the protocol interfaces are transferred to C++ classes. Those classes have getter and setter for every interface value. Optional values from the protocol are represented by Utils::optional<ValueType>. The JSON objects that are used to transfer the data between client and server are hidden by a specialized JsonObject class derived from QJsonObject. Additionally this JsonObject provides a validity check that is capable of creating a detailed error message for malformed, or at least unexpected JSON representation of the protocol. The client is the interface between Qt Creator and language server functionality, like completion, diagnostics, document and workspace synchronization. The base client converts the data that is sent from/to the server between the raw byte array and the corresponding C++ objects. The transportat layer is defined in a specialized base client (this initial change will only support stdio language server). The running clients are handled inside the language client manager, which is also used to connect global and exclusive Qt Creator functionality to the clients. Task-number: QTCREATORBUG-20284 Change-Id: I8e123e20c3f14ff7055c505319696d5096fe1704 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix that bookmarks couldn't be added to .pro files with mouseEike Ziller2018-06-191-1/+0
| | | | | | | | | | | The area with the marks was not showing up. This patch reverses the logic for showing the marks area to opt-out. Almost all editors were opting in for it already. The AndroidManifest editor, VCS base editor, and widget designer text editor opt out now. Task-number: QTCREATORBUG-20339 Change-Id: Iccb6d0256618f7ef70e8921847ce2fd46fd660c0 Reviewed-by: David Schulz <david.schulz@qt.io>
* Allow giving TextEditorFactory custom CommentDefinitionEike Ziller2017-04-261-1/+1
| | | | | | | | It was not possible to set custom comment styles. Also simplifies the code for the predefined styles. Change-Id: Id7f345d65b747bfac5a15e3eb15cd2beb106b281 Reviewed-by: David Schulz <david.schulz@qt.io>
* PythonEditor: Code cosmeticshjk2016-10-061-0/+2
| | | | | | | Namespace, unused members. Change-Id: I5cad3a42843c716c5f06bd481c1a1b7b8a2cf29d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* PythonEditor: Modernize/Streamlinehjk2016-08-261-6/+6
| | | | | | | | | Remove virtual, add override, add = delete, remove QLatin1*, flatten filesystem hierarchy, remove unneeded 'inline', use initializer list, etc. Change-Id: I0a95d806d73ca1a33cfd1ba85c2664d9ebc32690 Reviewed-by: David Schulz <david.schulz@qt.io>
* PythonEditor: Fix translation contextTakumi ASAKI2016-05-301-1/+1
| | | | | Change-Id: If20dc0ec6b886df8fde9961dc86cb44b78ec520a Reviewed-by: hjk <hjk@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* TextEditor: Factory cosmeticshjk2014-10-151-21/+3
| | | | | | | Pimpl, add some convenience setters. Change-Id: I525c080179fddab6fe2bd2270505fdbf33e56be2 Reviewed-by: David Schulz <david.schulz@digia.com>
* Merge remote-tracking branch 'origin/3.2'Eike Ziller2014-10-141-7/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/ipaddresslineedit.cpp src/libs/utils/logging.h src/plugins/analyzerbase/AnalyzerBase.pluginspec.in src/plugins/android/Android.pluginspec.in src/plugins/android/androiddeploystep.cpp src/plugins/android/androiddeploystep.h src/plugins/android/androiddeploystepfactory.cpp src/plugins/android/androiddeploystepwidget.cpp src/plugins/android/androidpackagecreationfactory.cpp src/plugins/android/androidpackagecreationstep.cpp src/plugins/android/androidpackagecreationstep.h src/plugins/android/androidpackagecreationwidget.cpp src/plugins/android/androidpackagecreationwidget.h src/plugins/android/javafilewizard.cpp src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/baremetal/BareMetal.pluginspec.in src/plugins/bazaar/Bazaar.pluginspec.in src/plugins/beautifier/Beautifier.pluginspec.in src/plugins/bineditor/BinEditor.pluginspec.in src/plugins/bookmarks/Bookmarks.pluginspec.in src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in src/plugins/clangcodemodel/clanghighlightingsupport.cpp src/plugins/clangcodemodel/clangsymbolsearcher.cpp src/plugins/classview/ClassView.pluginspec.in src/plugins/clearcase/ClearCase.pluginspec.in src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp src/plugins/cmakeprojectmanager/cmakehighlighter.cpp src/plugins/coreplugin/Core.pluginspec.in src/plugins/cpaster/CodePaster.pluginspec.in src/plugins/cppeditor/CppEditor.pluginspec.in src/plugins/cppeditor/cppfilewizard.cpp src/plugins/cpptools/CppTools.pluginspec.in src/plugins/cpptools/cpphighlightingsupportinternal.cpp src/plugins/cpptools/cppmodelmanagerinterface.cpp src/plugins/cpptools/cppmodelmanagerinterface.h src/plugins/cvs/CVS.pluginspec.in src/plugins/debugger/Debugger.pluginspec.in src/plugins/designer/Designer.pluginspec.in src/plugins/diffeditor/DiffEditor.pluginspec.in src/plugins/emacskeys/EmacsKeys.pluginspec.in src/plugins/fakevim/FakeVim.pluginspec.in src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in src/plugins/git/Git.pluginspec.in src/plugins/git/gitorious/gitorious.cpp src/plugins/git/gitorious/gitorious.h src/plugins/git/gitorious/gitoriousclonewizard.cpp src/plugins/git/gitorious/gitorioushostwidget.cpp src/plugins/git/gitorious/gitorioushostwidget.h src/plugins/git/gitorious/gitorioushostwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwidget.cpp src/plugins/git/gitorious/gitoriousprojectwidget.h src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwizardpage.h src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp src/plugins/git/gitorious/gitoriousrepositorywizardpage.h src/plugins/glsleditor/GLSLEditor.pluginspec.in src/plugins/glsleditor/glsleditorfactory.cpp src/plugins/glsleditor/glslfilewizard.cpp src/plugins/helloworld/HelloWorld.pluginspec.in src/plugins/help/Help.pluginspec.in src/plugins/imageviewer/ImageViewer.pluginspec.in src/plugins/ios/Ios.pluginspec.in src/plugins/macros/Macros.pluginspec.in src/plugins/mercurial/Mercurial.pluginspec.in src/plugins/perforce/Perforce.pluginspec.in src/plugins/projectexplorer/ProjectExplorer.pluginspec.in src/plugins/pythoneditor/PythonEditor.pluginspec.in src/plugins/pythoneditor/pythoneditorwidget.cpp src/plugins/pythoneditor/wizard/pythonfilewizard.cpp src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in src/plugins/qmakeprojectmanager/profileeditorfactory.cpp src/plugins/qmldesigner/QmlDesigner.pluginspec.in src/plugins/qmljseditor/QmlJSEditor.pluginspec.in src/plugins/qmljseditor/qmljseditorfactory.cpp src/plugins/qmljstools/QmlJSTools.pluginspec.in src/plugins/qmlprofiler/QmlProfiler.pluginspec.in src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in src/plugins/qnx/Qnx.pluginspec.in src/plugins/qtsupport/QtSupport.pluginspec.in src/plugins/remotelinux/RemoteLinux.pluginspec.in src/plugins/resourceeditor/ResourceEditor.pluginspec.in src/plugins/resourceeditor/resourcewizard.h src/plugins/subversion/Subversion.pluginspec.in src/plugins/tasklist/TaskList.pluginspec.in src/plugins/texteditor/TextEditor.pluginspec.in src/plugins/texteditor/basetexteditor_p.h src/plugins/texteditor/basetextmark.cpp src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h src/plugins/texteditor/codeassist/defaultassistinterface.h src/plugins/texteditor/codeassist/iassistproposalitem.cpp src/plugins/texteditor/itexteditor.cpp src/plugins/texteditor/itexteditor.h src/plugins/texteditor/itextmark.cpp src/plugins/texteditor/plaintexteditor.cpp src/plugins/texteditor/plaintexteditor.h src/plugins/texteditor/texteditoractionhandler.cpp src/plugins/todo/Todo.pluginspec.in src/plugins/updateinfo/UpdateInfo.pluginspec.in src/plugins/valgrind/Valgrind.pluginspec.in src/plugins/vcsbase/VcsBase.pluginspec.in src/plugins/welcome/Welcome.pluginspec.in src/plugins/winrt/WinRt.pluginspec.in tests/auto/debugger/temporarydir.h Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
| * License updateEike Ziller2014-10-091-7/+8
| | | | | | | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | TextEditor: Rename BaseTextEditorWidget to TextEditorWidgethjk2014-09-291-1/+1
| | | | | | | | | | | | | | ... and some of the related implementation details Change-Id: I1f03aa5acf2d3fb2cfc2a6a7845f3d3578b0408d Reviewed-by: David Schulz <david.schulz@digia.com>
* | TextEditor: More BaseText* -> Text* renamingshjk2014-09-261-1/+1
| | | | | | | | | | | | | | *Document* and *Layout* classes, all basetext* files Change-Id: I1c6e376733a434fcb5c7f19c6210dfa031eeafde Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | Rename {Core,TextEditor},{Base,}TextDocument classeshjk2014-09-251-1/+1
| | | | | | | | | | | | | | | | | | First step of some more 'Base' removal in TextEditor. s/Core::TextDocument/Core::BaseTextDocument/ s/TextEditor::BaseTextDocument/TextEditor::TextDocument/ Change-Id: I71ba325a2f0ad72ec9dae0d96846cbae72d326f7 Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Reset mimetype after open() in all BaseTextEditorshjk2014-09-041-30/+0
| | | | | | | | | | | | | | | | This was already done in all major editors and should not harm all others. Change-Id: I7e19d285c4b85419a9a1f9afa961addecf682eaf Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | TextEditor: Flip default to 'duplicatedSupported'hjk2014-09-031-1/+0
| | | | | | | | | | | | | | opt-out now, for all editors created by BaseTextEditorFactories. Change-Id: I01d0a9ff26320fcd0b84ff90ff22c747cf84b84c Reviewed-by: hjk <hjk121@nokiamail.com>
* | Editors: Automatically add editor/document id to context and use thatEike Ziller2014-09-021-1/+0
| | | | | | | | | | | | | | instead of manually adding a context everywhere. Change-Id: I4336015a6d19349171a255e949da89b0013d6700 Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Move comment definitions back to *Widgethjk2014-09-021-1/+1
| | | | | | | | | | | | | | Only used there, and avoids back-links to editors. Change-Id: I81206057ce89d42aef7febb840cf9e44b869df0e Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Remove some *Widget::createEditor implementationhjk2014-08-281-7/+2
| | | | | | | | | | | | | | | | This removes the ones that were not to be used anymore. The fallback in the base class is left in for now. Change-Id: I5e7ab16497a83eff9b11deb9e1feb390757eac0e Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | Python: Make editor factory use new BaseEditorFactoryhjk2014-08-221-46/+38
| | | | | | | | | | Change-Id: I6ec02161d5248592ff13eb1cdfcaae0bf2090d6d Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | PythonEditor: Convert to new editor setup schemehjk2014-08-201-14/+71
| | | | | | | | | | Change-Id: Ibf886c891bb1884d6bc3c08bfe83c4978d17b2f6 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Centralize settings connections setuphjk2014-08-201-2/+0
| | | | | | | | | | | | | | | | All editors did that manually, with varying approaches. Connect once when the document is made known to the EditorWidget instead. Change-Id: Ib0828b08158539859f6f89c8080435a027aa06ed Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Further *Editor/*EditorWidget disentanglinghjk2014-08-191-2/+1
| | | | | | | | | | | | | | | | In most cases, the *Editor constructor does not need to access the *EditorWidget. Change-Id: I1f5c076a0f723d5d82b398e8c250c7bd1d47eb17 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Merge the two sets of *EditorWidget constructorshjk2014-08-191-1/+1
| | | | | | | | | | Change-Id: I45d87d0be722ac36d64af222f03f8cb76242c9df Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Consolidate document access functions.hjk2014-08-041-1/+1
| | | | | | | | | | | | | | | | There was document(), textDocument() and baseTextDocument(). Two should be enough... Change-Id: Id9e41c8d857c5cb3269a9fce5ab594d34448c982 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* | Editors: Some renamings to enhance consistencyhjk2014-07-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The base pattern is FooEditor for BaseTextEditor derived classes and FooEditorWidget for BaseTextEditorWidget derived classes. So: CPPEditorWidget -> CppEditorWidget CPPEditorWidgetPrivate -> CppEditorWidgetPrivate ...::EditorWidget -> PythonEditorWidget GLSLTextEditorWidget -> GlslEditorWidget GLSLEditorEditable -> GlslEditor Change-Id: I76d34a3694c2fb35491982d86e83f7e4774c0be6 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Re-work comment definition handlinghjk2014-07-311-4/+1
|/ | | | | | | | No need for most of the machinery. Change-Id: I9078174582d83da94c6c7f20282fd3a5f1742911 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* IEditor: Make duplicatesSupported a value memberhjk2014-05-211-0/+1
| | | | | Change-Id: Iee75dd4155d5074bb319df79d006b6d5e2989e14 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Editors: Move id() from editor to document.Eike Ziller2014-03-051-1/+0
| | | | | | Change-Id: Ib81076842ab1c16832224790194b001206404d64 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Core: Make IEditor::id a value member and adjust usershjk2014-02-251-8/+1
| | | | | | Change-Id: I47e457c4a1821c515cd8a740d27bfe005a0c09e6 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* BaseTextEditor: Remove some unnecessary indirections through widgetEike Ziller2014-01-141-1/+1
| | | | | Change-Id: I4f71448d6788a4e553b1495b72263a004e65d8c0 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* TextEditors: Avoid changing document after construction.Eike Ziller2014-01-101-3/+1
| | | | | | | | | | | Also when duplicating editors, we don't want to change the document after construction. Actually at some places (e.g. CppEditorSupport creation) we don't handle document changes correctly, and we are only lucky that things still (more or less?) work. Get rid of BaseTextEditorWidget::duplicateFrom and use copy-constructor style instead. Change-Id: I7f688b7fcc51d1bb5e222bb333f0d28479b597a6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Editors: Remove useless parent widget argument from create/duplicateEike Ziller2014-01-081-2/+2
| | | | | | | It was never called with a sensible value anyhow, and only complicates things. Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Remove the need to register editors in the action handlerEike Ziller2013-12-121-1/+1
|/ | | | | | | | | | | The action handler already knows which editors to handle through the context. It only needs to receive signals for updating the actions from the current editor. So there is no need to tell the action handler about every individual editor. This also removes some noise from the text editor implementations. Change-Id: I76dc5b1559cc8cf54ff313e6cdba4e789a3108aa Reviewed-by: David Schulz <david.schulz@digia.com>
* Apply 'static' pattern to MimeDatabasehjk2013-09-031-9/+2
| | | | | | | | Also adjust and streamline using and surrounding code. Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Python: Do not export symbolsTobias Hunger2013-08-261-0/+2
| | | | | | | Nothing depends on this plugin, so these exports are not needed. Change-Id: I7a6c1c6fd1dd355c904d2dcb6d3f0522cf30adcd Reviewed-by: hjk <hjk121@nokiamail.com>
* Editors: No need to re-implement functions identical to basehjk2013-05-271-5/+0
| | | | | Change-Id: Ibdd3147cc2a64407802fa237b7943d2e96c9003b Reviewed-by: David Schulz <david.schulz@digia.com>
* Fix Krazy warnings about includes/header guards in Python Editor.Friedemann Kleint2013-03-121-1/+1
| | | | | Change-Id: I3dce1d8f14d4bfc271d8873eb3ad819eb336e2df Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Added PythonEditor pluginSergey Shambir2013-02-071-0/+98
Contains lexical highlighter, indenter and file wizard. Icon loaded from theme, if possible. Class wizard will be added later since it needs to extend libUtils. Change-Id: If723867c01e9be83371424e406d116805c88c2b0 Reviewed-by: hjk <hjk121@nokiamail.com>