Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » "Mark occurrences" service in IMP
"Mark occurrences" service in IMP [message #511708] Tue, 02 February 2010 15:51 Go to next message
Margus Freudenthal is currently offline Margus Freudenthal
Messages: 12
Registered: February 2010
Junior Member
Hi again,

now I am stuck with implementing the "mark occurrences" service. For some reason, the service is only called once, when the DSL file is opened. If I navigate around the file, the service is not called again to update the occurrence display. I am using IMP language meta-tooling 0.1.96 and IMP runtime 0.1.102 (downloaded from the update site). Does this functionality work in the release or should I check out the SVN version?


Margus
Re: "Mark occurrences" service in IMP [message #516717 is a reply to message #511708] Wed, 24 February 2010 21:30 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. Fuhrer
Messages: 294
Registered: July 2009
Senior Member
On 2/2/10 10:51 AM, Margus Freudenthal wrote:
> Hi again,
>
> now I am stuck with implementing the "mark occurrences" service. For
> some reason, the service is only called once, when the DSL file is
> opened. If I navigate around the file, the service is not called again
> to update the occurrence display. I am using IMP language meta-tooling
> 0.1.96 and IMP runtime 0.1.102 (downloaded from the update site). Does
> this functionality work in the release or should I check out the SVN
> version?

Hi there,

[Terribly sorry for not getting back to you sooner... my Thunderbird
install got mucked up and it took a while to get it back and healthy.]

This should work as you expect in the latest releases (e.g. the ones
available on the update site). In particular, I think it should be
working in 0.1.102, though there are newer versions available.

Is there anything in the Error Log that might indicate what's happening?

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: "Mark occurrences" service in IMP [message #517108 is a reply to message #516717] Fri, 26 February 2010 09:45 Go to previous messageGo to next message
Margus Freudenthal is currently offline Margus Freudenthal
Messages: 12
Registered: February 2010
Junior Member
Quote:

This should work as you expect in the latest releases (e.g. the ones
available on the update site). In particular, I think it should be
working in 0.1.102, though there are newer versions available.



I upgraded to 0.1.103 yesterday and the problem persists.

Quote:

Is there anything in the Error Log that might indicate what's happening?



No, there are no errors reported. I played with it today and noticed:
* If the mark occurrences service is called, the SourcePositionLocator is called for each of the returned nodes (and it returns correct answer). However, nothing is highlighted. Maybe it is just using colors black on white for highlighting matches?
* When I move the cursor around in the file, the mark occurrences service is not called.
* However, if I switch between different tabs in Eclipse (for example, click on the outline view and click back on the editor), then the mark occurrences service is called again.

Since I implemented the occurrence service from scratch, I am not very sure that I did everything correctly (maybe the runtime makes some additional assumptions that I do not fullfill).


Margus
Re: "Mark occurrences" service in IMP [message #517218 is a reply to message #517108] Fri, 26 February 2010 15:24 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. Fuhrer
Messages: 294
Registered: July 2009
Senior Member
On 2/26/10 4:45 AM, Margus Freudenthal wrote:
> Quote:
>> This should work as you expect in the latest releases (e.g. the ones
>> available on the update site). In particular, I think it should be
>> working in 0.1.102, though there are newer versions available.
>
>
> I upgraded to 0.1.103 yesterday and the problem persists.
>
> Quote:
>> Is there anything in the Error Log that might indicate what's happening?
>
>
> No, there are no errors reported. I played with it today and noticed:
> * If the mark occurrences service is called, the SourcePositionLocator
> is called for each of the returned nodes (and it returns correct
> answer). However, nothing is highlighted. Maybe it is just using colors
> black on white for highlighting matches?

The highlighting should be a fairly noticeable color (green-ish, IIRC).
But it certainly does sound as though either it's not getting as far as
applying the text attributes, or the attributes got messed up somehow.

> * When I move the cursor around in the file, the mark occurrences
> service is not called.

Hmmm... that shouldn't be; needless to say, it should recompute the
occurrence set each time the text selection changes.

I'll take a look at the latest code and see what sort of behavior I get.

At any rate, sorry for the troubles, and thanks for the info!

> * However, if I switch between different tabs in Eclipse (for example,
> click on the outline view and click back on the editor), then the mark
> occurrences service is called again.
>
> Since I implemented the occurrence service from scratch, I am not very
> sure that I did everything correctly (maybe the runtime makes some
> additional assumptions that I do not fullfill).

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: "Mark occurrences" service in IMP [message #559348 is a reply to message #511708] Thu, 16 September 2010 13:01 Go to previous message
Margus Freudenthal is currently offline Margus Freudenthal
Messages: 12
Registered: February 2010
Junior Member
Hello again,

I experimented a bit with the latest IMP version from the update site. When I select the "Mark Occurrences" button on the toolbar, the mark occurrences service is called and occurrences are highlighted in green. However, when I move the cursor, the markings do not move -- the service is not called again and the highlighting also stays. When I deselect-select the mark occurrences button, the service is called and the highlighting moves to cursor. Interestingly, when I click between editor windows, the highlighting is again performed, but old highlighting also remains present. See the screenshot below for example of this cumulative marking.

Does this service work normally for other people? Given that I used custom ANTLR-based parser to implement language, can this be problem in my implementation?

http://keeks.cyber.ee/~margus/mark-occurrences-screenshot.png


Margus
Re: "Mark occurrences" service in IMP [message #577453 is a reply to message #516717] Fri, 26 February 2010 09:45 Go to previous message
Margus Freudenthal is currently offline Margus Freudenthal
Messages: 12
Registered: February 2010
Junior Member
Quote:
> This should work as you expect in the latest releases (e.g. the ones
> available on the update site). In particular, I think it should be
> working in 0.1.102, though there are newer versions available.


I upgraded to 0.1.103 yesterday and the problem persists.

Quote:
> Is there anything in the Error Log that might indicate what's happening?


No, there are no errors reported. I played with it today and noticed:
* If the mark occurrences service is called, the SourcePositionLocator is called for each of the returned nodes (and it returns correct answer). However, nothing is highlighted. Maybe it is just using colors black on white for highlighting matches?
* When I move the cursor around in the file, the mark occurrences service is not called.
* However, if I switch between different tabs in Eclipse (for example, click on the outline view and click back on the editor), then the mark occurrences service is called again.

Since I implemented the occurrence service from scratch, I am not very sure that I did everything correctly (maybe the runtime makes some additional assumptions that I do not fullfill).

--
Margus


Margus
Re: "Mark occurrences" service in IMP [message #577475 is a reply to message #577453] Fri, 26 February 2010 15:24 Go to previous message
Robert M. Fuhrer is currently offline Robert M. Fuhrer
Messages: 294
Registered: July 2009
Senior Member
On 2/26/10 4:45 AM, Margus Freudenthal wrote:
> Quote:
>> This should work as you expect in the latest releases (e.g. the ones
>> available on the update site). In particular, I think it should be
>> working in 0.1.102, though there are newer versions available.
>
>
> I upgraded to 0.1.103 yesterday and the problem persists.
>
> Quote:
>> Is there anything in the Error Log that might indicate what's happening?
>
>
> No, there are no errors reported. I played with it today and noticed:
> * If the mark occurrences service is called, the SourcePositionLocator
> is called for each of the returned nodes (and it returns correct
> answer). However, nothing is highlighted. Maybe it is just using colors
> black on white for highlighting matches?

The highlighting should be a fairly noticeable color (green-ish, IIRC).
But it certainly does sound as though either it's not getting as far as
applying the text attributes, or the attributes got messed up somehow.

> * When I move the cursor around in the file, the mark occurrences
> service is not called.

Hmmm... that shouldn't be; needless to say, it should recompute the
occurrence set each time the text selection changes.

I'll take a look at the latest code and see what sort of behavior I get.

At any rate, sorry for the troubles, and thanks for the info!

> * However, if I switch between different tabs in Eclipse (for example,
> click on the outline view and click back on the editor), then the mark
> occurrences service is called again.
>
> Since I implemented the occurrence service from scratch, I am not very
> sure that I did everything correctly (maybe the runtime makes some
> additional assumptions that I do not fullfill).

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Previous Topic:"Mark occurrences" service in IMP
Next Topic:Proposed change to ILanguageSyntaxProperties
Goto Forum:
  


Current Time: Wed Oct 22 00:13:28 GMT 2014

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

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