Eclipse Hover over variables in debug not showing contents - eclipse

At a break point my Eclipse used to show me the value of a hovered variable, now it only shows the type name.
How can I turn that back on?

Go to the preferences and type "Hovers" in the search box at the top. Make sure the Combined one is checked. Though I have found that even if they are set correctly sometimes (in the case of certain fields) it shows only the type, not sure why that's the case. You might want to ask about that in the Eclipse JDT newsgroup.

Seems like Ubuntu can intercept some of the Special Key presses.

Related

Eclipse : how to insert content assist proposals?

Just a little annoyance :
Context :
The content assist is set up and work most of the time.
But I just tried to write document.getElementById;
Problem :
The problem is I cannot select one of the proposals for document.get: when I select an entry,the popup disappears and nothing is inserted in text.
I noticed that it is preceded by a green dot. Other proposals with a blue triangle are inserted normally.
Any hint why I cannot make it work ?
Thanks,
UPDATE :
Eclipse 3.8 debian
It sorts out that the culprit was the option "guess filled functions argument". It messed up everything. Now I'm back to work (as expected).
This feature is disabled by default, but if, like me, you set it up and forgot about it, here is how to disable it :
Windows -> Javascript -> Editor -> content assist -> guess filled function argument
It should be disabled.
I've found that on sometimes the assist pop-ups can be finicky. Pop-ups can be in either selected or unselected states. If the pop-up is in an unselected state clicking the actions sometimes does not either work or the option can be incomplete.
Try testing and making sure that the pop-up is selected before you choose an option. (The pop-up border should change and you may get a scroll bar to indicate the difference.

Eclipse working sets -- how to rename them? Also, can the error-icon be disabled?

After mild frustration with the difficulty to make top-level "plain old folders" within Eclipse for visual-organization purposes, I discovered that the thing I'm after is called a "working set". Hooray! But they don't seem to be rename-able, by any of the apparent avenues (right-clicking on it or using the Configure Working Sets window).
Is that just the way things are, since no one should be so lazy as to refuse making a new working set with the right name and transferring everything over? Or am I missing something obvious?
I also have a more minor question whose answer I already think I know. Can I tell a specific working set not to change its icon to have the "red X" when one of its children has an error? Nothing in the preferences under Debugging suggests to me the ability to turn off the automatic icon-changing. It's a useful feature, but I have a few simple practice projects with very basic errors, and I don't need the visual reminder to "fix" them, especially if they're in my "Practice" working set, whose icon I'd prefer not to change.
To rename a Working Set, you need to get to the dialogue of selecting a Working Set (click on the white down arrow at the top right of the package explorer > Configure Working Sets..), focus on your Working Set and click the "Edit" button. There, you can change the Working Set's name, as well as what's actually included in the Working Set.
There is no way (that I know of) to change the icon display to avoid showing the errors marker.

Eclipse content assist auto appends type for variable

I just started to use Juno for a couple of days, the content assist mechanism seems different from what it behaves before.
For example, if I try to declare a variable
Boolean isVisible
The content assist of Juno will give you a drop-down list with the variable name
isVisibleBoolean
as hint.
And the very annoying thing is that no matter what I typed in(; or SPACE), the "isVisibleBoolean" will be selected.
Does anybody know how can I disable the auto-variable-type-appending thing?
Much appreciated.
I'm using Mac OS X 10.8.1 currently, haven't tested it yet in windows.
Based on the discussion for Eclipse Bug 412992, check your Content Assist Auto Activation settings:
Window->Preferences->Java->Editor->Content Assist
If, for example, characters a-z are listed as "Auto activation triggers for Java", you can remove them and the type name will not be auto-appended to a new variable name when you hit ' ' or ';'. It's up to you to determine the best configuration/tradeoffs for your style based on the available options.
It seems that it is not possible.
See answers to Eclipse Bug 378588: https://bugs.eclipse.org/bugs/show_bug.cgi?id=378588
This is still a problem in Eclipse 2018-12 and it only seems to occur if you changed the Auto activation triggers for Java setting to e.g. ._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ, which'll make the Content Assist (almost) always pop up, even without pressing Ctrl+Space (Windows).
There's a new setting that was added in Eclipse 2018-12 and makes it a bit less annoying (mentioned in the comments below the bug report):
In Window - Preferences - Java - Editor - Content Assist tick the Disable insertion triggers except 'Enter' box.
With this setting enabled, Content Assist is still going to trigger (depending on the other settings) but you have to press Enter to accept a suggestion.
Not a perfect solution:
Window->Preference->Java->Editor->Content Assist->Auto activation Triggers for Java: .ABCDEFGHIJKLMNOPQRSTUVWXYZ
In this way, only classes and types will be popped up for proposals.
Just a suggestion, the choice is up to you.
What you see there is name completion for object types. And this may often make sense, e.g. pressing Ctrl-Space after List book will complete that to List bookList. For primitive types this is not done, so int count will not get any completion when pressing Ctrl-Space. This would be a (not really good) solution to your problem by declaring the variable as primitve boolean.
What I really recommend as solution is to change your style of writing variable declarations. For your example, write isVisible = false instead, have the editor complain about the missing type declaration, hit Ctrl-1 (from wherever your cursor might be placed), Enter.

Is there a plugin for Eclipse that immediately evaluates a highlighted expression?

A colleague of mine uses Netbeans, and I noticed a tremendously useful feature it has in debug mode: it immediately shows what a highlighted expression evaluates to in a tooltip. I'm not sure whether this is a standard feature in Netbeans, but I would definitely find it useful in Eclipse as well.
Does anyone know a plugin or a similar way of using this in Eclipse?
EDIT:
Eclipse provides tooltips for single variable evaluation and expressions evaluation in the expressions view. This is not what I need. In Netbeans, you can highlight an expression (possibly containing more than one variable) and it gets evaluated in a tooltip.
In Eclipse debug mode you can add needed expression to Expression view and check its value or you can hover mouse over variables and check theirs values
In Eclipse, when you're running your program in the debugger, you should be able to add a Watcher for a variable, or just simply evaluate an expression (I believe) in the Watcher tab. Sorry, I don't actually use Eclipse full-time, this is just from memory as I have used it in the past...
Three years later (don't know if it was before) you can Inspect the selected expression.
Select it, right click and choose Inspect, or press Ctrl+Shift+I (personally I changed that shortcut to one more reachable F12).

Can you disable automatic horizontal scrolling in Eclipse?

Sometimes when I jump into source code, e.g. from search or when looking up the declaration of something, the Eclipse text editor tries to display nearby long lines by horizontal scrolling. This happens even if the item I jumped to is well within the display without scrolling. I find this rather annoying, so:
Is there a way to disable this? I have searched in vain through all the editor settings.
Specifically, this is about Eclipse CDT, but I suppose the behaviour is the same in JDT.
This seems to happen in other eclipse editors too (like PDT for PHP)
It could have been related with the ScrolledFormText, but the Plugin Spy tells us a WorkbenchWindow class is concerned, as well as an AbstractDecoratedTextEditor, that is in essence an org.eclipse.ui.texteditor.AbstractTextEditor.
The source of that AbstractTextEditor indicates having:
a ScrollLinesAction for vertical scrolling
a TextNavigationAction for settings the cursor and potentially triggering horizontal scrolling
I am not sure how to change that behavior, except by contributing somehow to the active editor identifier (for instance, for java, "org.eclipse.jdt.ui.ClassFileEditor"), and modifying that Action.
I was having the same issue and found these open bugs for it on the Eclipse Bugs:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314208
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321189
You can prevent it from happening when you switch the Code Folding off and reload the file.
grtz,
T
right click on your eclipse shortcut and choose properties. in compatibility tab choose "windows xp(servicepack 3). http://www.vistax64.com/vista-general/133849-disable-dynamic-horizontal-scrolling-vista.html