1 19 20 package org.netbeans.modules.web.debug.breakpoints; 21 22 23 import org.netbeans.api.debugger.jpda.*; 24 import org.netbeans.modules.web.debug.Context; 25 26 import org.netbeans.spi.viewmodel.NodeModel; 27 import org.netbeans.spi.viewmodel.ModelListener; 28 import org.netbeans.spi.viewmodel.UnknownTypeException; 29 30 import org.openide.util.NbBundle; 31 32 33 36 public class JspBreakpointsNodeModel implements NodeModel { 37 38 public static final String LINE_BREAKPOINT = 39 "org/netbeans/modules/debugger/resources/breakpointsView/Breakpoint"; 40 41 public String getDisplayName (Object o) throws UnknownTypeException { 42 if (o instanceof JspLineBreakpoint) { 43 JspLineBreakpoint b = (JspLineBreakpoint) o; 44 return NbBundle.getMessage (JspBreakpointsNodeModel.class, 45 "CTL_Jsp_Line_Breakpoint", 46 Context.getFileName (b), 47 "" + b.getLineNumber() 48 ); 49 } 50 throw new UnknownTypeException(o); 51 } 52 53 public String getShortDescription (Object o) throws UnknownTypeException { 54 if (o instanceof JspLineBreakpoint) { 55 return NbBundle.getMessage ( 56 JspBreakpointsNodeModel.class, 57 "CTL_Jsp_Line_Breakpoint", 58 Context.getFileName ((JspLineBreakpoint) o), 59 "" + ((JspLineBreakpoint) o).getLineNumber () 60 ); 61 } 62 throw new UnknownTypeException (o); 63 } 64 65 public String getIconBase (Object o) throws UnknownTypeException { 66 if (o instanceof JspLineBreakpoint) { 67 return LINE_BREAKPOINT; 68 } 69 throw new UnknownTypeException (o); 70 } 71 72 76 public void addModelListener (ModelListener l) { 77 } 79 80 84 public void removeModelListener (ModelListener l) { 85 } 87 88 102 } 109 | Popular Tags |