Commit Graph
18970 Commits
Author SHA1 Message Date
Mikhail Golubev d8b871aec1 PY-24607 PY-24602 Add tests on other older problems with Change Signature
All these issues have been resolved in the new version of
PyChangeSignatureUsageProcessor
2017-06-08 14:55:12 +03:00
Mikhail Golubev 59696e2c5f PY-16683 Improve handling of exising calls in Change Signature
Now we use the same PyCallExpressionHelper methods to match arguments
and parameters in existing calls when we're processing them.
Previously it was done using completely independent algorithm that
iterated through arguments sequentially keeping track of the last
visited argument and couldn't handle a lot of cases.

This change also fixes issues PY-24288 PY-24480 PY-24479.
2017-06-08 14:52:34 +03:00
Dmitry Trofimov 538f7d9373 Add more synonyms to the Python project interpreter (PY-24580) 2017-06-08 12:20:30 +02:00
Valentina Kiryushkina 00d44b070b PY-24610 Exception because of Invalid TextRange in format string: use PyStringLiteralExpression#getText() instead of PyStringLiteralExpression#getStringValue() 2017-06-07 19:58:25 +03:00
Ilya.Kazakevich e278331f6a PY-24423: Defer django import to prevent AppNotReady exception
Can't touch any Django code before django.setup() finished
2017-06-07 18:51:15 +03:00
Elizaveta Shashkova 45f2f8e843 Add ability to wait for result while executing commands in debugger (PY-23834) 2017-06-07 18:50:35 +03:00
Valentina Kiryushkina ba7097379a EDU-971 Fix NPE: do not try to get task text if we're not in tool window mode 2017-06-07 18:47:39 +03:00
Dmitry Trofimov 6105636659 Add "Python interpreter" as a synonym for the "Project interpreter" setting page 2017-06-06 18:51:56 +02:00
Elizaveta Shashkova 7e2e6a2f03 Fix adding break after removing (PY-24026) 2017-06-06 18:51:55 +03:00
Elizaveta Shashkova 47774e6489 Update windows binaries (PY-24026) 2017-06-06 18:51:55 +03:00
Elizaveta Shashkova 4afbea7349 Update pydev version (PY-24026) 2017-06-06 18:51:54 +03:00
Elizaveta Shashkova 915d1c37ad Fixes after review (PY-24026)
Enable frame evaluation debugging back after stepping and disable it if exception breakpoints were added. It also contains some renames and extracting of code for breakpoints handling.
2017-06-06 18:51:53 +03:00
Elizaveta Shashkova d295ee6269 Add name for importing in Windows (PY-24026) 2017-06-06 18:51:52 +03:00
Elizaveta Shashkova 997b063100 Update Windows binaries (PY-24026) 2017-06-06 18:51:52 +03:00
Elizaveta Shashkova 05e9a7dd81 Fix tests for checking adding breakpoint while running (PY-24026) 2017-06-06 18:51:51 +03:00
Elizaveta Shashkova abfca5af46 Fix adding breakpoints during run by setting a dummy tracing function (PY-24026) 2017-06-06 18:51:50 +03:00
Ilya.Kazakevich 10c38d0c49 PY-24300: Remove explicit locking in favor to concurrent map to simplify code and prevent deadlock
Calling ``myProvider.fun()`` inside of synchronized section may lead to deadlock, and since splitting section to two separate sections complicates code it is better to get rid of lock and use concurrent map.

It is now possible for two threads to do the same work, but even with explicit locking second thread would still have to wait
2017-06-06 17:53:44 +03:00
Ekaterina Tuzova 66ffd15c1c javafx switcher available on welcome screen. 2017-06-06 12:14:36 +03:00
Liana.Bakradze f5d4c81dfc EDU-970 Unreadable text in Add/Edit Answer placeholder dialog window 2017-06-06 12:12:28 +03:00
Mikhail Golubev 33f424edc7 PY-8174 Suggests better names for new parameters in the quickfix
using NameSuggestionUtil#generateNames() and text of the main reference
expression in argument as a template. Only if no meaningful names were
found this way, it falls back to names generated from expression types.
2017-06-05 21:22:39 +03:00
Mikhail Golubev cf0c247416 PY-8174 Make PyChangeSignatureQuickFix constructor private 2017-06-05 21:20:45 +03:00
Mikhail Golubev f303faa967 PY-8174 Add a test on keyword only parameters in Python 3
The test on parameter names also checks the case when union type was
inferred for an argument.
2017-06-05 21:20:45 +03:00
Mikhail Golubev 0a575d9531 PY-8174 Consistent naming of test cases and full quickfix names in them 2017-06-05 21:20:45 +03:00
Mikhail Golubev ef60722aea PY-8174 Always use actual arguments as default values for new parameters
even if names referenced in them are not available at the places of
some usages and the definition. It's user responsibility to review them
and ensure that refactoring won't cause any errors. This approach
follows the one used for Java.
2017-06-05 21:20:45 +03:00
Mikhail Golubev fc59d948bf PY-8174 New parameters names are unique if arguments have the same type
Incrementally increasing numbers are appended to the names derived from
the types of the corresponding arguments to make them sufficiently
different.
2017-06-05 21:20:45 +03:00
Mikhail Golubev 9eca5367bd PY-8174 Don't change the original call in change signature
It doesn't make much sense to modifying the call expression as
the result of refactoring which sole purpose was to match the definition
and the rest of the usages with this very expression.
2017-06-05 21:20:45 +03:00
Mikhail Golubev 05e9418a47 PY-8174 Include the new warning, the quickfix is bound to, in the test data 2017-06-05 21:20:45 +03:00
Mikhail Golubev d8a1f8fd86 PY-8174 Use provided arguments as default values for new parameters 2017-06-05 21:20:45 +03:00
Mikhail Golubev 05a195ba23 PY-8174 Fix several code style issues and warnings in the dialog
Method doValidate() is already indented to be called of EDT, so
additional invokeLater() is not necessary.
2017-06-05 21:20:45 +03:00
Mikhail Golubev 9af15aabf1 PY-19010 Properly focus on the checkbox "Use default value in signature" on Tab
It did work for Tab already, yet not for Shift+Tab when the focus was
switching between "Name" and "Default value" fields.
2017-06-05 21:20:45 +03:00
Mikhail Golubev 61797297a0 PY-24150 Fix scaling by using EditorTextFieldJBTableRowRendered in the dialog
Also provided straightforward implementation ParametersListTable and
thus got rid of deprecated methods.
2017-06-05 21:20:45 +03:00
Mikhail Golubev e1df07d382 PY-8174 Focus on the first new parameter in the dialog 2017-06-05 21:20:45 +03:00
Mikhail Golubev 58d6406e07 PY-24149 Focus on the first function parameter by default in Change Signature dialog 2017-06-05 21:20:45 +03:00
Mikhail Golubev b05653ccc8 PY-8174 Don't show the quickfix where Change Signature is not possible
Mostly, because we strictly prohibit changing signatures of functions
in excluded directories and in library roots outside of the project root
even if they can be made writable as in case with a common virtual env
directory in user's home.
2017-06-05 21:20:45 +03:00
Mikhail Golubev 7837c5a19d PY-8174 Check that the file containing the function to be changed is writable 2017-06-05 21:20:45 +03:00
Mikhail Golubev fcd8262c10 PY-8174 Initial version of the quickfix 2017-06-05 21:20:45 +03:00
Mikhail Golubev 48a0d643e2 PY-8174 Refactor PyChangeSignatureQuickfix to allow passing extra parameters 2017-06-05 21:20:45 +03:00
Mikhail Golubev 0ad3340f78 PY-8174 Cleanup in PyInitNewSignatureInspection: reformat + TypeEvalContext 2017-06-05 21:20:45 +03:00
Semyon Proshev 4c8d424207 PY-7322 Fixed: namedtuple types are not detected with reST :type :
Pass `TypeEvalContext` to `PyTypeParser.getTypeByName` and `PyTypeParser.parse`.
This allows to infer named tuple type from doc string when file was unstubbed.
2017-06-05 20:42:44 +03:00
Semyon Proshev e953f46acd Don't analyze calls to typing.NamedTuple while inferring call type in PyCallExpressionHelper.
They will be processed in `PyStdlibTypeProvider.getReferenceType`.
2017-06-05 20:41:07 +03:00
Semyon Proshev b8ad73fbb9 PY-18246 Fixed: No completion for typing.NamedTuple
Support typing.NamedTuple in namedtuple stubs.
2017-06-05 20:37:02 +03:00
Semyon Proshev de1a945186 Get rid of primitive definition level in PyNamedTupleType and use enum instead. 2017-06-05 20:36:44 +03:00
Semyon Proshev 8f4d31d439 PY-23311 Fixed: Postgres Create Extension doesn't get syntax highlighting
Add PostgreSQL extensions support.
2017-06-05 20:29:40 +03:00
Liana.Bakradze 32708887c4 inline function (PY-21763) 2017-06-05 18:29:35 +03:00
Liana.Bakradze d2848fbcfc use immutable collections (PY-21763) 2017-06-05 18:29:35 +03:00
Liana.Bakradze b12fa91e40 add env test for series (PY-21763) 2017-06-05 18:29:35 +03:00
Liana.Bakradze d954222265 code cleanup (PY-21763) 2017-06-05 18:29:35 +03:00
Liana.Bakradze b2ea29fcfa incorrect name (PY-21763) 2017-06-05 18:29:35 +03:00
Liana.Bakradze 5cc4d2d3fe do not show column header for series (PY-21763)
Series are 1-dimensional array, so column header is useless for them
2017-06-05 18:29:35 +03:00
Liana.Bakradze ced6560dcd merge helpers (PY-21763) 2017-06-05 18:29:35 +03:00