I'm currently using Spring Tool Suite 2.9.2 (based off of Eclipse 3.x).
In every class that I debug through, it has no issue with on-hover displaying the values of my variables. But, when I am in an abstract class, on-hover just displays the variable type and name.
This is super frustrating to me, because the values get displayed in the Variables window. I usually go "Oh, I'm in an abstract class..." and I have to switch my perspective.
Is there anyway that I can display values on-hover in an abstract class with Eclipse?
I've tried resetting hover options to default and checking the combined hover button to no avail.
You can select the variable and do a Ctrl + Shift + I to inspect/view the value of that variable.
Related
During the debuging, most of time i am forced to select a variable and right click display to see its value.
for exemple for this, it always works, but never for local variables? (or lets say most of time)
here its working (without right click display):
here its not !? :
When you want to open the declaration of a class/function/variable in java you can press Ctrl and click on it, but is there are way to go the other way round? If you had to find all instances where a function or variable is called how would you quickly get that?
Ctrl + Alt + H shows you all the places where a variable or method is used or called.
On both Windows and Mac, right-click the method, and choose "Open Call Hierarchy."
You can use this for identifiers other than methods. For example, if a class does not have an explicit constructor, you can use this to find all the callers of its default constructor.
I'm trying to generate a class diagram (reverse engineering from source), using Eclipse (on OS X) and UML Lab, and for some reason some of the variables are greyed out. Here's an example:
http://i.imgur.com/Rj8Guhz.png
However, there are classes that have all variables greyed out. I do not see any pattern, some are initiated when declared, some are not. All of them are used. It is hard to read the names when the whole list is greyed out, especially when I copy the image into a Word document.
I have checked Preferences, played with some settings, but nothing has changed. Any suggestions will be appreciated.
UML Lab uses Grey color to mark "legacy" styled elements. "Legacy" refers to the template set (or CodeStyle) used to generate/import the code for these elements. This option is defined in the Profile containing the "Legacy" CodeStyle/Stereotype. I'm not sure if you can easily edit that. But you can get rid of all such highlighting if you switch off automatic Constraint Validation (right in the UML Lab main preferences) and reopen the diagram.
Looking at the example image I would say it greys out only private variables (marked with "-").
Have you checked settings on color depending on the visibility of the variable?
When hovering your mouse over a Class or variable, how come I don't see any information on the type of the class?
Is this not a feature in IntelliJ?
For example, in vs.net, if I mouse over any variable or class it will popup and tell me what namespace that belongs to etc.
And when I am using a method of a class, it also tells me the different overloads for the method (like types for each parameter, and a list of all the overloads).
This must be a feature in IntelliJ, I just don't know how to get it.
Can someone please clear this up?
Also, how can I tidy up the formatting of a page?
It doesn't work on hover yet, please star/vote the issue.
You need to use keyboard shortcuts for quick documentation pop-up or parameter info pop-up (Ctrl+Q and Ctrl+P with default Windows keymap, F1 and Cmd+P with default OS X 10.5+ keymap).
Code | Reformat Code... is the answer to your second question.
Formatting: Code -> Reformat (shortcut: Ctrl-Alt-L)
Hover doesn't produce the kind of information I'd like either. You can get info with Ctrl-Q ("Quick Help") in Windows or F1 in OS X, which will show where it's from and what it is, with most stuff in the popup window linked up in a reasonable way.
That popup view can also be pinned and/or docked; I often have it docked on the bottom.
How can I watch the contents of several variables (for example, TreeSet's) simultaneously? I can watch contents of one TreeSet, clicking on it in "Variables" window, but I have no idea how to do that for several variables.
You can use Expressions windows: while debugging, menu window -> Show View -> Expressions, then it has place to type variables of which you need to see contents
You can add a watchpoint for each variable you're interested in.
A watchpoint is a special breakpoint that stops the execution of an application whenever the value of a given expression changes, without specifying where it might occur. Unlike breakpoints (which are line-specific), watchpoints are associated with files. They take effect whenever a specified condition is true, regardless of when or where it occurred. You can set a watchpoint on a global variable by highlighting the variable in the editor, or by selecting it in the Outline view.
You can do so by these ways.
Add watchpoint and while debugging you can see variable in debugger window perspective under variable tab.
OR
Add System.out.println("variable = " + variable); and see in console.
And how about selecting the text you want to watch, and then using the shortcut "Ctrl + shift + I"