コード例 #1
0
 public boolean saveChildren(Element element, XModelObject o) {
   if ("FileSystemJar".equals(o.getModelEntity().getName())) { // $NON-NLS-1$
     return true;
   }
   boolean b = super.saveChildren(element, o);
   if (b && isFileSystems(element.getNodeName())) {
     saveWorkspaceHomeAttr(element, o);
     XModelObject w = getWeb(o);
     if (w != null) save(element, w);
   }
   return b;
 }
コード例 #2
0
 public void saveTo(File f, XModelObject object) {
   XModelObject o = object.copy(1);
   XModelObject[] cs = o.getChildren();
   for (XModelObject c : cs) {
     if (c.getModelEntity().getName().equals("FileSystemJar")) { // $NON-NLS-1$
       o.removeChild(c);
     }
     if (!c.getAttributeValue(XModelObjectConstants.ATTR_NAME_LOCATION)
         .startsWith("%")) { // $NON-NLS-1$
       o.removeChild(c);
     }
   }
   util().save(f, o);
 }