`SPCIntegration` uses global debug state (from `ScalaDebugger`) which is unavailable during conditional brakpoint check - condition is evaluated **before** breakpoint is hit. This commit wraps login in `try/catch` and ignores those errors. This unfortunately means imports from debugged file will not be added before expression and limited generics support. Next week we will work on more permanent solution.
PC options in case of incompatibilities. Compiler plugins (like macro-paradise) are cross-compiled with the full Scala version, and they are not binary compatible across minor versions. We acknowledge that and check it properly in the classpath validator. Compiler plugins can’t be instantiated in the PC unless the project Scala version (Installation) is exactly the same as the platform (the one Eclipse is running). This commit fixes PC crashes due to such incompatibilities. Re #1002226 Fix #1002358 Fix #1002186
Regex for unicode literals is copied from `StringTokenScanner`. Invalid escaped sign are also accepted, as valid char literals because it seems to be more likely that no indentation should happen after such compile errors. Valid/Invalid escape sign: def u = '\x'^ // ==> def u = '\x' ^ Valid unicode literals def u = '\u0fff'^ // ==> def u = '\u0fff' ^ Invalid unicode literals def u = '\u0ff'^ // ==> def u = '\u0ff' ^ It is questionable if the last case is correct or not, but it is such an unimportant case that it should not really matter in practice.
The main problem is an exponential blowup of a regex. Another problem is that the val `restOfTheLine` doesn't really contain the rest of the line, but the start of the string literal until the offset, what in this case is the end of the string literal. Another problem is that the regex is too complicated. The easiest way to fix the problem was to simplify the regex and to stop the regex computation as soon as a newline character occurs, which happens because `.` doesn't match newline characters. No tests included because a test suite doesn't exist. The following should be the behavior (^ is the cursor before/after `<enter>` is pressed): def f = ""^ //==> def f = "" ^ and def f = ^"" //==> def f = ^"" Fixes #1002433
The tests were recently re-enabled, because they were improved. But they are still not improved enough. See: https://scala-ci.typesafe.com/job/scala-2.11.x-integrate-ide/821/console