Commit Graph

119 Commits

Author SHA1 Message Date
Natalia Selezneva e2b5134048 Allow to run scratch without module selected
^KT-23985 Fixed
2019-02-25 11:20:49 +03:00
Ilya Chernikov 29fa0f5dff Replace unnecessary direct usages of the LazyScriptDescriptor with ScriptDescriptor interface
lift result property to the interface to implement it
2019-02-21 15:59:48 +01:00
Ilya Chernikov d0e78b95c3 Introduce classpath for compiler with scripting in KotlinPaths, fix JSR-223 for Idea 2019-02-10 13:35:58 +01:00
Natalia Selezneva 85bd729715 Fix NPE starting IDE Repl Console
consoleView field is initialized in initAndRun inside invokeLaterIfNeeded call.
This may cause NPE in setupGutters if consoleView isn't initialized yet
^KT-29400 Fixed
2019-01-23 10:39:18 +03:00
Mikhail Zarechenskiy d5ebe2e66a Reorganize dependencies around kotlin-compiler.jar
#KT-26807 Fixed
2019-01-11 00:14:23 +03:00
Natalia Selezneva 9e2ff04e1b Fix build module in AndroidStudio for REPL and Scratch
^KT-23560 Fixed
2018-12-06 09:33:33 +03:00
Sergey Rostov 74f6c8ac5c Move resources: remove includes from src to resources, include resource folder in custom build scripts 2018-11-30 15:01:02 +03:00
Natalia Selezneva e48fbe4aa3 Do not insert additional new lines in REPL 2018-11-01 15:00:41 +03:00
Natalia Selezneva 468404c6c3 Repl: refactoring, move common parts to utils 2018-11-01 15:00:41 +03:00
Natalia Selezneva c802428326 Do not check script definitions in parser 2018-08-03 15:25:35 +03:00
Vyacheslav Gerasimov a2bf417d75 Remove 172 bunchset 2018-08-02 19:32:18 +03:00
Ilya Chernikov f71909ee73 Fix classpath calculation for scripts, e.g. in JSR-223 setting
#KT-25814 fixed
2018-08-01 13:09:05 +02:00
Sergey Rostov c8d85150de ReplOutputHandler: log xml parsing exception cause (EA-103447) 2018-07-12 10:26:37 +03:00
Pavel V. Talanov 463d9b690f Minor: rename PsiFile.moduleInfo -> forcedModuleInfo 2018-06-06 21:04:05 +02:00
Nikolay Krasko 368dd193ac 172: Revert "Fix compilation after moving to idea 173"
This reverts commit fe121cc6aeadf63ca2c2819c9c7df59cc81caf5d.
2018-04-11 16:28:02 +03:00
Ilya Chernikov d50798c4cf Refactor script-util context tools to simplify its usage in the new scripting 2018-04-04 16:23:56 +02:00
Yan Zhulanow bceb138ed1 REPL, Refactoring: Get rid of nasty enum-like String literals 2018-03-06 22:27:49 +03:00
Nikolay Krasko 08a46c1396 Refactoring: move idea source modules classes to caches/project package 2018-02-26 18:42:58 +03:00
Natalia Selezneva 654890fac3 Scratch: implement compiling executor 2018-02-01 10:21:55 +03:00
Natalia Selezneva 01e62c9bdb Scratch: implement run action with repl 2018-02-01 10:21:55 +03:00
Vyacheslav Gerasimov 35fa8efbf3 Fix compilation after moving to idea 173 2018-01-12 13:52:52 +03:00
Pavel V. Talanov cdfdc1d19b Refactor script definitions loading
Make ScriptDefinitionProvider an interface
    and provide different implementation for cli and IDEA
Rework ide extension point to a simpler interface (ScriptDefinitionContributor)
Move template loading logic into a top level function
Allow script definitions to be reloaded in IDE
2017-11-14 16:30:33 +03:00
Ilya Chernikov cff6d8cf17 Refactor context classpath discovery, share it to idea's jsr223 host...
...from script-util
fix daemon usage in repls
define compiler classpath for script-util tests explicitly
minor refactorings in the build scripts for better import into idea
2017-10-06 20:12:51 +02:00
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Mikhail Glukhikh 92215b41b9 Replace resolveToDescriptor with unsafeResolveToDescriptor
Now unsafeResolveToDescriptor is equivalent to resolveToDescriptorIfAny
but throws exception in case no descriptor is found.
Old version of resolveToDescriptor is kept intact but made deprecated.
Some clarifying comments were added
2017-09-14 17:20:37 +03:00
Pavel V. Talanov 352071dc4a Avoid creating ModuleSourceInfo instances with empty content
This is overall desirable because it means less ModuleDescriptor
    instances which is good for IDE analysis performance
2017-08-30 19:22:30 +03:00
Dmitry Jemerov a7bbf3d1f8 Don't increase OOCB count when a REPL line is modified 2017-08-09 13:26:09 +02:00
Mikhail Glukhikh c5a81691fb Partial code cleanup: can be private and some others applied 2017-08-01 17:08:56 +03:00
Alexander Udalov 46a01ec131 J2K PathUtil: convert and prettify 2017-07-28 14:11:35 +03:00
Mikhail Glukhikh 951e8cd91a Code cleanup: unnecessary local variable applied 2017-07-21 18:58:48 +03:00
Pavel V. Talanov b6a7d831bf Script IDE API: remove <TF: Any> 2017-07-19 12:28:08 +03:00
Mikhail Glukhikh 9c06739594 Cleanup: apply "lift out..." inspection (+ some others) 2017-07-07 18:15:30 +03:00
Mikhail Glukhikh 840847e47c Code cleanup: several inspections applied 2017-06-29 16:25:57 +03:00
Ilya Chernikov f152af6385 minor: some repl cleanup 2017-05-03 18:11:41 +02:00
Zalim Bashorov 2c69198926 Make return type of KotlinScriptDefinitionProvider.getInstance nullable
For example service can be absent in Kotlin JS only compiler.
2017-04-19 20:18:20 +03:00
Alexander Udalov 861d9a1620 Use null instead of CompilerMessageLocation.NO_LOCATION in MessageCollector 2017-04-11 12:08:31 +03:00
Dmitry Jemerov f9495aa0d7 Introduce and use KotlinPaths.getStdlibPath()
Also support renaming .jar file when updating an existing library
2017-04-04 11:21:06 +02:00
Mikhail Glukhikh b121bf8802 Cleanup: fix some compiler warnings (mostly deprecations, javaClass) 2017-03-15 17:35:31 +03:00
Mikhail Glukhikh e37800d056 Cleanup: apply redundant string template inspection 2017-03-15 16:12:59 +03:00
Ilya Chernikov d3682b7f7d Implement JSR 223 script template with eval functions, some fixes 2017-02-24 16:58:25 +01:00
Ilya Chernikov 63aae56b11 Get rid of eval on daemon completely, fixes also JSR 223 examples 2017-02-24 16:58:24 +01:00
Ilya Chernikov 7b2ea001c1 Fix state conversion, fix tests 2017-02-24 16:58:24 +01:00
Ilya Chernikov c5bc58ad32 Implement remote part of the new repl state handling 2017-02-24 16:58:24 +01:00
Ilya Chernikov f9dedab8c8 Extract repl state as a separate object 2017-02-24 16:58:24 +01:00
Ilya Chernikov 46894da981 Get rid of daemon-client dependency on openapi, making others "provided"
(cherry picked from commit 175d74c)
2017-02-10 16:02:55 +01:00
Ilya Chernikov bd47337be2 Using stdlib instead of runtime in the JSR 223 engines 2017-01-27 22:20:45 +01:00
apatrida 5ad06e1e92 PR-1021: Merge Keplin project scripting code into Kotlin core.
Overhauls the scripting layers (GenericRepl and related, and JSR223 and related)
Adds repeating modes (none, only latest eval'd line, or random order)
Also adds better thread-safe IO capturing, default imports, SimpleRepl wrapper, more unit tests

NOTE: the script-util part of the pull request was rejected due to various problems and incompatibilities.
It may be incorporated into the code later.

(originally cherry picked from commit 6f7d517)
2017-01-27 22:20:44 +01:00
Nikolay Krasko d13c34200b Remove method deprecated in 171 and explicitly set mainClass before calling toCommandLine() 2017-01-24 16:43:22 +03:00
Ilya Chernikov 038491399b Copy (partly) context classpath extraction code from script-util to JSR223 4 Idea, use it there 2016-12-15 07:26:08 +01:00
Ilya Chernikov cb7f22ffec Refactor JSR223 to support Compilable interface, drop daemon eval engine and sample, simplify 2016-12-15 07:26:07 +01:00