
header position 0..108
module templateCallMultiLinesWithIndentationWithInlinedStatement
  metamodel http://www.eclipse.org/emf/2002/Ecore (67..105)
  [comment @main  (121..127) /] (112..129)
  
  public template myTemplate(pkg : EPackage (159..180))
  @main
    [file url .add(.aqlFeatureAccess(pkg, 'name'), '.txt') (193..210) mode overwrite
      [for cls : null = .aqlFeatureAccess(pkg, 'eClassifiers') (242..258) (236..258)
        [.generateClassifier(cls) (269..293)/] (newLineNeeded (268..297) (260..301)
      [/for] (229..307)
       (newLineNeeded) (307..309) (223..311)
    [/file] (186..318)
     (newLineNeeded) (318..320) (182..320)
  [/template] (131..331)
  
 * Generates the Python class for the given EClassifier.
 * @param cls the classifier
 * (432..430)
  cls the classifier (408..426)[comment cls the classifier (408..426) /] (408..426)[comment 
 * Generates the Python class for the given EClassifier.
 * @param cls the classifier
 * (432..430) /] (335..432)
  
 * Generates the Python class for the given EClassifier.
 * @param cls the classifier
 * (432..430)
  cls the classifier (408..426)[comment cls the classifier (408..426) /] (408..426)[comment 
 * Generates the Python class for the given EClassifier.
 * @param cls the classifier
 * (432..430) /] (335..432)
  public template generateClassifier(cls : EClassifier (470..494))
    # TODO generateClassifier( (500..526)
    [.aqlFeatureAccess(.eClass(cls), 'name') (527..544)/] (526..546)
    ) (newLineNeeded) (546..549) (496..549)
  [/template] (434..560)
  
 * Generates the Python class for the given EClass.
 * @param cls the class
 * (651..649)
  cls the class (632..645)[comment cls the class (632..645) /] (632..645)[comment 
 * Generates the Python class for the given EClass.
 * @param cls the class
 * (651..649) /] (564..651)
  
 * Generates the Python class for the given EClass.
 * @param cls the class
 * (651..649)
  cls the class (632..645)[comment cls the class (632..645) /] (632..645)[comment 
 * Generates the Python class for the given EClass.
 * @param cls the class
 * (651..649) /] (564..651)
  public template generateClassifier(cls : EClass (689..708))
    class  (714..720)
    [.aqlFeatureAccess(cls, 'name') (721..729)/] (720..731)
    ( (731..732)
    [if .not(->isEmpty(.aqlFeatureAccess(cls, 'eSuperTypes'))) (737..767)
      [->sep(.aqlFeatureAccess(.aqlFeatureAccess(cls, 'eSuperTypes'), 'name'), ', ') (770..801)/] (769..803) (769..803)
    [else]
      EObject (809..816) (809..816)
    [/if] (732..821)
    ): (newLineNeeded) (821..825)
        """ (newLineNeeded) (827..836)
        Java class:  (838..854)
    [.aqlFeatureAccess(cls, 'name') (855..863)/] (newLineNeeded (854..867)
        """ (newLineNeeded) (869..878)
         (880..884)
    [.generateConstructor(cls) (885..910)/] (newLineNeeded (884..914) (710..914)
  [/template] (653..925)
  
 * Generates the Python class constructor for the given EClass.
 * @param cls the class
 * (1028..1026)
  cls the class (1009..1022)[comment cls the class (1009..1022) /] (1009..1022)[comment 
 * Generates the Python class constructor for the given EClass.
 * @param cls the class
 * (1028..1026) /] (929..1028)
  
 * Generates the Python class constructor for the given EClass.
 * @param cls the class
 * (1028..1026)
  cls the class (1009..1022)[comment cls the class (1009..1022) /] (1009..1022)[comment 
 * Generates the Python class constructor for the given EClass.
 * @param cls the class
 * (1028..1026) /] (929..1028)
  public template generateConstructor(cls : EClass (1067..1086))
    e_class = get_e_classifier(" (1092..1120)
    [.aqlFeatureAccess(.aqlFeatureAccess(cls, 'ePackage'), 'nsURI') (1121..1139)/] (1120..1141)
    ", " (1141..1145)
    [.aqlFeatureAccess(cls, 'name') (1146..1154)/] (1145..1156)
    ") (newLineNeeded) (1156..1160)
    def __init__(self, java_object = None): (newLineNeeded) (1162..1203)
        if java_object is None: (newLineNeeded) (1205..1234)
            JavaObject.__init__(self, create_e_object_from_e_classifier(self.e_class)) (newLineNeeded) (1236..1320)
        elif isinstance(java_object, CapellaElement): (newLineNeeded) (1322..1373)
            JavaObject.__init__(self, java_object.get_java_object()) (newLineNeeded) (1375..1441)
        elif self.e_class.isInstance(java_object): (newLineNeeded) (1443..1491)
            JavaObject.__init__(self, java_object) (newLineNeeded) (1493..1541)
        else: (newLineNeeded) (1543..1554)
            raise AttributeError("Passed object is not compatible with " + self.__class__.__name__ + ": " + str(java_object)) (newLineNeeded) (1556..1679) (1088..1679)
  [/template] (1030..1690) (0..1692)