1 19 package org.netbeans.modules.xml.core.cookies; 20 21 import org.openide.nodes.*; 22 import org.openide.loaders.*; 23 import org.openide.cookies.*; 24 25 32 public class DataObjectCookieManager extends DefaultCookieManager { 33 34 private final DataObject dobj; 35 36 37 public DataObjectCookieManager(DataObject dobj, CookieSet set) { 38 super(set); 39 this.dobj = dobj; 40 } 41 42 46 public void removeCookie(Node.Cookie cake) { 47 48 50 if ( Util.THIS.isLoggable() ) Util.THIS.debug ("DataObjectCookieManager::removeCookie " + cake.getClass()); 52 super.removeCookie(cake); 53 54 if (SaveCookie.class.isAssignableFrom (cake.getClass())) { 56 dobj.setModified (false); 57 } 58 } 59 60 64 public void addCookie(Node.Cookie cake) { 65 66 if ( Util.THIS.isLoggable() ) Util.THIS.debug ("DataObjectCookieManager::addCookie " + cake.getClass()); 68 super.addCookie(cake); 69 70 if (SaveCookie.class.isAssignableFrom (cake.getClass())) { 72 dobj.setModified (true); 73 } 74 } 75 76 } 77 | Popular Tags |