public ImageFileDataObject(FileObject pf, ImageFileDataLoader loader) throws DataObjectExistsException, IOException { super(pf, loader); saveCookie = new ImageFileSaveCookie(this); editCookie = new Edit(this); viewCookie = new View(this); // adding these here because view and edit are always enabled, unlike // the save cookie which is only enabled when the underlying object has // been modified. See the setModified method to see how this is done. CookieSet cookies = getCookieSet(); cookies.add(getCookie(EditCookie.class)); cookies.add(getCookie(ViewCookie.class)); }
public ValaDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { super(pf, loader); CookieSet cookies = getCookieSet(); cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies)); }