Reputation: 1239
Can I change description of variable?
I want to see my own string at this place. I want generate this string by myself. For example
"RTKAccount number=111 and FGSFDS"
insead of
"RTKAccount (id=830039244504)".
I tried to change toString()
method in my class, but it did not work.
public String toString() {
return "RTKAccount id=" + this.id + " number=" + this.number;
}
Upvotes: 3
Views: 229
Reputation: 10606
What you're searching for are the detail formatters.
Right-click on the variable in the Variable view and select "New Detail Formatter...". In the wizard type this into the big text area:
"RTKAccount id=" + id + " number=" + number
And there you have it ;-)
Upvotes: 4
Reputation:
You can change the value of a variable by right clicking it -> Change value
Upvotes: 0