public static void install ( ResourceSet rs , MavenProject project ) { final Iterator < Adapter > iterator = rs . eAdapters ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { if ( iterator . next ( ) instanceof MavenProjectAdapter ) { iterator . remove ( ) ; } } rs . eAdapters ( ) . add ( new MavenProjectAdapter ( project ) ) ; }
Install the adapter .