/** Initialize the Ecore element when inside a script. */ public void eInit(SarlScript script, String name, IJvmTypeProvider context) { setTypeResolutionContext(context); if (this.sarlArtifact == null) { this.sarlArtifact = SarlFactory.eINSTANCE.createSarlArtifact(); script.getXtendTypes().add(this.sarlArtifact); this.sarlArtifact.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendTypeDeclaration()); if (!Strings.isEmpty(name)) { this.sarlArtifact.setName(name); } } }