Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » file updates and rebuilds.
file updates and rebuilds. [message #997379] Mon, 07 January 2013 09:13 Go to next message
Ronald Krijgsheld is currently offline Ronald KrijgsheldFriend
Messages: 41
Registered: November 2010
Member
Hi All,

Not sure if this the right place to ask. But, I was looking at the implementation of EclipseResourceFileSystemAccess2.generateFile() and I noticed that calling the afterFileUpdate() on the callback is always called and not only when hasContentsChanged() is there a reason for this?


thanks,

Ronald
Re: file updates and rebuilds. [message #997618 is a reply to message #997379] Mon, 07 January 2013 17:13 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 2961
Registered: July 2009
Senior Member
Am 07.01.13 10:13, schrieb Ronald Krijgsheld:
> Hi All,
>
> Not sure if this the right place to ask. But, I was looking at the
> implementation of EclipseResourceFileSystemAccess2.generateFile() and I
> noticed that calling the afterFileUpdate() on the callback is always
> called and not only when hasContentsChanged() is there a reason for this?
>
>
> thanks,
>
> Ronald

It's used to keep track of files that will be regenerated, or in other
words: The callback helps to get rid of stale, generated files. Why are
you asking?

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: file updates and rebuilds. [message #997619 is a reply to message #997618] Tue, 08 January 2013 10:03 Go to previous message
Ronald Krijgsheld is currently offline Ronald KrijgsheldFriend
Messages: 41
Registered: November 2010
Member
Hi

I was just wondering if this could cause unnecessary building.

(From the top of my head, don't have the code here)
I think the implementation of afterFileUpdate() calls
context.needRebuild(). I would expect that that is not necessary when no
changes were made.
But as I understand your answer it serves to keep the generated files
list in sync also.


Thanks,

Ronald

BTW. your answer did not show up in the forum. But I think that is a
known issue.


On 7-1-2013 18:13, Sebastian Zarnekow wrote:
> Am 07.01.13 10:13, schrieb Ronald Krijgsheld:
>> Hi All,
>>
>> Not sure if this the right place to ask. But, I was looking at the
>> implementation of EclipseResourceFileSystemAccess2.generateFile() and I
>> noticed that calling the afterFileUpdate() on the callback is always
>> called and not only when hasContentsChanged() is there a reason for this?
>>
>>
>> thanks,
>>
>> Ronald
>
> It's used to keep track of files that will be regenerated, or in other
> words: The callback helps to get rid of stale, generated files. Why are
> you asking?
>
> Regards,
> Sebastian
Previous Topic:Content assistant: don't show default proposal
Next Topic:how to use types defined in other Ecore files in my DSL
Goto Forum:
  


Current Time: Fri Dec 19 15:14:26 GMT 2014

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

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