Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to trigger a full re-build programmatically
How to trigger a full re-build programmatically [message #1773729] Tue, 03 October 2017 18:20 Go to next message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 124
Registered: July 2009
Senior Member
In my DSL I have a special file that represents a global library. The declarations are available to be used in any other file of my DSL without importing it, similar to package java.lang in Java. The file is currently stored in a special project the workspace. This is implemented and it works.

Now, I want to be able to override this library with a modified version. This file is stored in any project in the workspace. This is implemented as a workspace preference. I've modified the container management to use the file from the preference and ignore all other copies. That works, too.

Now to my issue:
When I change the preference to select the library file I need to re-resolve all references into the library. I tried to programmatically start a clean build, but that has no effect. Cross-references still point to the wrong library file. The problem seems to be that no file has changed in the workspace.

How I should go about implementing this?
Re: How to trigger a full re-build programmatically [message #1773732 is a reply to message #1773729] Tue, 03 October 2017 18:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
hi i am not sure if i can follow you. normal classpath changes are processed by org.eclipse.xtext.builder.impl.javasupport.ProjectClasspathChangeListener / org.eclipse.xtext.ui.util.JavaProjectClasspathChangeAnalyzer
and there is org.eclipse.xtext.builder.impl.javasupport.JdtToBeBuiltComputer

i wonder what you mean by clean build not working.
are you sure you call a fullbuild for the project.build(IncrementalProjectBuilder.FULL_BUILD, monitor)


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: How to trigger a full re-build programmatically [message #1773802 is a reply to message #1773732] Wed, 04 October 2017 19:48 Go to previous messageGo to next message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 124
Registered: July 2009
Senior Member
I tried IncrementalProjectBuilder.FULL_BUILD and CLEAN_BUILD. In the Java classpath case the .classpath file is changed. I don't have that.
Re: How to trigger a full re-build programmatically [message #1773812 is a reply to message #1773802] Thu, 05 October 2017 04:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
Canyon be more explicit what you do

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: How to trigger a full re-build programmatically [message #1773813 is a reply to message #1773812] Thu, 05 October 2017 04:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
Did you debug xtextbuilder / clusteringbuilderstate and look what's rebuilt and what not and what's the actual problem
Are you sure that this is a build problem and not a cross hyperlink problem with you Stange adaptation beeing incomplete
(Debug hyperlink helper)


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: How to trigger a full re-build programmatically [message #1773814 is a reply to message #1773813] Thu, 05 October 2017 04:27 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11585
Registered: July 2009
Senior Member
And: is this about the build or is this about the open editor ?

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Previous Topic:parse namespaced variable names
Next Topic:package declaration in runtime editor
Goto Forum:
  


Current Time: Wed Jan 17 07:41:31 GMT 2018

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

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