How To Move Module Dependencies Up Programmatically Follow
Does any one know how to move dependencies up (like can be done on the gui under ProjectSettings->Modules->Dependencies->Move Up (or Down).
I have be able to add modules to the library no problem, I just can't move them up in the classpath.
I have tried using Library.ModifiableModel.moveRootUp(String,OrderRootType.CLASSES), but it does not seem to do anything.
Your help is greatly appreciated.
Darren
Please sign in to leave a comment.
Hello Darren,
The correct API to use is ModuleRootManager.getInstance(module).getModifiableModel().rearrangeOrderEntries().
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks,
This did not work exactly as I wanted but it did point me in the right direction. I ended up using the rearrangeOrderEntries from the modifiableRootModel that is passed into my class (it extends JavaModuleBuilder).
Darren