Eclipse Clover Plugin / Toggling Code Coverage Highlighting on Editor - eclipse

I have recently been using Clover plugin for Eclipse and it's been incredibly useful. Perhaps the most useful part - the code coverage highlighting however is turning out to be incredibly annoying when writing/composing JUNIT tests.
I was just wondering, is there an easy way to turn the highlighting off and back on with click of a button or keyboard shortcut. Note that I do not like to entirely turn off and disable clover coverage on a project. I just merely need to turn off the green/red highlighting on code inside the editor when I am writing my JUNITs. Is there any easy way to do that? I did lot of research myself and could not find a good solution.

Have you tried using three buttons named "Show all / Show uncovered / Show none" from the Coverage Explorer view? They're located near the top-right corner of this view.
https://confluence.atlassian.com/display/CLOVER/2.+Exploration+of+coverage+in+Eclipse

Related

Eclipse showing methods

Is there a way in Eclipse to show the methods in a drop down on top of your screen? Like they do in visual studio.
I know I can press Ctrl-O
I just find the visual studio way handy.
Alt-Shift-B will bring up the Breadcrumb, which might be close to what you're looking for. If you click the arrow icons you'll get dropdowns for the packages, classes or methods.
Even if there is no exact same way in eclipse you might find the feature to expand classes in the Package Explorer useful:

Eclipse, Configuration of Editor

I need to switch to eclipse base on some errors in Netbeans with Android project.
But my problems is I like how Netbeans look and work and wonder how I can config some part of Eclipse to like more my Netbeans.
( I use eclipse 4.2.1 for Java and Android.)
The first part is, how can I config Eclipse to always show my the range of a method,
The Eclipse has same function but the range of a method is only show while I hover over the icon with the mouse. ( Also I want this to be square icons )
My other question is in netbeans while I has collaps a method I can
preview the method by hover over {...}, can I config Eclipse to do same?
I has identify a working way to show preview, you move the course to the first line on the collaps lines and then move mouse over the plus sign. But this is more work and take more time then uncollaps and collaps the lines. Is this exist a fast way to do the preview?
I'm using Eclipse for few years and I have never seen any options or ways to configure preview for collapsed code.
I prefer to use the keyboard instead of the mouse. It's much faster during development for me. I hope those keyboard shortcuts will be useful for you too:
Ctrl+9 - collapse 1 level for all blocks Edit: (PyDev specific)
Ctrl+0 - expand 1 level for all blocks Edit: (PyDev specific)
Ctrl+- - collapse current block
Ctrl++ - expand current block
For Mac use Cmd instead of Ctrl key.

Automatic bookmarking of recently edited parts of a file

I'd like to quickly see "hot" positions of the file I have been recently edited, so I can quickly jump between them without inserting manual bookmarks.
Does Aptana offer this kind of feature?
Are there any Eclipse plug-ins doing this?
Eclipse does it (I am running 3.7.1):
Window->Prefs->General->Editors->Text Editors->Quick Diff
(or just type quick diff into the preference page search)
Enable quick diff, show differences in rulers - you can change the colours to make it more visible.
Another possibility is utilizing Mylyn. Just activate a task and a context will automatically be created that tracks changes on a method level, even highlighting important changes in bold. You can switch off the "focusing" (i.e. only showing the active and edited classes / ressources) in the project / explorer view if that annoys you. But Mylyn is a little more intensive, it only shows its full potential with a little bit of familiarisation.

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with PyDev.
EditBox since v0.0.20 is fixed for support Pydev. Thanks for reporting this. Some default preferences for Python included now, but you are welcomed to share yours here.
This can be achieved this is EditBox.
With some customization through it's preferences you can get to some nice code blocks highlighting of python code (or any other where blocks are signified with whitespace).
It is highly customizable and can achieve the vertical rules codekana style, and various other layouts.
The problem is it doesn't work on PyDev editor from what I see (at least for now). I've opened a feature request for it.
If it's any good, you can still view it's layout when opening a python file with right click "Open With/Text editor". From version 0.20, EditBox fully supports PyDev.
I also tried AnyEdit which has some whitespace highlighting amongst other features, but was not too happy with the results. For example, I had to press they're "show whitespace" button after each change to show the background, and it's not very visually pleasing (it uses eclipse's annotations to highlight whitespace).
IndentGuide is a plugin that does this for Eclipse. I am not sure whether it works for PyDev though.
The closest approximation would be to combine:
showing the whitespace characters (which shows tabs and spaces, but not just tabs)
code folding (available with PyDev)

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