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
Ilya Chernikov
28b01126d9
Improve type boundaries for KotlinScriptDefinition interface
2016-12-15 07:26:07 +01:00
Ilya Chernikov
7a79fff9d6
Put lines history into all data structures returned by repl, refactor storage and passing of the history for that
2016-12-15 07:26:06 +01:00
Ilya Chernikov
846797ff61
Switch to templates in the separate script runtime
2016-10-12 15:38:52 +02:00
Ilya Chernikov
c2b5c11781
Fix all small and medium-sized issues after review
2016-10-12 15:37:54 +02:00
Ilya Chernikov
10d259771c
Refactor repl and JSR 223 support code, add separate example jars for each type of JSR 223 repl (with tests)
2016-10-12 15:37:52 +02:00
Ilya Chernikov
bf0d5b6237
Add basic bindings support to IDEA JSR223 scripting, fix evaluator
2016-10-12 15:37:51 +02:00
Ilya Chernikov
063fbed75e
Fix params handling in JSR 223 for Idea, add simple test
2016-10-12 15:37:51 +02:00
Ilya Chernikov
fe69185cd4
Refactor script definition and related parts:
...
- simplify script definition interface, convert it to class
- create simple definitions right from base
- refactor (rename and simplify) script definition with annotated template
- simplify usages of script definition in many places
2016-10-12 15:37:50 +02:00
Ilya Chernikov
6bc488d95d
Implement JSR 223 engine and factory for IDEA using daemon repl
2016-10-12 15:37:49 +02:00
Mikhail Zarechenskiy
8a0107ea5f
Move property with template to script definition interface
2016-09-20 16:23:42 +03:00
Dmitry Jemerov
dc0020b666
in REPL tests, wait for process destroyed handler to fire after destroying process and before performing the rest of dispose
2016-07-19 13:24:56 +02:00
Nikolay Krasko
5cfebe4120
Avoid "loader constraint violation: when resolving method "ActionsKt.runReadAction()"
2016-07-07 02:51:26 +03:00
Ilya Chernikov
e8c13882b4
Make script detection API generic, fix tests
2016-06-07 21:13:05 +02:00
Ilya Chernikov
770ef16ef7
Replace script recognition from by PsiFile to by virtual file, fix custom script name generation
2016-06-07 21:11:28 +02:00
Ilya Chernikov
d225385d19
Add name and classpath to KotlinScriptDefinition
2016-06-07 21:11:26 +02:00
Pavel V. Talanov
85200e1f8a
REPL UI: fix history pane not showing latest command after command execution
2016-05-24 17:33:24 +03:00
Pavel V. Talanov
9cff590366
Use ReplState to implement completion in IDE REPL
...
Consider sucessfully evaluated lines as previous lines when analyzing console file
2016-05-24 15:42:06 +03:00
Nikolay Krasko
ef13e8f5bb
Prepare building plugins modules against 1.8 JDK
2016-04-05 00:39:46 +03:00
Nikolay Krasko
139964bf31
Fix repl tests: do modification in write action, avoid hang in closed console
2016-04-05 00:39:46 +03:00
Dmitry Jemerov
4a1d282de6
don't try to parse empty text as XML
2016-02-02 13:40:23 +01:00
Dmitry Jemerov
84f9cb9bfd
correctly separate stdout and stderr when parsing REPL output
2016-02-01 19:06:17 +01:00
Dmitry Jemerov
43a6e13f4b
idea: cleanup 'public', property access syntax
2016-01-07 18:12:36 +01:00
Dmitry Petrov
76931affc6
KT-10139:
...
Non-exhaustive 'when' without 'else' used in expression is an error
regardless of expected type: it can't be an expression, even of type Unit.
2015-12-01 10:36:40 +03:00
Yan Zhulanow
46ac3571d5
Fix "infix modifier required" errors in project
2015-11-27 15:51:11 +03:00
Ilya Gorbunov
f3ff2e2e76
Replace deprecated join with joinToString
2015-11-06 01:12:00 +03:00
Pavel V. Talanov
d0097c85d3
Repl: enhance test framework to wait for commands to be processed, not some text to appear
2015-10-26 20:17:45 +03:00
Pavel V. Talanov
03c3fd2c2b
Repl: correctly handle readLine()
2015-10-26 20:17:44 +03:00
Pavel V. Talanov
6237e516d4
Repl: fix a problem where handling an incomplete message led to xml parsing exception
2015-10-26 20:17:43 +03:00
Pavel V. Talanov
e20bcbde53
Repl: keep track of command entries which were already processed
...
Fixes race condition
2015-10-26 20:17:43 +03:00
Pavel V. Talanov
0fe3ef7cf4
Repl: refactor ide code
...
More accurate class names
Move all shared state to KotlinConsoleRunner class
2015-10-26 20:17:42 +03:00
Pavel V. Talanov
b5dfbcdde8
Repl, minor: extract function
2015-10-26 20:17:40 +03:00
Dmitry Jemerov
d6a3870101
rename Kt to Kotlin in KtType, KtIcons
2015-10-20 16:23:31 +02:00
Dmitry Jemerov
49033e0002
rename Jet* classes to Kt*
2015-10-19 21:35:30 +02:00
Mikhail Glukhikh
f61aa18a05
Code cleanup: get rid of _ (mostly renamed to arg)
2015-10-19 15:24:42 +03:00