simplify properties management
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Fri, 9 Jan 2015 10:50:50 +0000 (11:50 +0100)
committerVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Fri, 9 Jan 2015 10:50:50 +0000 (11:50 +0100)
platform/script-debugger/backend/src/org/jetbrains/debugger/ObjectPropertyImpl.java [moved from platform/script-debugger/backend/src/org/jetbrains/debugger/values/ObjectPropertyImpl.java with 88% similarity]
platform/script-debugger/protocol/protocol-reader-runtime/src/org/jetbrains/jsonProtocol/JsonField.java
platform/script-debugger/protocol/protocol-reader/src/org/jetbrains/protocolReader/FieldProcessor.java

similarity index 88%
rename from platform/script-debugger/backend/src/org/jetbrains/debugger/values/ObjectPropertyImpl.java
rename to platform/script-debugger/backend/src/org/jetbrains/debugger/ObjectPropertyImpl.java
index 48e46a17c938a58dd43f3b582c060acf9838a544..ef7f7c255b4d26cc2fb97a4a1a14fc6a0f8782bc 100644 (file)
@@ -1,11 +1,10 @@
-package org.jetbrains.debugger.values;
+package org.jetbrains.debugger;
 
 import com.intellij.util.BitUtil;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
-import org.jetbrains.debugger.ObjectProperty;
-import org.jetbrains.debugger.ValueModifier;
-import org.jetbrains.debugger.VariableImpl;
+import org.jetbrains.debugger.values.FunctionValue;
+import org.jetbrains.debugger.values.Value;
 
 public class ObjectPropertyImpl extends VariableImpl implements ObjectProperty {
   public static final byte WRITABLE = 0x01;
index 0745f4310e5c6e73e0e9cdff3520abdcb0e3488c..1ea36811ad73aca46ff9c3e5f83bcfab079aa19f 100644 (file)
@@ -1,7 +1,3 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
 package org.jetbrains.jsonProtocol;
 
 import java.lang.annotation.ElementType;
@@ -21,7 +17,7 @@ public @interface JsonField {
    * Specifies JSON property name, which otherwise is derived from the method name (optional "get"
    * prefix is truncated with the first letter decapitalization).
    */
-  String jsonLiteralName() default "";
+  String name() default "";
 
   // read any primitive value as String (true as true, number as string - don't try to parse)
   boolean allowAnyPrimitiveValue() default false;
index 7d4738f824e00ca1c218bf4ade066a05c6a320ed..b1f3b3737c7d82f1f5d422514458ee9a52a4fd52 100644 (file)
@@ -158,7 +158,7 @@ final class FieldProcessor<T> {
     }
     JsonField fieldAnnotation = method.getAnnotation(JsonField.class);
     if (fieldAnnotation != null) {
-      String jsonLiteralName = fieldAnnotation.jsonLiteralName();
+      String jsonLiteralName = fieldAnnotation.name();
       if (!jsonLiteralName.isEmpty()) {
         return jsonLiteralName;
       }