|
From: Markus B. <mba...@us...> - 2005-09-21 21:06:44
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22068/src/org/rubypeople/rdt/internal/ui/infoviews Modified Files: RIView.java Log Message: reuse RubyInterpreter for execute ruby command for ri Index: RIView.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RIView.java 18 Sep 2005 18:46:10 -0000 1.8 --- RIView.java 21 Sep 2005 21:06:32 -0000 1.9 *************** *** 11,14 **** --- 11,15 ---- import java.util.List; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; *************** *** 344,349 **** public final void invoke() { ! ! IPath rubyPath = RubyRuntime.getDefault().getSelectedInterpreter().getInstallLocation(); IPath riPath = new Path( RubyPlugin.getDefault().getPreferenceStore().getString( PreferenceConstants.RI_PATH ) ); --- 345,349 ---- public final void invoke() { ! IPath riPath = new Path( RubyPlugin.getDefault().getPreferenceStore().getString( PreferenceConstants.RI_PATH ) ); *************** *** 358,370 **** return; } ! ! String riCmd = "\"" + rubyPath + "\" \"" + riPath.toString() + "\" "; ! String call = riCmd + getArgString(); try { ! final Process p = Runtime.getRuntime().exec(call); handleOutput(p); ! } catch (IOException e) { ! e.printStackTrace(); ! } } } --- 358,369 ---- return; } ! try { ! final Process p = RubyRuntime.getDefault().getSelectedInterpreter().exec("\"" + riPath.toString() + "\" " + getArgString(), null); handleOutput(p); ! } catch (CoreException coreException) { ! // message of RuntimeException will be displayed in the RI View ! throw new RuntimeException(coreException.getStatus().getMessage()); ! } } } |