Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » building my project from scratch doesn't work
building my project from scratch doesn't work [message #1710800] Fri, 09 October 2015 11:45 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Hi!

I have a project where I define my own ScopeFragment. The associated class refers to classes in the model, but these don't exist when building from scratch so the build fails.

If I comment out the Scopefragment in the mwe2, run it then remove the comment and run the workflow again, then it works. But it doesn't feel like it should be like this (if in the future a new maintainer gets in and I'm gone from the project, they won't understand why they can't build).

Is there some way to go around this issue?

best regards,
Vlad
Re: building my project from scratch doesn't work [message #1710803 is a reply to message #1710800] Fri, 09 October 2015 12:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi you have to move own fragments to a separate bundle that is built first

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: building my project from scratch doesn't work [message #1710805 is a reply to message #1710803] Fri, 09 October 2015 12:25 Go to previous messageGo to next message
Stefan Oehme is currently offline Stefan OehmeFriend
Messages: 159
Registered: April 2010
Location: Kiel
Senior Member

@Christian Vlad's problem is that his Fragment has hard references on the model classes of his language

@Vlad If there's not too many references, then using String constants would be the simplest thing. Or if the code is more generic, you can access the Grammar and generate code for each rule, like the ContentAssistFragment does
Re: building my project from scratch doesn't work [message #1710860 is a reply to message #1710805] Fri, 09 October 2015 20:21 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Thank you very much, I'll check ContentAssistFragment.

/Vlad
Re: building my project from scratch doesn't work [message #1717992 is a reply to message #1710860] Fri, 18 December 2015 13:09 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Hi!

It's been a while since I asked this, but I've been sidetracked. I still have some things that I'm confused about.

When I do a clean ckeckout from my repo, if I generate the language infrastructure, the mwe2 script complains that it can't find my ScopingFragment. I need to do a clean rebuild of the project (even though 'build automatically' was enabled) and then generate. Is this to be expected? Can I ensure somehow that the project is built before generating?

While it's not a very big deal when building manually, I am worried that when I finally get around to implementing the headless build, this issue will create problems...

best regards,
Vlad
Re: building my project from scratch doesn't work [message #1717993 is a reply to message #1717992] Fri, 18 December 2015 13:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
As i said. You have to move the fragment to a own module that has to be uilt first.
Then add a dependeny from the module with the workflow to the module with the fragment


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: building my project from scratch doesn't work [message #1717997 is a reply to message #1717993] Fri, 18 December 2015 13:26 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Yes, but in Eclipse I still need to do a clean build to make sure that the fragment plugin is built. I suppose that having a differnet plugin will help in the headless case, which is the important thing.
Thanks and merry Christmas!
/Vlad
Re: building my project from scratch doesn't work [message #1718004 is a reply to message #1717997] Fri, 18 December 2015 13:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi i dont understand that. You dont have to do a clean build. Eclipse will pick up the fragment fron the other project.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: building my project from scratch doesn't work [message #1718024 is a reply to message #1718004] Fri, 18 December 2015 15:44 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Well, what happens for me is that after "git clean -fdx", I refresh all workspace, then start the mwe2 workflow and get "class not found MyScopeProvider". I do a clean build of the workspace and after that it works as expected. Maybe something is weird with my settings...
Re: building my project from scratch doesn't work [message #1718026 is a reply to message #1718024] Fri, 18 December 2015 15:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Cany you share a sample project thst reflects your setup

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: building my project from scratch doesn't work [message #1718028 is a reply to message #1718026] Fri, 18 December 2015 15:53 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Thank you very much Christian, I will get back to you with this if it still bugs me, but I just went on vacation Smile

I think the setup is pretty ordinary, but maybe the OS or the file system or Java are not working together nicely.

regards,
Vlad
Previous Topic:Importing EObjects from non-XText models
Next Topic:Xtext 2.5.1 installation
Goto Forum:
  


Current Time: Sat Apr 20 01:21:33 GMT 2024

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

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

Back to the top