Yan Zhulanow
a970de51ab
Debugger: Fix 182 bunch, add missing scratch extensions
2019-02-25 21:35:00 +03:00
Yan Zhulanow
55db2abd89
Debugger: Fix 191 bunch file, add new debugger extensions
2019-02-25 21:35:00 +03:00
Alexander Udalov
3f1533c35b
Restore support for local class literals in annotation arguments
...
This was broken in c1ab08c8ce where we started to represent KClassValue
as a ClassId of the referenced class + number of times it's been wrapped
into kotlin.Array. Local classes do not have a sane ClassId, so in this
change we restore the old behavior by representing KClassValue with a
sealed class value instead
#KT-29891 Fixed
2019-02-25 19:22:09 +01:00
Nikolay Krasko
6813402abf
Fix INRE from KotlinQuickDocumentationProvider (KT-30058, EA-137533)
...
Show a warning like CtrlMouseHandler does.
Fixed in 191 branch in CtrlMouseHandler.updateOnPsiChanges().
https://github.com/JetBrains/intellij-community/commit/b116dcaf994279d0f5fd78edd814013276c0adab
#KT-30058 Fixed
2019-02-25 17:43:57 +03:00
Anton Yalyshev
a326ba60a3
metadata contains Common target, so we need to track it as well
2019-02-25 16:26:12 +03:00
Max Medvedev
526e49d68a
fix test icons for methods
...
#KT-25956
2019-02-25 16:02:42 +03:00
Yan Zhulanow
133f021b26
Async stack traces: Fix compilation on IDEA 182 and older AS versions
2019-02-25 14:44:00 +03:00
Yan Zhulanow
cadb70f64a
Evaluator: Allow to evaluate expression on synthetic lines in .kt files
2019-02-25 14:44:00 +03:00
Yan Zhulanow
16266259f5
Evaluator: Handle function context gracefully. Use file scope as a fallback instead of error scope
2019-02-25 14:44:00 +03:00
Yan Zhulanow
5035de24ac
Code fragments: Use file scope as a fallback when a more specific one is not available
2019-02-25 14:44:00 +03:00
Yan Zhulanow
316dcccc30
Minor: Capitalize word "Kotlin" in error messages
2019-02-25 14:43:59 +03:00
Yan Zhulanow
28e4356e6e
Restore original variable name mangling for captured/receiver $this
...
Design for the new one is still not finished.
2019-02-25 14:43:59 +03:00
Yan Zhulanow
1edacbbb5e
Evaluator: Don't rely on moduleDescriptor presence in DebugLabel descriptor generation
...
The containing moduleDescriptor may not exist for the Java context.
2019-02-25 14:43:59 +03:00
Yan Zhulanow
632b9ac38c
Evaluator: Support 'field' variable evaluation for top-level properties
2019-02-25 14:43:59 +03:00
Yan Zhulanow
81f4e2fb3b
Evaluator: Support delegated local variables
2019-02-25 14:43:59 +03:00
Yan Zhulanow
77bec27c99
Evaluate parameter value instead of backing field in primary constructor
2019-02-25 14:43:59 +03:00
Yan Zhulanow
592083bc5b
Debugger: Support DebugLabel descriptors in completion
2019-02-25 14:43:58 +03:00
Yan Zhulanow
b9f76683dd
Simplify 'suppressDiagnosticsInDebugMode'
...
In the new evaluator, suppressDiagnosticsInDebugMode is never set, and effectively the only check is that if a particular file is a KtCodeFragment.
2019-02-25 14:43:58 +03:00
Yan Zhulanow
6cb2146d31
Remove 'allowSpecialClassNames' extraction option
2019-02-25 14:43:58 +03:00
Yan Zhulanow
11dfbd5d3d
Allow '$this$label$<somethingElse>' for extension receivers
...
Our mangling works poorly with nested inline function calls (saying, `apply()` inside an another `apply()`). In that case, the generated local variable name for both cases will be `$this$apply`. As the debugger sees only the last (the closest) variable with the same name, we loose the ability to get the first one.
This means we might want to add some additional information to the mangling (e.g. add the trailing indices `$this$apply$1`). This commit supports this case.
2019-02-25 14:43:58 +03:00
Yan Zhulanow
34b03c45d7
Add a test for escaped names supported in the new evaluator (KT-29661)
2019-02-25 14:43:58 +03:00
Yan Zhulanow
51b26325c6
Coroutine stack trace provider: check thread state before invokeMethod()
2019-02-25 14:43:58 +03:00
Yan Zhulanow
24cdd3f857
Remove 'debugTypeInfo' key
...
The key became obsolete as the new evaluator doesn't use it anymore.
2019-02-25 14:43:57 +03:00
Yan Zhulanow
6a81c2e1e4
Minor: Extract 'this' local variable name in DefaultImpls
2019-02-25 14:43:57 +03:00
Yan Zhulanow
65b6098242
Further refinements in variable displaying (Kotlin mode)
...
- Remove synthetic outer this for lambdas
- Recognize captured this for interface default methods
2019-02-25 14:43:57 +03:00
Yan Zhulanow
300c102c3f
Remove BeforeExtractFunctionInsertionTest, the new evaluator doesn't depend on the 'extract function' refactoring
2019-02-25 14:43:57 +03:00
Yan Zhulanow
0657a3d399
New evaluator that doesn't depend on the 'extract function' refactoring (KT-28192, KT-25220, KT-25222, KT-21650)
2019-02-25 14:43:57 +03:00
Yan Zhulanow
34c5954d75
Minor: Reformat evaluator code
2019-02-25 14:43:56 +03:00
Yan Zhulanow
d039e3b1c0
Hide synthetic variables for local functions and destructured lambda parameters (Kotlin variables)
2019-02-25 14:43:56 +03:00
Yan Zhulanow
ed88020a84
Minor: Reformat extraction engine files
2019-02-25 14:43:56 +03:00
Yan Zhulanow
488418d960
Change mangling for local functions
2019-02-25 14:43:56 +03:00
Yan Zhulanow
47f0b68a8c
Change mangling for destructured lambda parameters
2019-02-25 14:43:56 +03:00
Yan Zhulanow
d2c2a6c99f
Debugger: Support inline functions in Variables view
2019-02-25 14:43:55 +03:00
Yan Zhulanow
7fb8357b28
Allow '// PRINT_FRAME' option for multi-breakpoint stepping tests
2019-02-25 14:43:55 +03:00
Yan Zhulanow
16b94feea6
Minor: Remove an obsolete TODO comment
2019-02-25 14:43:55 +03:00
Yan Zhulanow
6cd980765c
Do not issue exceptions for non-captured local variables
...
This partly fixes KT-28192.
2019-02-25 14:43:55 +03:00
Yan Zhulanow
4ae01badff
Extract function: avoid same parameter names
2019-02-25 14:43:55 +03:00
Yan Zhulanow
7de5ddaac9
Fix receiver evaluation for primitive receiver types
2019-02-25 14:43:55 +03:00
Yan Zhulanow
f6cc686095
Minor: Extract a const for continuation variable name
2019-02-25 14:43:55 +03:00
Yan Zhulanow
cf9461847b
Hide unrelated this entries in Kotlin Watches mode
2019-02-25 14:43:54 +03:00
Yan Zhulanow
e5b0d2e34f
Refactoring: Extract list field search
2019-02-25 14:43:54 +03:00
Yan Zhulanow
c5061e7997
Replace 'visibleVariablesByName()' calls with a safe implementation
2019-02-25 14:43:54 +03:00
Yan Zhulanow
757fc421f7
Refactoring: Extract wrapping 'try' expressions
2019-02-25 14:43:54 +03:00
Yan Zhulanow
f5a3a46e76
Watches: Hide 'this' if it's a continuation
2019-02-25 14:43:54 +03:00
Yan Zhulanow
227a7e5609
Provide access to 'coroutineContext' inside suspend functions/lambdas (KT-24829)
2019-02-25 14:43:54 +03:00
Yan Zhulanow
cf925fc2ad
Activate Kotlin stack frame even if there is no Kotlin strata
2019-02-25 14:43:54 +03:00
Yan Zhulanow
f6b2e673f7
Debugger: Display async stack trace elements for suspend callers (KT-28728)
2019-02-25 14:43:53 +03:00
Yan Zhulanow
e8c066605b
Do not drop analysis results for the code fragment context, allow to re-use it
...
Otherwise labels declared in the expression context become unresolved.
This is needed for the `this@label` expression evaluation support (KT-28134).
2019-02-25 14:43:53 +03:00
Yan Zhulanow
4c681c787d
Watches: Add Kotlin/JVM views to watches window (KT-28134, KT-28087, KT-22250)
...
Kotlin mode: show only Kotlin variables and captured values. The variable names are Kotlin-friendly.
JVM mode: show all variables available in the current stack position, including synthetic ones.
2019-02-25 14:43:53 +03:00
Yan Zhulanow
5c419fc629
Evaluator: New implementation for variable finder
...
Support both old and new receiver variable conventions in variable finder.
2019-02-25 14:43:53 +03:00