1 19 20 package org.netbeans.modules.java.parser; 21 22 import javax.swing.text.*; 23 import javax.swing.text.Position ; 24 25 import org.openide.src.*; 26 27 import org.openide.text.CloneableEditorSupport; 28 import org.openide.text.PositionBounds; 29 import org.openide.text.PositionRef; 30 31 import org.netbeans.modules.java.ElementFactory; 32 33 38 public class DocumentModelBuilder implements ElementFactory { 39 CloneableEditorSupport editSupp; 40 char[] inputText; 41 boolean computeHash; 42 43 public DocumentModelBuilder(CloneableEditorSupport supp) { 44 this.editSupp = supp; 45 } 46 47 protected void setContent(char[] content, boolean computeHash) { 48 } 49 50 public void createPackage(Identifier name, int begin, int end) { 51 } 52 53 public void createImport(Import im, int begin, int end) { 54 } 55 56 public Item createClass(boolean isInterface, int modifiers, Identifier name, Identifier superclass, Identifier[] interfaces) { 57 return null; 58 } 59 60 public Item createConstructor(int modifiers, Identifier id, MethodParameter[] params, Identifier[] exceptions) { 61 return null; 62 } 63 64 public Item createField(int modifiers, Identifier name, Type type, String initializer) { 65 return null; 66 } 67 68 public Item createInitializer(int modifiers) { 69 return null; 70 } 71 72 public Item createMethod(int modifiers, Identifier name, Type returnType, MethodParameter[] params, Identifier[] exceptions) { 73 return null; 74 } 75 76 public void markError(Item item) { 77 } 79 80 public void setBodyBounds(Item item, int begin, int end) { 81 } 82 83 public void setBounds(Item item, int begin, int end) { 84 } 85 86 public void setDocumentation(Item item, int begin, int end, String text) { 87 } 88 89 public void setFieldTypeBounds(Item item, int begin, int end) { 90 } 91 92 public void setHeaderBounds(Item item, int begin, int end) { 93 } 94 95 public void setParent(Item child, Item parent) { 96 } 97 98 public void setPrecedingField(Item item, Item previous) { 99 } 100 101 protected PositionBounds createAbsorbingBounds(int from, int to) { 102 PositionRef posBegin = editSupp.createPositionRef(from, Position.Bias.Forward); 103 PositionRef posEnd = editSupp.createPositionRef(to, Position.Bias.Backward); 104 return new PositionBounds(posBegin, posEnd); 105 } 106 } 107 | Popular Tags |