Fix broken Memory View actions
authorVitaliy.Bibaev <vitaliy.bibaev@jetbrains.com>
Tue, 17 Apr 2018 18:59:29 +0000 (21:59 +0300)
committerVitaliy.Bibaev <vitaliy.bibaev@jetbrains.com>
Tue, 17 Apr 2018 19:15:29 +0000 (22:15 +0300)
java/debugger/impl/src/com/intellij/debugger/memory/action/ClassesActionBase.java
java/debugger/impl/src/com/intellij/debugger/memory/ui/JavaReferenceInfo.java
java/debugger/impl/src/com/intellij/debugger/memory/ui/JavaTypeInfo.java

index d9b989f11c156aaa7692dabce5137fe613a5462f..d8b501d8f0133a9b1ca7bc7fd2276b993e1f8983 100644 (file)
@@ -15,7 +15,6 @@
  */
 package com.intellij.debugger.memory.action;
 
-import com.intellij.debugger.memory.ui.JavaTypeInfo;
 import com.intellij.openapi.actionSystem.AnAction;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.project.Project;
@@ -42,6 +41,6 @@ public abstract class ClassesActionBase extends AnAction {
 
   @Nullable
   protected TypeInfo getSelectedClass(AnActionEvent e) {
-    return new JavaTypeInfo(ActionUtil.getSelectedClass(e));
+    return ActionUtil.getSelectedTypeInfo(e);
   }
 }
index b22f4ae8d6627121b14e42b6cd9fc3a5f66c85a0..2f5c847621a302d1615eeedf42f2a3acdfddb5d8 100644 (file)
@@ -3,14 +3,16 @@ package com.intellij.debugger.memory.ui;
 
 import com.intellij.xdebugger.memory.ui.ReferenceInfo;
 import com.sun.jdi.ObjectReference;
+import org.jetbrains.annotations.NotNull;
 
 public class JavaReferenceInfo implements ReferenceInfo {
   private final ObjectReference objectReference;
 
-  public JavaReferenceInfo(ObjectReference objectReference) {
+  public JavaReferenceInfo(@NotNull ObjectReference objectReference) {
     this.objectReference = objectReference;
   }
 
+  @NotNull
   public ObjectReference getObjectReference() {
     return objectReference;
   }
index 8ec387e78c5644bb28b24c29a7e86c0d36347c48..66f353b1383c05921b49d8fd9e0735aa73819458 100644 (file)
@@ -17,7 +17,7 @@ public class JavaTypeInfo implements TypeInfo {
     return types.stream().map(JavaTypeInfo::new).collect(Collectors.toList());
   }
 
-  public JavaTypeInfo(ReferenceType referenceType) {
+  public JavaTypeInfo(@NotNull ReferenceType referenceType) {
     this.referenceType = referenceType;
   }
 
@@ -33,6 +33,7 @@ public class JavaTypeInfo implements TypeInfo {
     return getReferenceType().instances(limit).stream().map(JavaReferenceInfo::new).collect(Collectors.toList());
   }
 
+  @NotNull
   public ReferenceType getReferenceType() {
     return referenceType;
   }