Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Refreshing project dependencies programmatically
Refreshing project dependencies programmatically [message #1831984] Fri, 04 September 2020 08:13 Go to next message
Alexandra Tritean is currently offline Alexandra TriteanFriend
Messages: 6
Registered: March 2020
Junior Member
Hello,

Is there a way to refresh the project dependencies programmatically?

I will try to explain in a more detailed manner my concern.
I have two maven projects, local-calcParentName-calc-calcModuleName-1.0.0 and local-calcParentName-model-1.0.0, where the second one is a [maven] dependency of the first one, both having version 1.0.0.
The files used from local-calcParentName-model-1.0.0 in local-calcParentName-calc-calcModuleName-1.0.0 will appear as project dependencies.
Now, when changing the version of the dependency to 2.0.0, I will end up with project dependencies from both versions, as you can see in the attached picture.
So, therefore my question, is there a way to force a refresh/update on those dependencies?
I tried a couple of things, such as removing/adding modeling nature, trying to refresh/resolve the resource set of the current Sirius session, but couldn't find anything.
If is not possible, do you think that ending up in this situation may have any side effects on the functionality?

Thank you!

Kind Regards,

Alexandra
  • Attachment: Capture.PNG
    (Size: 21.58KB, Downloaded 9 times)
Re: Refreshing project dependencies programmatically [message #1831992 is a reply to message #1831984] Fri, 04 September 2020 09:52 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 173
Registered: October 2014
Senior Member
Hello

If it is only a UI issue, I guess just clicking F5 should refresh properly your tree.
If it is the case and you want to do that programmatically, then you may use the eclipse API to refresh eclipse resources
get the modeling project and then call org.eclipse.core.resources.IResource.refreshLocal(int, IProgressMonitor) (the modeling project is a IResource)

best regards


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Open sirius PropertySheet from a Table editor
Next Topic:Set selected value via button press.
Goto Forum:
  


Current Time: Thu Oct 22 08:08:39 GMT 2020

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

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

Back to the top