public boolean save(XModelObject object) { if (!fsutil.isModified(object)) return true; if (object.getModel().getProperties().get(XModelConstants.AUTOLOAD) != null) { return true; } String s = getEclipseFileName(object, false); boolean b = (s == null) ? super.save(object.copy(1)) : saveEclipse(object.copy(1)); if (((FileSystemsImpl) object).requestSave()) return true; XModelObject[] cs = object.getChildren(); for (int i = 0; i < cs.length; i++) { XObjectLoader loader = XModelObjectLoaderUtil.getObjectLoader(cs[i]); if (loader != null) b &= loader.save(cs[i]); } return b; }
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); }