1212import org .apache .commons .cli .*;
1313import org .eclipse .emf .ecore .resource .Resource ;
1414import org .eclipse .emf .ecore .resource .ResourceSet ;
15- import org .eclipse .xtext .resource .XtextResourceSet ;
1615import org .eclipse .emf .common .util .URI ;
1716import org .jetbrains .annotations .NotNull ;
1817import org .slf4j .Logger ;
1918import org .slf4j .LoggerFactory ;
20-
21- import jakarta .inject .Inject ;
2219import java .io .IOException ;
2320import java .nio .file .*;
2421import java .util .*;
@@ -205,8 +202,7 @@ private static void writePythonFiles(Map<String, CharSequence> generatedPython,
205202 // --- Helper classes for model loading and Guice setup ---
206203
207204 static class PythonModelLoader {
208- @ Inject Provider <XtextResourceSet > resourceSetProvider ;
209-
205+
210206 public List <RosettaModel > getRosettaModels (List <Resource > resources ) {
211207 return resources .stream ()
212208 .filter (Objects ::nonNull )
@@ -216,25 +212,6 @@ public List<RosettaModel> getRosettaModels(List<Resource> resources) {
216212 .map (r -> (RosettaModel ) r )
217213 .collect (Collectors .toList ());
218214 }
219- public XtextResourceSet getResourceSet () {
220- return resourceSetProvider .get ();
221- }
222-
223- private static String url (@ NotNull java .net .URL c ) {
224- try {
225- return c .toURI ().toURL ().toURI ().toASCIIString ();
226- } catch (Exception e ) {
227- throw new RuntimeException (e );
228- }
229- }
230-
231- private static Resource getResource (ResourceSet resourceSet , String f ) {
232- try {
233- return resourceSet .getResource (org .eclipse .emf .common .util .URI .createURI (f , true ), true );
234- } catch (Exception e ) {
235- throw new RuntimeException (e );
236- }
237- }
238215 }
239216
240217 static class PythonRosettaRuntimeModule extends RosettaRuntimeModule {
0 commit comments