This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse - Variables View - show class-level variables?  How? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse - Variables View - show class-level variables?  How?" Watch "Eclipse - Variables View - show class-level variables?  How?" New topic
Author

Eclipse - Variables View - show class-level variables? How?

Joe Vahabzadeh
Ranch Hand

Joined: Jan 05, 2005
Posts: 140
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?

Thanks in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Joe Vahabzadeh
Ranch Hand

Joined: Jan 05, 2005
Posts: 140
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"
Joe Vahabzadeh
Ranch Hand

Joined: Jan 05, 2005
Posts: 140
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.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse - Variables View - show class-level variables? How?