/*
 * Copyright 2000-2016 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jetbrains.debugger;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public interface Scope {
  enum Type {
    GLOBAL,
    LOCAL,
    WITH,
    CLOSURE,
    CATCH,
    LIBRARY,
    CLASS,
    INSTANCE,
    BLOCK,
    SCRIPT,
    UNKNOWN
  }

  @NotNull
  Type getType();

  /**
   * Class or function or file name
   */
  @Nullable
  String getDescription();

  @NotNull
  VariablesHost<?> getVariablesHost();

  boolean isGlobal();
}
@@ -624,17 +624,16 @@
 debugger
-;
 %0A%0Aimport
@@ -651,80 +651,37 @@
 ins.
-annotations.NotNull;%0Aimport org.jetbrains.annotations.Nullable;%0A%0Apublic 
+debugger.values.ObjectValue%0A%0A
 inte
@@ -701,16 +701,22 @@
 %0A  enum 
+class 
 Type %7B%0A 
@@ -855,34 +855,22 @@
 %0A%0A  
-@NotNull%0A  Type get
+val type: 
 Type
-();
 %0A%0A  
@@ -921,60 +921,437 @@
 /%0A  
-@Nullable%0A  String getDescription();%0A%0A  @NotNull%0A  V
+val description: String?%0A%0A  val variablesHost: VariablesHost%3C*%3E%0A%0A  val isGlobal: Boolean%0A%7D%0A%0Aabstract class ScopeBase(override val type: Scope.Type, override val description: String?) : Scope %7B%0A  override val isGlobal: Boolean%0A    get() = type === Scope.Type.GLOBAL %7C%7C type === Scope.Type.LIBRARY%0A%7D%0A%0Aclass ObjectScope(type: Scope.Type, private val value: ObjectValue) : ScopeBase(type, value.valueString), Scope %7B%0A  override val v
 aria
@@ -1362,15 +1362,10 @@
 Host
-%3C?%3E get
+: 
 Vari
@@ -1377,32 +1377,41 @@
 Host
-();%0A%0A  boolean isGlobal();
+%3C*%3E%0A    get() = value.variablesHost
 %0A%7D

convert Scope to kotlin