Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » eclipse debugger: current instruction pointer problem.
eclipse debugger: current instruction pointer problem. [message #531790] Thu, 06 May 2010 08:26 Go to next message
popjxc is currently offline popjxcFriend
Messages: 36
Registered: March 2010
Member
Hi, all:

I am using the debug api to make a eclipse debugger, and my editor extends TextEditor.

But now there are some problem about the debug annotation, that is during the debug time, a green line and a pointer can point to the current source code line. In my situation, when step over, the pointer could move line by line fine, but the green highlight could not refresh itself, user need to click on that line, then it display. When step over again, the pointer move to next line, but the green highlight do not move at all, if I gives some clicks to these lines, the old green disappear, the new green will come out at the right line.

And I try my debugger in other editor, it works fine in TextEditor. I think it is the problem of my editor.
Does I miss something? Could anybody give some suggestion?

PS: my eclipse version is 3.5.0

Thanks to everyone~

A picture of my problem:
http://dl.javaeye.com/upload/picture/pic/61791/1d21f115-247c-368e-8578-f1c1ab5948ac.jpg

[Updated on: Tue, 11 May 2010 09:12]

Report message to a moderator

Re: eclipse debugger: current instruction pointer problem. [message #532798 is a reply to message #531790] Tue, 11 May 2010 09:27 Go to previous messageGo to next message
popjxc is currently offline popjxcFriend
Messages: 36
Registered: March 2010
Member
Hello~

I try it myself several days, still doesn't find the reason.

I used those method to affect UI,

after step over (F6):
fireResumeEvent(DebugEvent.STEP_OVER);
fireSuspendEvent(DebugEvent.STEP_END);

after resume (F8):
fireResumeEvent(DebugEvent.CLIENT_REQUEST);
fireSuspendEvent(DebugEvent.BREAKPOINT); //if resume to breakpoint
fireResumeEvent(DebugEvent.RESUME);// else if resume to the end

Does those Fire Events enough?
Re: eclipse debugger: current instruction pointer problem. [message #533038 is a reply to message #532798] Wed, 12 May 2010 03:45 Go to previous messageGo to next message
popjxc is currently offline popjxcFriend
Messages: 36
Registered: March 2010
Member
I debug eclipse source, but I am not sure which code snippet could display that green background, because those code run in a UI thread, so the UI block during I debug.

and in the Class: "SourceLookupFacility", "display" method, I find the following code snippet:

positionEditor(textEditor, frame);
InstructionPointerManager.getDefault().removeAnnotations(textEditor); 
Annotation annotation = fPresentation.getInstructionPointerAnnotation(textEditor, frame);

InstructionPointerManager.getDefault().addAnnotation(textEditor, frame, annotation);


Does those code enough to display both instruction pointer and the green background?

Thanks to everyone.
Re: eclipse debugger: current instruction pointer problem. [message #533454 is a reply to message #533038] Fri, 14 May 2010 02:12 Go to previous messageGo to next message
popjxc is currently offline popjxcFriend
Messages: 36
Registered: March 2010
Member
Oh~
I found that if turn on "Show Whitespace Characters" action from toolbar, everything perform OK.

I think that action may refresh something, I will try to find it out.
Re: eclipse debugger: current instruction pointer problem. [message #533462 is a reply to message #533454] Fri, 14 May 2010 05:51 Go to previous message
popjxc is currently offline popjxcFriend
Messages: 36
Registered: March 2010
Member
hoo~

I write a PaintListener to refresh the current debug line just like the "Show Whitespace Characters" does. It seems OK now.

Though not a good way, but better than nothing.
Previous Topic:How to Hide import/export function in context menu
Next Topic:Updating images in view in background
Goto Forum:
  


Current Time: Sun Nov 23 20:00:58 GMT 2014

Powered by FUDForum. Page generated in 0.01818 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software