[Pydev-cvs] org.python.pydev.core/src/org/python/pydev/core REF.java, 1.39, 1.40
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-06-28 12:35:39
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12206/src/org/python/pydev/core Modified Files: REF.java Log Message: Backwards support for Eclipse 3.2. Index: REF.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/REF.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** REF.java 5 Jan 2008 17:09:18 -0000 1.39 --- REF.java 28 Jun 2008 12:35:47 -0000 1.40 *************** *** 497,505 **** } /** ! * @return null if it was unable to get the document from the path (this may happen if it was not refreshed). ! * Or the document that represents the file */ ! public static IDocument getDocFromPath(IPath path) { //TODO: make this better for 3.3/ 3.2 (and check if behaviour is correct now) try{ --- 497,506 ---- } + /** ! * @param path tha path we're interested in ! * @return a file buffer to be used. */ ! public static ITextFileBuffer getBufferFromPath(IPath path) { //TODO: make this better for 3.3/ 3.2 (and check if behaviour is correct now) try{ *************** *** 512,521 **** if(textFileBuffer != null){ //we don't have it when it is not properly refreshed ! return textFileBuffer.getDocument(); } } ! }catch(Throwable e){//NoSuchMethod/NoClassDef exception ! if(e instanceof ClassNotFoundException || e instanceof LinkageError){ ITextFileBufferManager textFileBufferManager = FileBuffers.getTextFileBufferManager(); --- 513,524 ---- if(textFileBuffer != null){ //we don't have it when it is not properly refreshed ! return textFileBuffer; } } ! }catch(Throwable e){//NoSuchMethod/NoClassDef exception ! if(e instanceof ClassNotFoundException || e instanceof LinkageError || e instanceof NoSuchMethodException || ! e instanceof NoSuchMethodError || e instanceof NoClassDefFoundError){ ! ITextFileBufferManager textFileBufferManager = FileBuffers.getTextFileBufferManager(); *************** *** 524,528 **** if(textFileBuffer != null){ //we don't have it when it is not properly refreshed ! return textFileBuffer.getDocument(); } } --- 527,531 ---- if(textFileBuffer != null){ //we don't have it when it is not properly refreshed ! return textFileBuffer; } } *************** *** 542,546 **** } return null; ! } } --- 545,560 ---- } return null; ! } ! } ! /** ! * @return null if it was unable to get the document from the path (this may happen if it was not refreshed). ! * Or the document that represents the file ! */ ! public static IDocument getDocFromPath(IPath path) { ! ITextFileBuffer buffer = getBufferFromPath(path); ! if(buffer != null){ ! return buffer.getDocument(); ! } ! return null; } |