コード例 #1
0
 @Override
 protected void internalCreateChildren(DocumentRootNode parentNode, EObject modelElement) {
   if (modelElement instanceof XtendFile) {
     XtendFile xtendFile = (XtendFile) modelElement;
     if (xtendFile.getPackage() != null)
       factory.createEStructuralFeatureNode(
           parentNode,
           xtendFile,
           XtendPackage.Literals.XTEND_FILE__PACKAGE,
           images.forPackage(),
           xtendFile.getPackage(),
           true);
     if (xtendFile.getImportSection() != null
         && !xtendFile.getImportSection().getImportDeclarations().isEmpty())
       factory.createEStructuralFeatureNode(
           parentNode,
           xtendFile.getImportSection(),
           XtypePackage.Literals.XIMPORT_SECTION__IMPORT_DECLARATIONS,
           images.forImportContainer(),
           "import declarations",
           false);
     for (XtendTypeDeclaration xtendType : xtendFile.getXtendTypes()) {
       EObjectNode classNode = createNode(parentNode, xtendType);
       createFeatureNodes(classNode, xtendType);
     }
   }
 }