Commit
cleaning, tooltip improvement
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,12 +40,14 @@ public class TraceNode { | |
private final int value; | ||
private final String name; | ||
private final String packageName; | ||
private final String desc; | ||
private final List<TraceNode> children = new ArrayList<>(); | ||
|
||
public TraceNode(String name, int value, String packageName) { | ||
public TraceNode(String name, int value, String packageName, String desc) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mirage22
Author
Owner
|
||
this.name = name; | ||
this.value = value; | ||
this.packageName = packageName; | ||
this.desc = desc; | ||
} | ||
|
||
public int getValue() { | ||
|
@@ -59,6 +61,10 @@ public String getName() { | |
public String getPackageName() { | ||
return packageName; | ||
} | ||
|
||
public String getDesc() { | ||
return desc; | ||
} | ||
|
||
public List<TraceNode> getChildren() { | ||
return children; | ||
|
@@ -75,6 +81,7 @@ public int hashCode() { | |
result = prime * result + ((children == null) ? 0 : children.hashCode()); | ||
result = prime * result + ((name == null) ? 0 : name.hashCode()); | ||
result = prime * result + ((packageName == null) ? 0 : packageName.hashCode()); | ||
result = prime * result + ((desc == null) ? 0 : desc.hashCode()); | ||
result = prime * result + value; | ||
return result; | ||
} | ||
|
@@ -104,13 +111,19 @@ public boolean equals(Object obj) { | |
} | ||
} else if (!packageName.equals(other.packageName)) | ||
return false; | ||
if (desc == null) { | ||
if (other.desc != null) { | ||
return false; | ||
} | ||
} else if (!desc.equals(other.desc)) | ||
return false; | ||
if (value != other.value) | ||
return false; | ||
return true; | ||
} | ||
|
||
public String toString() { | ||
return "TraceNode [name: " + name + ", value: " + value + ", packageName: " + packageName + ", children: " | ||
return "TraceNode [name: " + name + ", value: " + value + ", packageName: " + packageName + ", desc: "+ desc + ", children: " | ||
+ children.size() + "]"; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,8 +253,9 @@ private static String render(TraceNode root) { | |
} | ||
|
||
private static void render(StringBuilder builder, TraceNode node) { | ||
String start = String.format("{%s,%s,%s, \"c\": [ ", toJSonKeyValue("n", node.getName()), | ||
toJSonKeyValue("p", node.getPackageName()), toJSonKeyValue("v", String.valueOf(node.getValue()))); | ||
String start = String.format("{%s,%s,%s,%s, \"c\": [ ", toJSonKeyValue("n", node.getName()), | ||
This comment has been minimized.
Sorry, something went wrong.
thegreystone
Collaborator
|
||
toJSonKeyValue("p", node.getPackageName()), toJSonKeyValue("d", node.getDesc()), | ||
toJSonKeyValue("v", String.valueOf(node.getValue()))); | ||
builder.append(start); | ||
for (int i = 0; i < node.getChildren().size(); i++) { | ||
render(builder, node.getChildren().get(i)); | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -523,7 +523,9 @@ public class Messages extends NLS { | |
public static String VMOperationPage_PAGE_NAME; | ||
public static String VMOperationPage_ROW_VM_OPERATIONS; | ||
public static String VMOperationPage_TIMELINE_SELECTION; | ||
|
||
public static String Flameview_UNCLASSIFIABLE_FRAME; | ||
This comment has been minimized.
Sorry, something went wrong.
thegreystone
Collaborator
|
||
public static String Flameview_UNCLASSIFIABLE_FRAME_DESC; | ||
|
||
static { | ||
NLS.initializeMessages(BUNDLE_NAME, Messages.class); | ||
} | ||
|
Do we really need this? We can keep the data structure smaller by just setting name or packageName to UNCLASSIFIABLE_FRAME, and take care of it in the JSon generation.