Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » is there a way to manually build xcore instead of automatic build when something changes?
is there a way to manually build xcore instead of automatic build when something changes? [message #989545] Thu, 06 December 2012 11:50 Go to next message
Michael Scharf is currently offline Michael Scharf
Messages: 298
Registered: July 2009
Senior Member
Hi,

is there a way to turn off automatic code generation in
xcore? I want to do code generation on demand, like with
the old genmodel.


Michael

--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: is there a way to manually build xcore instead of automatic build when something changes? [message #989640 is a reply to message #989545] Fri, 07 December 2012 02:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25910
Registered: July 2009
Senior Member
Michael,

Although you could remove the builder from the .project file (which
would affect all the Xtext-built things, such as .xtend files, as well)
there's no menu action for manual builds.

Why do you want this?


On 06/12/2012 5:50 PM, Michael Scharf wrote:
> Hi,
>
> is there a way to turn off automatic code generation in
> xcore? I want to do code generation on demand, like with
> the old genmodel.
>
>
> Michael
>
Re: is there a way to manually build xcore instead of automatic build when something changes? [message #989823 is a reply to message #989640] Fri, 07 December 2012 21:52 Go to previous messageGo to next message
Michael Scharf is currently offline Michael Scharf
Messages: 298
Registered: July 2009
Senior Member
Ed,

> Although you could remove the builder from the .project file
> (which would affect all the Xtext-built things, such as .xtend
> files, as well) there's no menu action for manual builds.
>
> Why do you want this?

I am saving quite often and the constant re-generation
takes time because in some cases a lot of files get
re-generated and re-build.

I can switch off auto-build but that affects everything.

The other problem is that when I switch branches in git,
and the xcore file has changed, it regenerates a lot of
files and that costs time and in some cases it looses
some manually added annotations or it does import xxx*
which makes the files appear to be different.

The manual generation makes sure stuff is only generated
when you want it to be generated. The potential danger is
that things are out of sync -- but I can live with that...

Michael

>
> On 06/12/2012 5:50 PM, Michael Scharf wrote:
>> Hi,
>>
>> is there a way to turn off automatic code generation in
>> xcore? I want to do code generation on demand, like with
>> the old genmodel.
>>
>>
>> Michael
>>
>


--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: is there a way to manually build xcore instead of automatic build when something changes? [message #989834 is a reply to message #989823] Sat, 08 December 2012 01:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25910
Registered: July 2009
Senior Member
Michael,

Comments below.

On 08/12/2012 3:52 AM, Michael Scharf wrote:
> Ed,
>
>> Although you could remove the builder from the .project file
> > (which would affect all the Xtext-built things, such as .xtend
>> files, as well) there's no menu action for manual builds.
>>
>> Why do you want this?
>
> I am saving quite often and the constant re-generation
> takes time because in some cases a lot of files get
> re-generated and re-build.
It happens in the background though, and Java does the same...
>
> I can switch off auto-build but that affects everything.
>
> The other problem is that when I switch branches in git,
> and the xcore file has changed, it regenerates a lot of
> files and that costs time
On a background thread and Java does the same...
> and in some cases it looses
> some manually added annotations
I'd like to know about such cases. As far as I know, annotations are
never removed.
> or it does import xxx*
> which makes the files appear to be different.
You'd have all these problems even if you manually generated though.
>
> The manual generation makes sure stuff is only generated
> when you want it to be generated. The potential danger is
> that things are out of sync -- but I can live with that...
It seems a bit questionable. Perhaps there are bugs that are
problematic, but it's rare to see someone say they don't want JDT's
incremental compiler helping them, so have to wonder why this is
different and would rather address those specific issues.
>
> Michael
>
>>
>> On 06/12/2012 5:50 PM, Michael Scharf wrote:
>>> Hi,
>>>
>>> is there a way to turn off automatic code generation in
>>> xcore? I want to do code generation on demand, like with
>>> the old genmodel.
>>>
>>>
>>> Michael
>>>
>>
>
>
Re: is there a way to manually build xcore instead of automatic build when something changes? [message #989892 is a reply to message #989834] Sun, 09 December 2012 10:31 Go to previous messageGo to next message
Michael Scharf is currently offline Michael Scharf
Messages: 298
Registered: July 2009
Senior Member
Hi Ed,


> I'd like to know about such cases. As far as I know, annotations are never removed.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=396142

>> or it does import xxx*
>> which makes the files appear to be different.
> You'd have all these problems even if you manually generated though.

Yes, but then I can control it. When I edit the model, I don't care.
But before I check in my changes, I want to be sure my workspace is
warning free. It is a matter of seconds ti fix this with quick-fixes.

But when I don't change the model, but simply check out some
version form git/svn, I don't want my workspace to change.

Michael

On 08.12.2012 07:06, Ed Merks wrote:
> Michael,
>
> Comments below.
>
> On 08/12/2012 3:52 AM, Michael Scharf wrote:
>> Ed,
>>
>>> Although you could remove the builder from the .project file
>> > (which would affect all the Xtext-built things, such as .xtend
>>> files, as well) there's no menu action for manual builds.
>>>
>>> Why do you want this?
>>
>> I am saving quite often and the constant re-generation
>> takes time because in some cases a lot of files get
>> re-generated and re-build.
> It happens in the background though, and Java does the same...
>>
>> I can switch off auto-build but that affects everything.
>>
>> The other problem is that when I switch branches in git,
>> and the xcore file has changed, it regenerates a lot of
>> files and that costs time
> On a background thread and Java does the same...
>> and in some cases it looses
>> some manually added annotations
> I'd like to know about such cases. As far as I know, annotations are never removed.
>> or it does import xxx*
>> which makes the files appear to be different.
> You'd have all these problems even if you manually generated though.
>>
>> The manual generation makes sure stuff is only generated
>> when you want it to be generated. The potential danger is
>> that things are out of sync -- but I can live with that...
> It seems a bit questionable. Perhaps there are bugs that are problematic, but it's rare to see someone say they don't want JDT's incremental compiler helping them, so have to wonder why this is different and would rather address those
> specific issues.
>>
>> Michael
>>
>>>
>>> On 06/12/2012 5:50 PM, Michael Scharf wrote:
>>>> Hi,
>>>>
>>>> is there a way to turn off automatic code generation in
>>>> xcore? I want to do code generation on demand, like with
>>>> the old genmodel.
>>>>
>>>>
>>>> Michael
>>>>
>>>
>>
>>
>


--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: is there a way to manually build xcore instead of automatic build when something changes? [message #989925 is a reply to message #989892] Mon, 10 December 2012 00:48 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25910
Registered: July 2009
Senior Member
Michael,

Comments below.

On 09/12/2012 4:31 PM, Michael Scharf wrote:
> Hi Ed,
>
>
> > I'd like to know about such cases. As far as I know, annotations
> are never removed.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=396142
As I mentioned in that bug, merging doesn't look into method bodies and
initializers so if you want to change those, you have to mark them
@generate not.
>
> >> or it does import xxx*
> >> which makes the files appear to be different.
> > You'd have all these problems even if you manually generated though.
>
> Yes, but then I can control it. When I edit the model, I don't care.
> But before I check in my changes, I want to be sure my workspace is
> warning free. It is a matter of seconds ti fix this with quick-fixes.
Given you're checking in generated source, shouldn't you also check that
the model is properly generated?
>
> But when I don't change the model, but simply check out some
> version form git/svn, I don't want my workspace to change.
It will only change if you've checked in generated source that when
regenerated changes; you should avoid doing that.
>
> Michael
>
> On 08.12.2012 07:06, Ed Merks wrote:
>> Michael,
>>
>> Comments below.
>>
>> On 08/12/2012 3:52 AM, Michael Scharf wrote:
>>> Ed,
>>>
>>>> Although you could remove the builder from the .project file
>>> > (which would affect all the Xtext-built things, such as .xtend
>>>> files, as well) there's no menu action for manual builds.
>>>>
>>>> Why do you want this?
>>>
>>> I am saving quite often and the constant re-generation
>>> takes time because in some cases a lot of files get
>>> re-generated and re-build.
>> It happens in the background though, and Java does the same...
>>>
>>> I can switch off auto-build but that affects everything.
>>>
>>> The other problem is that when I switch branches in git,
>>> and the xcore file has changed, it regenerates a lot of
>>> files and that costs time
>> On a background thread and Java does the same...
>>> and in some cases it looses
>>> some manually added annotations
>> I'd like to know about such cases. As far as I know, annotations are
>> never removed.
>>> or it does import xxx*
>>> which makes the files appear to be different.
>> You'd have all these problems even if you manually generated though.
>>>
>>> The manual generation makes sure stuff is only generated
>>> when you want it to be generated. The potential danger is
>>> that things are out of sync -- but I can live with that...
>> It seems a bit questionable. Perhaps there are bugs that are
>> problematic, but it's rare to see someone say they don't want JDT's
>> incremental compiler helping them, so have to wonder why this is
>> different and would rather address those
>> specific issues.
>>>
>>> Michael
>>>
>>>>
>>>> On 06/12/2012 5:50 PM, Michael Scharf wrote:
>>>>> Hi,
>>>>>
>>>>> is there a way to turn off automatic code generation in
>>>>> xcore? I want to do code generation on demand, like with
>>>>> the old genmodel.
>>>>>
>>>>>
>>>>> Michael
>>>>>
>>>>
>>>
>>>
>>
>
>
Previous Topic:Getting FreeMarker to Wrap EMap as SimpleHash instead of SimpleSequence?
Next Topic:[CDO] CDOStaleReferencePolicy.PROXY vs bind method
Goto Forum:
  


Current Time: Tue Jul 22 15:35:44 EDT 2014

Powered by FUDForum. Page generated in 0.02618 seconds