コード例 #1
0
  private void copyGroups(List<Group> groups) {
    if (groups.isEmpty()) return;

    ICSpecXMLFactory factory = ICSpecXMLFactory.eINSTANCE;
    IGroupsType gt = factory.createGroupsType();
    xmlSpec.getGroups().add(gt);
    for (Group group : groups) {
      IGroup xmlGroup = factory.createGroup();
      copyGroup(group, xmlGroup);
      if (group.isPublic()) gt.getPublic().add(xmlGroup);
      else gt.getPrivate().add(xmlGroup);
    }
  }
コード例 #2
0
 private void copyGroup(Group attr, IGroup xmlAttr) {
   copyAttribute(attr, xmlAttr);
   xmlAttr.setFilter(attr.getFilter());
   xmlAttr.setRebase(createStringFromPath(attr.getRebase()));
   copyPrerequisites(attr.getPrerequisites(), xmlAttr.getAttribute());
 }