1 19 20 package org.netbeans.modules.java.parser; 21 22 import java.beans.PropertyChangeListener ; 23 import java.io.Reader ; 24 import java.io.InputStream ; 25 import java.io.IOException ; 26 import javax.swing.event.ChangeListener ; 27 28 import org.openide.cookies.SourceCookie; 29 import org.openide.nodes.Node; 30 import org.openide.src.*; 31 import org.openide.util.Task; 32 33 import org.netbeans.modules.java.bridge.LangModel; 34 35 40 public interface JavaParser extends SourceCookie { 41 45 public static final int PRIORITY_BACKGROUND = Thread.MIN_PRIORITY; 46 50 public static final int PRIORITY_NORMAL = Thread.MIN_PRIORITY + 1; 51 55 public static final int PRIORITY_DEMAND = Thread.MAX_PRIORITY - 1; 56 61 public static final int PRIORITY_REFRESH = PRIORITY_NORMAL; 62 63 66 public static final String SHALLOW_PARSER = "shallow"; 70 public static final String DEEP_PARSER = "deep"; 74 public static final String MDR_PARSER = "mdr"; 78 public void addPropertyChangeListener(PropertyChangeListener l); 79 80 83 public void removePropertyChangeListener(PropertyChangeListener l); 84 85 88 public void addChangeListener(ChangeListener l); 89 90 93 public void removeChangeListener(ChangeListener l); 94 95 98 public SourceElement getSource(); 99 100 106 public Task prepare(); 107 108 119 public Task parse(int priority, boolean force, boolean acceptErrors); 120 121 132 public Task parse(int priority, boolean force, boolean acceptErrors, ParsableObjectRequest request); 133 134 138 public Task getCurrentTask(); 139 140 145 public int getStatus(); 146 147 151 public SourceException getErrorCause(); 152 153 156 public SourceElement.Impl getSourceImpl(); 157 158 161 public LangModel getModel(); 162 163 166 public interface Env { 167 173 public org.openide.filesystems.FileObject getSourceFile(); 174 175 183 public String getSourceName(); 184 185 188 public Reader getSourceText() throws IOException ; 189 190 193 public InputStream findCompiledClass(String classFQN); 194 195 198 public Node.Cookie findCookie(SourceElement el, Class cls); 199 200 204 public void annotateThrowable(Throwable t, String locMessage, boolean user); 205 206 210 public void annotateThrowable(Throwable wrapper, Throwable nested); 211 } 212 } 213 | Popular Tags |