summaryrefslogtreecommitdiff
path: root/src/plugins/python
Commit message (Collapse)AuthorAgeFilesLines
* Python: remove reference to out of scope variableDavid Schulz2019-11-041-1/+1
| | | | | Change-Id: Idd4dbab5ee01fda331452fefd27de71625afa5af Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Python: cache the module path for executableDavid Schulz2019-11-041-3/+11
| | | | | | | | This reduces ui freezes when switching the interpreter for a python project. Change-Id: Iaa8ce8ed8d51666f8696eb96f504aaf8c4a11822 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Check for changes before applyingChristian Stenger2019-10-302-0/+9
| | | | | | | | | Storing the python settings seems to be rather costly and may take some time. Perform an early return if nothing has changed. Change-Id: I509e83f503d2af31a7464df893e0e4e69e99a277 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: detect virtual environments for documents and projectsDavid Schulz2019-10-304-6/+79
| | | | | | | | | | | | | After opening a document or project the directory hierarchy is looked up for a Scripts/(activate && python.exe) on windows or bin/(activate && python) on unix. This is the usual structure of python virtual environments. If such a folder is found add the python from that folder to the list of configured interpreters in the settings, set it as the current interpreter for the project and try to open the corresponding language server. Change-Id: I038c309ea2988f9370194330d250d1515beac0a0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Fix UI textLeena Miettinen2019-10-291-4/+4
| | | | | | | Change-Id: Ia3fa732d9ed6bb880ea7721712093fbe8faa27bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: export Interpreter generatorDavid Schulz2019-10-252-11/+23
| | | | | Change-Id: I591bd6c14706e1699f028a9a3a6dfd9b89eec66a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: install python language server with --userDavid Schulz2019-10-251-1/+1
| | | | | Change-Id: Ifd8e19ea7d52d85ec0c497e5cbfe24300571398e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: close all info bars after language server setupDavid Schulz2019-10-256-81/+133
| | | | | Change-Id: I607f7cb5a31f3db0c7d7d77011860a1ea87eb8d2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Fix opening document in wrong pylsDavid Schulz2019-10-181-2/+9
| | | | | | | | The document was always opened in the first of the configured python language servers. Change-Id: If33cb4a08884b93047016be1d8cf5c27ea7950d9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Add info bar entry to enable pylsDavid Schulz2019-10-181-5/+41
| | | | | | | | Show an editor info bar entry displaying that the language server for the current python is disabled and a button to quickly enable the pyls. Change-Id: I3adb2e7cbfb1a32e35413b0b06dfbe66a0b214af Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Switch pyls on interpreter changeDavid Schulz2019-10-188-314/+444
| | | | | Change-Id: I458b635986a55003a1e7254e27e2df9667704273 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Add virtual env name to auto detected interpretersDavid Schulz2019-10-021-0/+3
| | | | | Change-Id: Ia4d2e5399aa983b6bca510ca8b0e6848da5f769a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Python: remove unused static stringDavid Schulz2019-10-021-1/+0
| | | | | Change-Id: I4357157d98f039c654b16de4e469c18c32bbb0ed Reviewed-by: hjk <hjk@qt.io>
* Python: add task for pyls installationDavid Schulz2019-09-301-9/+26
| | | | | Change-Id: I0a85a3ae9fe4e8b327b3b90732556bf940215b7a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: make pyls install kill timer a memberDavid Schulz2019-09-301-4/+3
| | | | | Change-Id: I62515673ef65e87b2f23345aa52a22a86a2be763 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Add info bar to install python language serverDavid Schulz2019-09-301-3/+104
| | | | | | | | | If the detected python for the current document does not have an installed language server, check whether pip is installed, try to install the language server and if that was successful set it up. Change-Id: Ib6cf3bacdcf3489728990cace5417862b7c78be5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Check for Python language server after document was openedDavid Schulz2019-09-265-15/+218
| | | | | | | | | Show an info bar entry with a one click solution to setup a language server if the python which is most likely to be used for this file has an installed language server. Change-Id: Ia52bb043b543699527740951f68cc6be546833df Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Remove unused functionChristian Stenger2019-09-172-11/+0
| | | | | Change-Id: If464646dfad66a1afabb9b5b9c6366a35597f370 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: extract PythonRunConfiguration and PythonProjectDavid Schulz2019-09-178-785/+956
| | | | | Change-Id: I4ff0f43fdb8beb9a7f2f7816197de0c796da8d89 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Simplify code based on Project::projectFileIsDirty signalTobias Hunger2019-08-161-2/+4
| | | | | Change-Id: Ife19edf47b903080c073ffef844074be48b65b23 Reviewed-by: hjk <hjk@qt.io>
* Utils/all: Create an OutputFormatterFactoryhjk2019-08-131-2/+16
| | | | | | | | | | | Essentially following the scheme used for the various project configurations. This makes it possible to construct OutputFormatters by Id only, potentially reducing hard plugin dependencies and opening the road to have several output formatters per RunConfiguration/Outputpane/... Change-Id: I4b5fb6fb6be8b0d9a0859f178bb0effc3398b09e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: De-virtualize some more virtual methodsTobias Hunger2019-08-131-1/+2
| | | | | | | | | Use setters/getters for the bool flags in Project::needsBuildConfigurations() and Project::hasMakeInstallEquivalent. Change-Id: I5ce937c3a5e8e0db627cda02a9007f8c28ccda0c Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-08-123-3/+1
| | | | | | | Conflicts: src/plugins/python/CMakeLists.txt Change-Id: I18808710dd99b97d4e1e7c3d223b7f814083de31
* ProjectExplorer: Use RAII pattern for parsing start/stop signallingTobias Hunger2019-08-091-2/+2
| | | | | Change-Id: I13de537140f265db3e3d0ab1cd924d6897cd90c8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Re-work setup runworker factorieshjk2019-08-091-1/+5
| | | | | | | | | | | | | | | This combines two of the previous three paths to create run workers, and refers to RunConfigurations by id, not by type where possible to decrease coupling between the classes. Only allow "type of run configuration" and "type of device" as the only possible kind of restriction and require a uniform RunWorker constructor signature. Adapt user code to fit that pattern. Change-Id: I5a6d49c9a144785fd0235d7586f244b56f67b366 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Add convenience Project::addTargetFor{Default,}Kithjk2019-08-011-4/+2
| | | | | | | Less noise on the user side. Change-Id: I5cdf4af4910a3cc1ee0af1b43fcbc7329a6d59db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Python: Fix compile for gcc < 6.0Christian Stenger2019-07-301-1/+1
| | | | | Change-Id: Ia7ef177677a65aa565755313ee9d023aa8e53ef0 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: make interpreter configurableDavid Schulz2019-07-3010-16/+677
| | | | | | | | | Add settings page to setup python interpreter and use a combo box in the run configuration to switch between those configured interpreter. Change-Id: I51014b785ea822ee138d39c788149f1d22901e55 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Add CommandLine convenience constructorshjk2019-07-231-1/+1
| | | | | | | | | | | | | ... taking a QString for the executable. This weakens the very explicit QString -> FileName conversion via the named constructors for the special case of constructing a CommandLine. I think that's worthwhile here, as it reduces the noise on the caller site under circumstance where the nature of the thing is obvious. Change-Id: I27b4a73639728893d053b2e7ba65cb745f0ffe83 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* rename PythonEditor plugin to PythonDavid Schulz2019-07-1717-0/+2043
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>