question: private static void replaceCollapsedByEclipseSourceRoots ( Element libElement , Library . ModifiableModel modifiableModel ) { String [ ] srcUrlsFromClasspath = modifiableModel . getUrls ( OrderRootType . SOURCES ) ; LOG . assertTrue ( srcUrlsFromClasspath . length <= 1 ) ; final String eclipseUrl = srcUrlsFromClasspath . length > 0 ? srcUrlsFromClasspath [ 0 ] : null ; for ( Element r : libElement . getChildren ( SRCROOT_ATTR ) ) { final String url = r . getAttributeValue ( "url" ) ; final String bindAttr = r . getAttributeValue ( SRCROOT_BIND_ATTR ) ; boolean notBind = bindAttr != null && ! Boolean . parseBoolean ( bindAttr ) ; if ( notBind ) { modifiableModel . addRoot ( url , OrderRootType . SOURCES ) ; } else if ( eclipseUrl != null && areUrlsPointTheSame ( url , eclipseUrl ) && ! Comparing . strEqual ( url , eclipseUrl ) ) { modifiableModel . addRoot ( url , OrderRootType . SOURCES ) ; if ( srcUrlsFromClasspath != null && srcUrlsFromClasspath . length == 1 ) { modifiableModel . removeRoot ( eclipseUrl , OrderRootType . SOURCES ) ; srcUrlsFromClasspath = null ; } } } }
target:  Eclipse detect sources inside zip automatically while IDEA doesn't. So .eml contains expanded roots which should replace zip root read from .classpath