|
From: Christopher W. <caw...@us...> - 2005-09-10 00:09:41
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10903/src/org/rubypeople/rdt/internal/ui/infoviews Modified Files: RIView.java Log Message: fix RI view to properly update the view and show the normal "working" contents when a user updates their Ri preferences. (The bug was that the first time a user entere dtheir ri path the RI view still complained that it needed a proper RI path until the user closed and re-opened the RI view or Eclipse). Index: RIView.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RIView.java 2 Sep 2005 18:02:31 -0000 1.5 --- RIView.java 10 Sep 2005 00:09:31 -0000 1.6 *************** *** 142,146 **** public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) { if (event.getProperty().equals(PreferenceConstants.RI_PATH)) { ! updatePage() ; } } --- 142,146 ---- public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) { if (event.getProperty().equals(PreferenceConstants.RI_PATH)) { ! updatePage(); } } *************** *** 212,215 **** --- 212,216 ---- RubyInvoker invoker = new RubyInvoker() { protected void handleOutput(Process process) { + riFound = false; BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); String line = null; *************** *** 223,226 **** --- 224,228 ---- // if not matches were found display an error message if( numberOfMatches == 0 ){ + riFound = false; pageBook.showPage( riNotFoundLabel ); } else { *************** *** 338,342 **** public final void invoke() { - riFound = false; IPath rubyPath = RubyRuntime.getDefault().getSelectedInterpreter().getInstallLocation(); --- 340,343 ---- *************** *** 349,352 **** --- 350,354 ---- // If we can't find it ourselves then display an error to the user if (!file.exists() || !file.isFile()) { + riFound = false; pageBook.showPage(riNotFoundLabel); return; |