Deal with a pop-up window of a plug-in in Eclipse - java

I'm using a plug-in in Eclipse. This plug-in provides a feature to the Eclipse menu (when I right-click). I would like to capture the value that a user selects. Is there anyway in Java to do that since this added feature is not added by my project but by the plug-in ?

you can use the debugger feature in eclispe.. set toggle points and run the application in debugger mode.. this way you can trace the values coming in after each statement is executed..
Check this image
Eclipse debugger http://s19.postimage.org/6x3yy8a43/eclipseimage.png
The blue dot refers the toggle breakpoint.. use the mouse left click to place it on the statement u like... and run the project in debugger mode see top of the image..
press F6 to execute next statement in the debugger mode
Hope this helps
Cheers

Related

Eclipse debugger hover produces empty box, no variable value

I'm debugging a Java (Android) application in Eclipse Indigo. In the debug perspective, if I'm stopped at a breakpoint, when I hover over a variable to see its value it displays a blank, white box (where I assume the variable's value is supposed to appear?) but with no content. It does not seem to matter what kind of a variable it is, local or class-scope, static or instance, the box is just as blank.
I can see the variables I need to see in the variables tab of the debugger perspective, but it would be a lot more convenient to see them by hovering.
In Preferences>Java>Editor>Hovers I've tried it with both Variable Values and Combined Hover with no improvement. I'm running on Windows 7, if that matters.
N.B. I have read this thread: Eclipse: Hover broken in debug perspective
Try to hit the restore defaults as described in Eclipse: Hover broken in debug perspective. Make sure to stop your debug run and restart.
You might also check Eclipse's Debug view documentation.
Try refactoring a package in your project then trying it again.
Could also be a bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=357127
Which version are you using?
I am seeing the same thing on Ubuntu. I am using the program VcXSrv on my Windows 10 system to get program windows from Ubuntu.
I had to turn off The 'Native opengl' option in the XLauncher when starting VcXSrv to get the hover text to appear.

Is there a way to use breakpoint in eclipse android, the same we use breakpoint in Visual Studio or Netbeans?

I have tried to use breakpoint in the same way we use break point in Visual Studio or Netbeans, we simply mark the break point and when statement executes, the breakpoint highlights and we can see the values in respective data structure or variable using breakpoint explore.
As far as i have used eclipse, i have found break point is there too, but it is not in that way, means on runtime it does not pick the respective point and neither i can see values nor the application works perfectly while doing that. Is it not possible in eclipse or some tool is required, or i am wrong, please guide.
Ctrl+Shift+B while on the line.
Double click on the left most bar in Editor View.
Right click > Toggle Breakpoints on the left most bar in Editor View.
put a breakpoint at you code line you want,
then right click on project-> debug as -> android application
then go to window menu -> show view -> other... -> debug
or as show bellow
You must set a breakpoint and run the application in debug mode.
You have to launch application in Debug Mode. You can find Debug button left to Run button. It has bug as an icon.
Also could be useful: Setting up a Device for Development. It describes how to enable debugging on your device

How Can I see debug perspective in Eclipse?

I would like to know how to see result of variables without dump to console. Thanks to all.
You must start your program in debug mode (F11 instead of Ctrl-F11 on Windows).
If Eclipse does not automatically switch to the Debug perspective, you can locate it manually in the Window entry on the menu bar or by clicking the Choose Perspective button (a button with a plus on it) in the upper right corner of the Eclipse window under the menu bar line.
EDIT: There is a quick tutorial on how to do this in Eclipse (on Linux, but it should be very similar on other platforms) at http://www.vogella.com/tutorials/EclipseDebugging/article.html
Open the Debug Perspective and click on the Variables View.

Eclipse + breakpoints = nothing happens

I'm trying to use Breakpoints in Eclipse, but when I set them - nothing happens.
Really.
For example in MVS when the program reachs breakpoint it stopps and I can see variables.
How to use breakpoints in Eclipse in the same way?
you need to be debugging the program, click the little bug next to the run button instead of said run button
First select Debug perspective as:
Then set Breakpoints at places you want:
After that create a Debug configuration via Debug As->Debug Configurations... and then Debug as Android Application as shown below:
Then in Debug perspective you can trace/watch value of your desired variable by pressing F8:
That's it, you can also evaluate expressions through Expressions view. If it is not enabled select it from:
Window->Show View->Other->Debug->Expressions.

Clearing coverage highlighting in Eclipse

After running coverage reports in Eclipse (using cobertura or an EMMA plugin), my source code files get highlighted in green, red and yellow depending on which lines of code were covered by tests.
How can I clear this highlighting after I'm done?
Click the "Remove all Sessions" button in the toolbar of the "Coverage" view.
On 4.2 eclipse it seems to be impossible to remove the eCobertura highlights. Sadly eCobertura plugins seems to be not maintained anymore. However if you start writing into the class, its gone. So type a space, and then undo, and its gone.
For people who are not able to find the coverage view , follow these steps :
Go to Windows Menu bar > Show View > Other > Type coverage and open it.
Click on Coverage.
To clear highlightings, click on X or XX icon as per convenience.
I found a workaround over on GitHub: https://github.com/jmhofer/eCobertura/issues/8
For those who don't want to click the link, here's the text of the comment:
Good workaround:
Create a run configuration with a filter, that excludes everything ("*") and let it run just a single test. Name it "Undo coverage".
I did this and it worked quite well in Eclipse Juno.
Credit for this goes to UsulSK.
If you remove the coverage session, also the coverage coloring will disappear. For this, hit Remove Session or Remove All Sessions in the Coverage view's toolbar.
http://eclemma.org/faq.html
For those using Cobertura and only have the Coverage Session View like I do,just try closing Eclipse and starting it up again. This got rid of the highlighting for me.
Added shortcut Ctrl+Shift+X C to Keybindings (Window -> Preferences -> filter for Keys) when 'Editing Java Source' for 'Remove Active Session'.
If you would like to remove active session/project/folder then you can follow
Click the "Remove Active Session" button in the toolbar of the "Coverage" view.
I have used the Open Clover Tool for the code coverage, I have also been searching this for a long time.
Its pretty straightforward, in the Coverage Explorer tab, you can find three square buttons which says the code lines you wanted to display, click on hide the coverage square box and its gone. Last button in the image below:
Close the IDE and open it again. This works if you did not use any code coverage tools and have just clicked the basic "Coverage" icon in the IDE.

Categories