From 426573abb6df7d92c0a7c3fceb865bf206058599 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Sun, 22 May 2011 22:59:11 +0200 Subject: [PATCH] show full name in output from 'info' command --- se/sics/mspsim/util/StatCommands.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/se/sics/mspsim/util/StatCommands.java b/se/sics/mspsim/util/StatCommands.java index f15d9ea..48e429d 100644 --- a/se/sics/mspsim/util/StatCommands.java +++ b/se/sics/mspsim/util/StatCommands.java @@ -74,7 +74,14 @@ public class StatCommands implements CommandBundle { if (unit == null) { context.out.println(" " + unitName + ": NOT FOUND"); } else { - context.out.println(unitName + ": " + unit); + String id = unit.getID(); + String name = unit.getName(); + if (id == name) { + context.out.println(unit.getName() + ": " + unit.getClass().getName()); + } else { + context.out.println(unit.getID() + " (" + unit.getName() + "): " + + unit.getClass().getName()); + } String info = unit.info(); if (info != null) { context.out.println(info);