WEB-21216 Debugger should show contents of Map/Set

This commit is contained in:
Vladimir Krivosheev
2016-11-09 12:18:19 +01:00
parent 9e9213d99b
commit 93d7dfa4c8
@@ -1,3 +1,18 @@
/*
* 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 com.intellij.util.BitUtil
@@ -6,34 +21,22 @@ import org.jetbrains.debugger.values.Value
class ObjectPropertyImpl(name: String,
value: Value?,
private val getter: FunctionValue?,
private val setter: FunctionValue?,
valueModifier: ValueModifier?,
private val flags: Int) : VariableImpl(name, value, valueModifier), ObjectProperty {
override fun getGetter(): FunctionValue? {
return getter
}
override fun getSetter(): FunctionValue? {
return setter
}
override fun isWritable(): Boolean {
return BitUtil.isSet(flags, WRITABLE.toInt())
}
override fun isConfigurable(): Boolean {
return BitUtil.isSet(flags, CONFIGURABLE.toInt())
}
override fun isEnumerable(): Boolean {
return BitUtil.isSet(flags, ENUMERABLE.toInt())
}
override val getter: FunctionValue? = null,
override val setter: FunctionValue? = null,
valueModifier: ValueModifier? = null,
private val flags: Int = 0) : VariableImpl(name, value, valueModifier), ObjectProperty {
companion object {
val WRITABLE: Byte = 0x01
val CONFIGURABLE: Byte = 0x02
val ENUMERABLE: Byte = 0x04
val WRITABLE = 0x01
val CONFIGURABLE = 0x02
val ENUMERABLE = 0x04
}
override val isWritable: Boolean
get() = BitUtil.isSet(flags, WRITABLE)
override val isConfigurable: Boolean
get() = BitUtil.isSet(flags, CONFIGURABLE)
override val isEnumerable: Boolean
get() = BitUtil.isSet(flags, ENUMERABLE)
}