Exception trying to modify OrderEntries

Hi all,

I'm getting the following exception whenever I try to modify OrderEntries in my modules:

Assertion failed:
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:89)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:96)
at com.intellij.openapi.roots.impl.RootModelImpl.a(RootModelImpl.java:296)
at com.intellij.openapi.roots.impl.RootModelImpl.removeOrderEntry(RootModelImpl.java:559)

Any idea what might be causing this?

Thanks,
Colin

2 comments

Hello Colin,

Any idea what might be causing this?


Looks like you should do any modifications on a modifiable model you can obtain with
com.intellij.openapi.roots.impl.ModuleRootManager#getModifiableModel.

Sascha

0

Hi Sascha,

Thanks for the response, I'm actually already doing this. The thing that it might be is that I'm passing it an OrderEntry obtained from the unmodifiable version. In the end the whole thing is moot, I got annoyed with how difficult plugin development was and just rewrote our iml files as part of our build process, it was much simpler.

Cheers,
Colin

0

Please sign in to leave a comment.