[Pydev-cvs] org.python.pydev/src_dltk_console/org/python/pydev/dltk/console/ui ScriptConsole.java,
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-06-28 12:35:31
|
Update of /cvsroot/pydev/org.python.pydev/src_dltk_console/org/python/pydev/dltk/console/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12157/src_dltk_console/org/python/pydev/dltk/console/ui Modified Files: ScriptConsole.java Log Message: Backwards support for Eclipse 3.2. Index: ScriptConsole.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_dltk_console/org/python/pydev/dltk/console/ui/ScriptConsole.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ScriptConsole.java 6 Apr 2008 19:51:33 -0000 1.7 --- ScriptConsole.java 28 Jun 2008 12:35:38 -0000 1.8 *************** *** 19,26 **** --- 19,28 ---- import org.eclipse.jface.text.quickassist.IQuickAssistProcessor; import org.eclipse.jface.text.source.SourceViewerConfiguration; + import org.eclipse.swt.graphics.Color; import org.eclipse.ui.console.IConsoleDocumentPartitioner; import org.eclipse.ui.console.IConsoleView; import org.eclipse.ui.console.TextConsole; import org.eclipse.ui.part.IPageBookViewPage; + import org.python.pydev.core.REF; import org.python.pydev.dltk.console.IScriptConsoleInterpreter; import org.python.pydev.dltk.console.InterpreterResponse; *************** *** 223,225 **** --- 225,258 ---- */ public abstract String getInitialCommands(); + + + /** + * Used for backward compatibility because the setBackground/getBackground is not available for eclipse 3.2 + */ + private Color fPydevConsoleBackground; + + /** + * Used for backward compatibility because the setBackground/getBackground is not available for eclipse 3.2 + */ + public Color getPydevConsoleBackground() { + try{ + Color ret = (Color) REF.invoke(this, "getBackground"); + return ret; + }catch(Throwable e){ + //not available in eclipse 3.2 + return fPydevConsoleBackground; + } + } + + /** + * Used for backward compatibility because the setBackground/getBackground is not available for eclipse 3.2 + */ + public void setPydevConsoleBackground(Color color) { + try{ + REF.invoke(this, "setBackground", color); + }catch(Throwable e){ + //not available in eclipse 3.2 + fPydevConsoleBackground = color; + } + } } |