1 19 20 package org.netbeans.modules.debugger.ui; 21 22 import org.netbeans.api.debugger.DebuggerManager; 23 import org.netbeans.api.debugger.Properties; 24 import org.netbeans.api.debugger.Watch; 25 26 27 31 public class WatchesReader implements Properties.Reader { 32 33 34 public String [] getSupportedClassNames () { 35 return new String [] { 36 Watch.class.getName (), 37 }; 38 } 39 public Object read (String typeID, Properties properties) { 40 if (typeID.equals (Watch.class.getName ())) 41 return DebuggerManager.getDebuggerManager ().createWatch ( 42 properties.getString (Watch.PROP_EXPRESSION, null) 43 ); 44 return null; 45 } 46 47 public void write (Object object, Properties properties) { 48 if (object instanceof Watch) 49 properties.setString ( 50 Watch.PROP_EXPRESSION, 51 ((Watch) object).getExpression () 52 ); 53 } 54 } 55 | Popular Tags |