Commit Graph

12446 Commits

Author SHA1 Message Date
Ilya Chernikov 4d5b96ab8a Change error loading script template to warning - not to show an exception...
because it is not an exception e.g. in case of using old gradle
2016-08-11 09:11:11 +02:00
Ilya Chernikov ce6966b486 Add settings to compiler to specify templates to load, add templates provider using the settings 2016-08-11 09:08:40 +02:00
Ilya Chernikov c9441bd7b3 Update template(s) provider interface to support multiple templates, rename it appropriately 2016-08-11 09:08:40 +02:00
Ilya Gorbunov 738219d53e Make Map.toSortedMap accept Map out-projected by key type as the receiver.
Update related completion testData.
2016-08-10 21:52:24 +03:00
Dmitry Jemerov f08a7f14e0 workaround for IDEA's issue that throws an exception when using union() on a LocalSearchScope with no elements (EA-82063 - AIOOBE: GlobalSearchScope.union) 2016-08-10 13:26:13 +02:00
Dmitry Jemerov 180f70b573 don't use document for checking whether a folding region is one-line, use only PSI, as it may not correspond to the state of the document (EA-81838 - IOOBE: LineSet.findLineIndex) 2016-08-10 13:26:13 +02:00
Dmitry Jemerov a4aa3cdf57 don't crash if we don't have a descriptor for the declaration under caret (EA-86248 - KNPE: KDocNameCompletionSession.doComplete) 2016-08-10 13:26:13 +02:00
Dmitry Jemerov ddb91cc0d9 correct fix for showing dialog from popup callback (EA-86138) 2016-08-10 13:26:13 +02:00
Dmitry Jemerov 5c113a4237 correct fix for invoking 'safe delete' refactoring outside of write action (EA-80766 - E: BaseRefactoringProcessor.run) 2016-08-10 13:26:13 +02:00
Dmitry Jemerov 5d92f655f7 one more missing read action in Find Usages (EA-81276 - assert: SharedImplUtil.getParent) 2016-08-10 13:26:13 +02:00
Dmitry Jemerov f9d3804111 check element validity in KotlinSelectInProjectViewProvider (EA-84485 - PIEAE: OwnBufferLeafPsiElement.getContainingFile) 2016-08-10 13:26:13 +02:00
Dmitry Jemerov 8632790446 don't check intention availability on PsiFile (EA-85587 - assert: SharedPsiElementImplUtil.getChildIndex) 2016-08-10 13:26:13 +02:00
Alexey Sedunov 2b44335c27 Presentation: Render valid description for type aliases 2016-08-10 11:45:41 +03:00
Alexey Sedunov 3475a1fd1f Introduce Property: Fix duplicate count in popup window
#KT-13395 Fixed
2016-08-10 11:45:41 +03:00
Alexey Sedunov 4ab25bd0bb Move: Quote package name (if necessary) when moving declarations to new file
#KT-13385 Fixed
2016-08-10 11:45:39 +03:00
Alexey Sedunov b793252a5f Extract Function: Skip callable reference selectors
#KT-13218 Fixed
2016-08-10 11:45:38 +03:00
Alexey Sedunov 6e3d1d726e Create from Usage: Do not suggest creating annotations/enum classes for unresolved type parameter bounds
#KT-13364 Fixed
2016-08-10 11:45:37 +03:00
Alexey Sedunov 1b546d18ff Override/Implement Members: Do not expand type aliases in the generated members. Retain abbreviated types during flexible type approximation
#KT-13244 Fixed
2016-08-10 11:45:36 +03:00
Alexey Sedunov 1a4ff598e3 Override/Implement Members: Do not make return type non-nullable if base
return type is explicitly nullable
 #KT-13383 Fixed
 #KT-13379 Fixed
2016-08-10 11:45:35 +03:00
Alexey Sedunov 75573bd6a5 Quick Fixes: Use simple class name in "Change function return type" quickfix
#KT-12919 Fixed
2016-08-10 11:45:35 +03:00
Alexey Sedunov f57c9279f9 Override/Implement Members: Support "Copy JavaDoc" options for library classes
#KT-12997 Fixed
2016-08-10 11:45:34 +03:00
Alexey Sedunov 8a9a3285de Introduce Variable: Skip leading/trailing comments inside selection
#KT-13054 Fixed
2016-08-10 11:45:33 +03:00
Alexey Sedunov 00b6839e59 Introduce Variable: Retain entered name after changing "Specify type explicitly" option
#KT-13128 Fixed
2016-08-10 11:45:32 +03:00
Alexey Sedunov 792177f206 Extract Function: Extract Function: Fix generation of destructuring declarations
#KT-13010 Fixed
2016-08-10 11:45:31 +03:00
Alexey Sedunov 06e767279b Extract Function/Parameter/Type Alias: Automatically quote declaration name when necessary
#KT-13157 Fixed
2016-08-10 11:45:30 +03:00
Alexey Sedunov 59a714ca5c Presentation: Render function signature in RefactoringDescriptionLocation
#KT-12943 Fixed
2016-08-10 11:45:29 +03:00
Alexey Sedunov 892c8436f3 Introduce Variable: Do not suggest expressions without type
#KT-12922 Fixed
2016-08-10 11:45:28 +03:00
Alexey Sedunov 3cd35f8a3b Rename: Fix function description in super method warning dialog
#KT-12945 Fixed
2016-08-10 11:45:27 +03:00
Mikhail Glukhikh 729de536de Rewrite slice error removed for LEAKING_THIS #KT-13371 Fixed
Also EA-86478 fixed
(cherry picked from commit 5ac3126)
2016-08-09 10:28:40 +03:00
Valentin Kipyatkov 6ff91d1399 KT-12793 Code completion doesn't suggest abstract protected extension methods
#KT-12793 Fixed
2016-08-05 19:36:52 +03:00
Nikolay Krasko bc0d302760 Use nullable value and destroy it in tearDown for REPL tests 2016-08-05 16:46:22 +03:00
Nikolay Krasko 300e0acd27 Report RETURN_NOT_ALLOWED and RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY only on the return with label (KT-13340)
#KT-13340 Fixed
2016-08-05 13:16:05 +03:00
Natalia Ukhorskaya 7087f10660 Fixes after review: get last statement in codeFragmetn using psi instead of findElementAt 2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya ed204e9bac Minor: extract similar parts to separate function 2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya 6a04cd39b2 Debugger: allow to evaluate kotlin expressions in java files
#KT-7549 Fixed

 If the context is inside PsiJavaFile, get list of all local variables available in current frame (this logic was removed in 29778311e8 01.12.2015 Drop unnecesary logic about additional context for lambda in debugger). For each variable create KtProperty inside top-level KtFunction in KtFile and set it as contextElement for KtCodeFragment. This file should have all imports from PsiJavaFile. We do not create properties on top-level because they will be highlighted as top-level vals/vars.
2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya d823d6f4ab Debugger tests: mark objects using NodeDescriptorImpl.getMarkup. Primitive values cannot be marked. 2016-08-03 17:51:49 +03:00
Pavel V. Talanov 30892e0154 KtLightClassForDecompiledDeclaration is now marked by KtLightClassMarker
Rename: KtJavaMirrorMarker -> KtLightClassMarker
Introduce code to be able to tell light classes from source and binaries apart in 'frontend.java'
2016-08-03 17:29:06 +03:00
Ilya Chernikov 1248230c69 Fix after review, add logging for scripting-specific behavior 2016-08-03 09:51:40 +02:00
Pavel V. Talanov fbc5d64aab gradleScriptTemplateProvider: fix NPE 2016-08-03 09:51:40 +02:00
Ilya Chernikov 80f7dda6c7 Update gradle script resolver environment:
- JVM options from IDEA config to connect/run daemon with appropriate options (need to be tested)
- A lexing function to allow gradle plugin to check whether dependency-defining part of the script is actually changed
2016-08-03 09:51:40 +02:00
Pavel V. Talanov 464445c260 KotlinCacheServiceImpl: Add all sdks from project sdk table when building facadeForSdk
As of now facadeForSdk should contain all sdks that we can possibly reference while resolving including those that scripts depend on
More granular approach may be beneficial in the future
2016-08-03 09:51:40 +02:00
Pavel V. Talanov bc0ccd4861 Refactor: move script module info related code to a separate file 2016-08-03 09:51:40 +02:00
Pavel V. Talanov a8416035b1 IDE Script support: use particular scripts dependencies when building analyzers
Use javaHome property to detect jdk to analyze script files against, use default jdk if it's null
2016-08-03 09:51:40 +02:00
Pavel V. Talanov 350abbe8cd KotlinScriptConfigurationManager, minor: Extract utility to get transform list of file to vfs roots 2016-08-03 09:51:40 +02:00
Pavel V. Talanov 500554e58c Clarify API so that it's possible to get single KotlinScriptExternalDependencies per script file 2016-08-03 09:51:40 +02:00
shiraji 5fb79259f7 Intention / inspection for unnecessary lateinit #KT-13011 Fixed
(cherry picked from commit 45d82f1)
2016-08-03 09:31:03 +03:00
Mikhail Glukhikh d868410093 Single-expression string template is inspection for strings and intention otherwise #KT-13113 Fixed
(cherry picked from commit 266f9d0)
2016-08-02 15:31:16 +03:00
shiraji 9b8c55d823 KT-13113: Add inspection to detect single-expression string template
(cherry picked from squashed commits 49a3ef3 and 4c7a42a)
2016-08-02 15:30:23 +03:00
Nikolay Krasko a9ee10a8b7 Ignore intervals that has no mapping for origin line (KT-12896) 2016-08-02 01:05:08 +03:00
Nikolay Krasko 2dd7470cdc Better search for inlined strings in strata: there might me several file mappings to the same file (KT-12896)
#KT-12896 In Progress
2016-08-02 01:05:05 +03:00