|
From: Christopher W. <caw...@us...> - 2006-05-05 21:45:27
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11380/src/org/rubypeople/rdt/ui/text Modified Files: RubySourceViewerConfiguration.java Log Message: fix null pointer exceptions we're getting on code preview windows inside preference pages Index: RubySourceViewerConfiguration.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubySourceViewerConfiguration.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RubySourceViewerConfiguration.java 5 May 2006 01:13:28 -0000 1.6 --- RubySourceViewerConfiguration.java 5 May 2006 21:45:24 -0000 1.7 *************** *** 376,388 **** */ public IReconciler getReconciler(ISourceViewer sourceViewer) { ! RubyReconciler reconciler = new RubyReconciler(fTextEditor, new RubyReconcilingStrategy( ! (RubyAbstractEditor) fTextEditor), true); ! reconciler.setIsIncrementalReconciler(false); ! // TODO Uncomment when we move to Eclipse 3.2 ! // ECLIPSE 3.2 ! //reconciler.setIsAllowedToModifyDocument(false); ! reconciler.setProgressMonitor(new NullProgressMonitor()); ! reconciler.setDelay(500); ! return reconciler; } --- 376,393 ---- */ public IReconciler getReconciler(ISourceViewer sourceViewer) { ! final ITextEditor editor = getEditor(); ! if (editor != null && editor.isEditable()) { ! RubyReconciler reconciler = new RubyReconciler(editor, ! new RubyReconcilingStrategy( ! (RubyAbstractEditor) fTextEditor), true); ! reconciler.setIsIncrementalReconciler(false); ! // TODO Uncomment when we move to Eclipse 3.2 ! // ECLIPSE 3.2 ! // reconciler.setIsAllowedToModifyDocument(false); ! reconciler.setProgressMonitor(new NullProgressMonitor()); ! reconciler.setDelay(500); ! return reconciler; ! } ! return null; } |