fix PackageDirectoryMismatch
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Wed, 16 Nov 2016 11:49:53 +0000 (12:49 +0100)
committerVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Wed, 16 Nov 2016 12:12:22 +0000 (13:12 +0100)
platform/configuration-store-impl/testSrc/TemplateSchemeTest.kt
platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt

index 6bc0c35162fd1bcf5e4a573bb9b7694fb0cd85cf..58ad90361a334cf1121b80af134ebdcf0e8e8ab0 100644 (file)
@@ -29,7 +29,7 @@ class TemplateSchemeTest {
     <templateSet group="Groovy">
       <template name="serr" value="System.err.println(&quot;$\END$&quot;)dwed" description="Prints a string to System.errwefwe" toReformat="true" toShortenFQNames="true" deactivated="true">
         <context>
-          <option name="GROOVY_STATEMENT" value="true" />
+          <option name="__DO_NOT_DELETE_ME__" value="true" />
         </context>
       </template>
     </templateSet>""".trimIndent()
index 86326877c779c22b230d945bed6fb5b08db1cfb8..d565e67c71ec06e4429da248282e0b68382ed430 100644 (file)
@@ -44,7 +44,7 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl
   private val breakpointResolvedListenerAdded = AtomicBoolean()
 
   fun setBreakpoint(vm: Vm, breakpoint: XLineBreakpoint<*>) {
-    val target = synchronized (lock) { IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.let { it.get(breakpoint) } }
+    val target = synchronized (lock) { IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.get(breakpoint) }
     if (target == null) {
       setBreakpoint(vm, breakpoint, debugProcess.getLocationsForBreakpoint(vm, breakpoint))
     }
@@ -73,7 +73,7 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl
     var vmBreakpoints: Collection<Breakpoint> = emptySet()
     synchronized (lock) {
       if (disable) {
-        val list = IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.let { it.get(breakpoint) } ?: return nullPromise()
+        val list = IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.get(breakpoint) ?: return nullPromise()
         val iterator = list.iterator()
         vmBreakpoints = list
         while (iterator.hasNext()) {
@@ -85,7 +85,7 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl
         }
       }
       else {
-        vmBreakpoints = IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.let { it.remove(breakpoint) } ?: return nullPromise()
+        vmBreakpoints = IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.remove(breakpoint) ?: return nullPromise()
         if (!vmBreakpoints.isEmpty()) {
           for (vmBreakpoint in vmBreakpoints) {
             vmToIdeBreakpoints.remove(vmBreakpoint, breakpoint)
@@ -172,7 +172,7 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl
           synchronized (lock) {
             vmToIdeBreakpoints.remove(breakpoint)?.let {
               for (ideBreakpoint in it) {
-                IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.let { it.remove(ideBreakpoint, breakpoint) }
+                IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.remove(ideBreakpoint, breakpoint)
               }
               it
             }
@@ -213,12 +213,10 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl
 
   protected abstract fun doRunToLocation(position: XSourcePosition): List<Breakpoint>
 
-  fun isRunToCursorBreakpoints(breakpoints: List<Breakpoint>) = synchronized (runToLocationBreakpoints) { runToLocationBreakpoints.containsAll(breakpoints) }
-
   fun isRunToCursorBreakpoint(breakpoint: Breakpoint) = synchronized (runToLocationBreakpoints) { runToLocationBreakpoints.contains(breakpoint) }
 
   fun updateAllBreakpoints(vm: Vm) {
-    val array = synchronized (lock) { IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.let { it.keys.toTypedArray() } } ?: return
+    val array = synchronized (lock) { IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.keys?.toTypedArray() } ?: return
     for (breakpoint in array) {
       removeBreakpoint(vm, breakpoint, false)
       setBreakpoint(vm, breakpoint)
@@ -227,7 +225,7 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl
 
   fun removeAllBreakpoints(vm: Vm): Promise<*> {
     synchronized (lock) {
-      IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.let { it.clear() }
+      IDE_TO_VM_BREAKPOINTS_KEY.get(vm)?.clear()
       vmToIdeBreakpoints.clear()
       runToLocationBreakpoints.clear()
     }