Skip to main content



      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 07:45 Go to next message
Eclipse UserFriend
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 08:14 Go to previous messageGo to next message
Eclipse UserFriend
hi you have to move own fragments to a separate bundle that is built first
Re: building my project from scratch doesn't work [message #1710805 is a reply to message #1710803] Fri, 09 October 2015 08:25 Go to previous messageGo to next message
Eclipse UserFriend
@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 16:21 Go to previous messageGo to next message
Eclipse UserFriend
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 08:09 Go to previous messageGo to next message
Eclipse UserFriend
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 08:12 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: building my project from scratch doesn't work [message #1717997 is a reply to message #1717993] Fri, 18 December 2015 08:26 Go to previous messageGo to next message
Eclipse UserFriend
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 08:58 Go to previous messageGo to next message
Eclipse UserFriend
Hi i dont understand that. You dont have to do a clean build. Eclipse will pick up the fragment fron the other project.
Re: building my project from scratch doesn't work [message #1718024 is a reply to message #1718004] Fri, 18 December 2015 10:44 Go to previous messageGo to next message
Eclipse UserFriend
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 10:49 Go to previous messageGo to next message
Eclipse UserFriend
Cany you share a sample project thst reflects your setup
Re: building my project from scratch doesn't work [message #1718028 is a reply to message #1718026] Fri, 18 December 2015 10:53 Go to previous message
Eclipse UserFriend
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: Wed Jul 16 19:03:30 EDT 2025

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

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

Back to the top