1 19 package org.netbeans.modules.java.debug; 20 21 import org.netbeans.api.java.source.Comment; 22 import org.netbeans.editor.Coloring; 23 import org.netbeans.modules.editor.highlights.spi.Highlight; 24 import org.openide.nodes.AbstractNode; 25 import org.openide.nodes.Children; 26 import org.openide.util.NbBundle; 27 28 32 public class CommentNode extends AbstractNode implements Highlight { 33 34 private Comment comment; 35 36 37 public CommentNode(Comment comment) { 38 super(Children.LEAF); 39 this.comment = comment; 40 setDisplayName(NbBundle.getMessage(CommentNode.class, "NM_Comment")); 41 } 42 43 public int getStart() { 44 return comment.pos(); 45 } 46 47 public int getEnd() { 48 return comment.endPos(); 49 } 50 51 public Coloring getColoring() { 52 return TreeNode.HIGHLIGHT; 53 } 54 55 } 56 | Popular Tags |