Community
Participate
Working Groups
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
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.
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.
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.
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.