Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Trigger build automatically(Trigger doGenerate from different project)
Trigger build automatically [message #1844012] Fri, 27 August 2021 08:42 Go to next message
Frä Fröhlich is currently offline Frä FröhlichFriend
Messages: 22
Registered: June 2021
Junior Member
I want to trigger the doGenerate(Resource resource, IFileSystemAccess fsa)
programmatically (Xtext-file) from a different project (graphiti-project).
The project is in the very same workspace.

The problem is: I can't get the desired resource and fsa.
My current approach is to simply run the project as below:

IProject project = null;
final IWorkspace workspace = ResourcesPlugin.getWorkspace();
project = workspace.getRoot().getFile(new Path("foo/src/block_stuff.cbctxt")).getProject();
project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);


However, this does not work and I wish I could trigger the doGenerate directly.

[Updated on: Fri, 27 August 2021 08:43]

Report message to a moderator

Re: Trigger build automatically [message #1844013 is a reply to message #1844012] Fri, 27 August 2021 08:45 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
maybe you can use the following as starting point https://dietrich-it.de/xtext/2011/10/15/xtext-calling-the-generator-from-a-context-menu/

(this is generation, no build)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 27 August 2021 08:47]

Report message to a moderator

Previous Topic:Validation method not being called
Next Topic:problems with Xtext 2.8 and Xcore 1.3.0
Goto Forum:
  


Current Time: Thu Apr 18 00:43:11 GMT 2024

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

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

Back to the top