1 19 20 package org.netbeans.modules.debugger.jpda.ui.models; 21 22 import com.sun.jdi.AbsentInformationException; 23 import org.netbeans.api.debugger.jpda.CallStackFrame; 24 import org.netbeans.spi.debugger.ui.Constants; 25 import org.netbeans.spi.viewmodel.TableModel; 26 import org.netbeans.spi.viewmodel.ModelListener; 27 import org.netbeans.spi.viewmodel.UnknownTypeException; 28 29 import org.openide.util.NbBundle; 30 31 32 36 public class CallStackTableModel implements TableModel, Constants { 37 38 39 public Object getValueAt (Object row, String columnID) throws 40 UnknownTypeException { 41 if (row instanceof CallStackFrame) { 42 if (CALL_STACK_FRAME_LOCATION_COLUMN_ID.equals (columnID)) 43 try { 44 return ((CallStackFrame) row).getSourceName ( 45 null ); 47 } catch (AbsentInformationException e) { 48 return NbBundle.getMessage ( 49 CallStackTableModel.class, 50 "MSG_Callstack_NoInformation" 51 ); 52 } 53 } 54 throw new UnknownTypeException (row); 55 } 56 57 public boolean isReadOnly (Object row, String columnID) throws 58 UnknownTypeException { 59 if (row instanceof CallStackFrame) { 60 if (CALL_STACK_FRAME_LOCATION_COLUMN_ID.equals (columnID)) 61 return true; 62 } 63 throw new UnknownTypeException (row); 64 } 65 66 public void setValueAt (Object row, String columnID, Object value) 67 throws UnknownTypeException { 68 throw new UnknownTypeException (row); 69 } 70 71 76 public void addModelListener (ModelListener l) { 77 } 78 79 84 public void removeModelListener (ModelListener l) { 85 } 86 } 87 | Popular Tags |