Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315659 - Occurrence marker problem
Summary: Occurrence marker problem
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: IMP (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Robert M. Fuhrer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 15:40 EDT by Zoltan Ujhelyi CLA
Modified: 2014-01-09 15:04 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Ujhelyi CLA 2010-06-03 15:40:33 EDT
Build Identifier: 20100527-0614

I created an occurence marker for an IMP editor (IMP platform version: 0.1.106.v201004212015) as described in the PIMP your Eclipse tutorial, but my code was not working.

When placing a breakpoint at the start of the getOccurences() method, it did not pause the execution on selection changes. On the other hand, when the IMP editor got activated (e.g. switching to another editor then back), the breakpoint activates.

I think, the getOccurences() method should be called for every selection change of the universal editor.

Reproducible: Always
Comment 1 Robert M. Fuhrer CLA 2010-06-04 10:21:09 EDT
You're right, getOccurrences() should certainly be called for every selection change, and there's code to do precisely that. Presumably something got messed up in the enablement logic of the selection listener.
Comment 2 Robert M. Fuhrer CLA 2010-06-04 11:25:36 EDT
Just a quick sanity check: you did click on the "Toggle Mark Occurrences" button to enable the mode, didn't you?

I ask because I just did a quick test on the toy LEG language, and mark occurrences behaves as expected there.
Comment 3 Zoltan Ujhelyi CLA 2010-06-04 11:30:31 EDT
That was the error. As this function is always enabled in my host Eclipse since about 2 years, I completely forgotten about that toolbar button.

Thank you for your help.
Comment 4 Robert M. Fuhrer CLA 2010-06-04 11:55:10 EDT
No problem... glad it wasn't actually a bug. :-)

Though your getOccurrences() method probably also shouldn't be called at all if the mode is disabled. I'll have to look into that.