protected void createEnum(CompounddefType compounddefType, INamedElement element)
     throws InvalidEditingException {
   List<SectiondefType> sectiondefTypes = compounddefType.getSectiondef();
   for (SectiondefType sectiondefType : sectiondefTypes) {
     List<MemberdefType> memberdefTypes = sectiondefType.getMemberdef();
     for (MemberdefType memberdefType : memberdefTypes) {
       if (memberdefType.getKind() != DoxMemberKind.ENUM) {
         continue;
       }
       Type type = this.typeUtil.createEnumType(memberdefType);
       IClass enumClass = null;
       try {
         if (element instanceof IPackage) {
           enumClass = this.basicModelEditor.createClass((IPackage) element, type.getName());
         } else if (element instanceof IClass) {
           enumClass = this.basicModelEditor.createClass((IClass) element, type.getName());
         }
       } catch (InvalidEditingException e) {
         // グローバルで同名は存在するので無視する
         if (!e.getKey().equals(InvalidEditingException.NAME_DOUBLE_ERROR_KEY)) {
           throw e;
         }
       }
       if (enumClass == null) {
         break;
       }
       enumClass.addStereotype(STEREOTYPE_ENUM);
       enumClass.setVisibility(type.getVisiblity());
       List<EnumvalueType> enumvalues = memberdefType.getEnumvalue();
       if (enumvalues == null) {
         break;
       }
       for (EnumvalueType enumvalue : enumvalues) {
         Type enumtype = this.typeUtil.createEnumType(enumvalue);
         try {
           IAttribute enumAttribute =
               this.basicModelEditor.createAttribute(enumClass, enumtype.getName(), enumClass);
           enumAttribute.setVisibility(enumtype.getVisiblity());
           enumAttribute.setInitialValue(enumtype.getInitialValue());
           // enum なので static とする
           enumAttribute.setStatic(true);
         } catch (InvalidEditingException e) {
           // 同じネームスペース名で同じ名前のEnumの中に同じ名前の定数を宣言しているときは例外を出したくない
           if (!e.getKey().equals(InvalidEditingException.NAME_DOUBLE_ERROR_KEY)) {
             throw e;
           }
         }
       }
     }
   }
 }