[Pydev-cvs] org.python.pydev.parser/src/org/python/pydev/parser IParserObserver.java,1.1,1.2 PyParse
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-09-18 20:53:16
|
Update of /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32305/src/org/python/pydev/parser Modified Files: IParserObserver.java PyParser.java Log Message: Index: IParserObserver.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/IParserObserver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IParserObserver.java 18 Sep 2005 18:13:36 -0000 1.1 --- IParserObserver.java 18 Sep 2005 20:53:03 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- import org.eclipse.core.resources.IFile; + import org.eclipse.jface.text.IDocument; import org.python.parser.SimpleNode; *************** *** 22,26 **** * @param file the file that has just been analyzed (it may be null) */ ! void parserChanged(SimpleNode root, IFile file); /** --- 23,27 ---- * @param file the file that has just been analyzed (it may be null) */ ! void parserChanged(SimpleNode root, IFile file, IDocument doc); /** *************** *** 29,32 **** * @param file the file that has just been analyzed (it may be null) */ ! void parserError(Throwable error, IFile file); } --- 30,33 ---- * @param file the file that has just been analyzed (it may be null) */ ! void parserError(Throwable error, IFile file, IDocument doc); } Index: PyParser.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/PyParser.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PyParser.java 18 Sep 2005 18:13:36 -0000 1.12 --- PyParser.java 18 Sep 2005 20:53:03 -0000 1.13 *************** *** 192,205 **** * @param original */ ! protected void fireParserChanged(SimpleNode root, IFile file) { this.root = root; Iterator e = parserListeners.iterator(); while (e.hasNext()) { IParserObserver l = (IParserObserver) e.next(); ! l.parserChanged(root, file); } List<IParserObserver> participants = ExtensionHelper.getParticipants(ExtensionHelper.PYDEV_PARSER_OBSERVER); for (IParserObserver observer : participants) { ! observer.parserChanged(root, file); } } --- 192,205 ---- * @param original */ ! protected void fireParserChanged(SimpleNode root, IFile file, IDocument doc) { this.root = root; Iterator e = parserListeners.iterator(); while (e.hasNext()) { IParserObserver l = (IParserObserver) e.next(); ! l.parserChanged(root, file, doc); } List<IParserObserver> participants = ExtensionHelper.getParticipants(ExtensionHelper.PYDEV_PARSER_OBSERVER); for (IParserObserver observer : participants) { ! observer.parserChanged(root, file, doc); } } *************** *** 209,221 **** * @param original */ ! protected void fireParserError(Throwable error, IFile file) { Iterator e = parserListeners.iterator(); while (e.hasNext()) { IParserObserver l = (IParserObserver) e.next(); ! l.parserError(error, file); } List<IParserObserver> participants = ExtensionHelper.getParticipants(ExtensionHelper.PYDEV_PARSER_OBSERVER); for (IParserObserver observer : participants) { ! observer.parserError(error, file); } } --- 209,221 ---- * @param original */ ! protected void fireParserError(Throwable error, IFile file, IDocument doc) { Iterator e = parserListeners.iterator(); while (e.hasNext()) { IParserObserver l = (IParserObserver) e.next(); ! l.parserError(error, file, doc); } List<IParserObserver> participants = ExtensionHelper.getParticipants(ExtensionHelper.PYDEV_PARSER_OBSERVER); for (IParserObserver observer : participants) { ! observer.parserError(error, file, doc); } } *************** *** 258,262 **** Log.log(e); } ! fireParserChanged((SimpleNode) obj[0], original); }else{ //ok, we have no editor view --- 258,262 ---- Log.log(e); } ! fireParserChanged((SimpleNode) obj[0], original, document); }else{ //ok, we have no editor view *************** *** 268,276 **** if(obj[1] != null && obj[1] instanceof ParseException){ ! fireParserError((ParseException) obj[1], original); } if(obj[1] != null && obj[1] instanceof TokenMgrError){ ! fireParserError((TokenMgrError) obj[1], original); } --- 268,276 ---- if(obj[1] != null && obj[1] instanceof ParseException){ ! fireParserError((ParseException) obj[1], original, document); } if(obj[1] != null && obj[1] instanceof TokenMgrError){ ! fireParserError((TokenMgrError) obj[1], original, document); } |