Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Action during start of Xtext Project(Action during start of Xtext Project)
Action during start of Xtext Project [message #1741445] Thu, 25 August 2016 08:28 Go to next message
Sonia Ravindran is currently offline Sonia RavindranFriend
Messages: 16
Registered: June 2016
Junior Member
Is it possible to programmatically trigger a Clean build during the start of an XText project, when i open the project in Eclipse. However i don't want to trigger the same during save of every file.
Re: Action during start of Xtext Project [message #1741448 is a reply to message #1741445] Thu, 25 August 2016 09:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
if you open a closed project that should happen anyway. can you give more details please

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Action during start of Xtext Project [message #1741543 is a reply to message #1741448] Thu, 25 August 2016 17:46 Go to previous messageGo to next message
Sonia Ravindran is currently offline Sonia RavindranFriend
Messages: 16
Registered: June 2016
Junior Member
Thanks Christian for your quick reply.
Yes when we close and open the project eclipse automatically calls a rebuild.
However , when i open the eclipse with a already opened XText project , then eclipse skips the clean build step. So I just wanted to know whether we can some how call clean build from within our Xtext project programmatically in this case.
Re: Action during start of Xtext Project [message #1741544 is a reply to message #1741543] Thu, 25 August 2016 17:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
I do not really have an idea for that

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Action during start of Xtext Project [message #1742505 is a reply to message #1741543] Fri, 02 September 2016 13:24 Go to previous message
Akos Kitta is currently offline Akos KittaFriend
Messages: 25
Registered: November 2015
Junior Member
Sonia Ravindran wrote on Thu, 25 August 2016 17:46
Thanks Christian for your quick reply.
Yes when we close and open the project eclipse automatically calls a rebuild.
However , when i open the eclipse with a already opened XText project , then eclipse skips the clean build step. So I just wanted to know whether we can some how call clean build from within our Xtext project programmatically in this case.


Sonia,

could you please elaborate why do you need to clean and rebuild the opened projects after application startup?

By the way, if you just want to perform an arbitrary action at startup time/workbench creation, you could look into the org.eclipse.ui.startup extension point, or if you have your own org.eclipse.equinox.app.IApplication implementation, maybe you could also check the org.eclipse.ui.application.WorkbenchWindowAdvisor#postWindowOpen() method.

If you would like to programmatically trigger a build, you could use something like this:
ResourcesPlugin.getWorkspace().getRoot().getProject("yourProjectName").build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
Previous Topic:Add external Jar to Gradle Build in Eclipse
Next Topic:The method x() of type y must override a superclass method
Goto Forum:
  


Current Time: Sat Apr 20 02:55:24 GMT 2024

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

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

Back to the top