1 19 20 package org.netbeans.spi.gsf; 21 22 import org.netbeans.api.gsf.Error; 23 import org.netbeans.api.gsf.ParseEvent; 24 import org.netbeans.api.gsf.ParseListener; 25 import org.netbeans.api.gsf.ParserResult; 26 import org.openide.util.Exceptions; 27 28 34 public class DefaultParseListener implements ParseListener { 35 private ParserResult result; 36 37 public DefaultParseListener() { 38 } 39 40 public void started(ParseEvent e) { 41 } 42 43 public void finished(ParseEvent e) { 44 if (e.getKind() == ParseEvent.Kind.PARSE) { 45 result = e.getResult(); 46 } 47 } 48 49 public void error(Error e) { 50 } 51 52 public void exception(Exception e) { 53 Exceptions.printStackTrace(e); 54 } 55 56 public ParserResult getParserResult() { 57 return result; 58 } 59 } 60 | Popular Tags |