This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This is embarrassing . . on an earlier version of Eclipse, I was actually doing this, but now I can't figure out how to get it to show.
In the Variables View, the window shows, well, variables. However, the "this" item is missing. I recall that in the previous version of Eclipse I'd had (on another PC), it wasn't there by default and something had to be selected to add it . .
I'm using Indigo now, and I can't for the life of me figure out how to get the "this" item in the Variables View. I see the "Show Constants" and "Show Static Variables" options, among the other things under View Menu -> Java on the Variables View menu dropdown, but I want to show the class-level variables, regardless of whether they're constants, or static. How?
I don't recall ever seeing "this" in the outline view. "this" is sort of implicit, and actually, since it means "this instance" it doesn't actually apply to class variables, only to member variables (and methods).
There is a toggle button at the top of the Outline display view that can be used to show or hide class members, just as there is for public/private members. Don't forget, however, that there's also a Mylyn button, and Mylyn will hide stuff, too.
An IDE is no substitute for an Intelligent Developer.
Joined: Jan 05, 2005
Er, yes, but I didn't mean the Outline View, I meant the Variables View . . take a look at this link to see what I mean.
With what I'm looking for, at the top of the variable list (just above "anInt" on the example screen) would be an additional row that says "this" with a + next to it to expand out and show all the member variables.
This (no pun intended) is what I'm trying to accomplish.
Now, I have to apologize, I meant to say "member variables" in my above post, rather than "class level variables" - sorry for the confusion/ambiguity.
EDIT: As a further clarification, look at the screenshot at item #10 in the right pane of this page.
Note that the first item in the variables pane is "this" (with a green circle next to it).
How do I set things in my Eclipse so that "this" is shown? Right now, it shows other variables, but doesn't show "this"
Joined: Jan 05, 2005
Whoops! Never mind. It's there now!
Apparently, genius that I am, my breakpoint was in a static method rather than an instance method. Sorry for the hassle! Don't know what the heck I was thinking.....