|
From: <caw...@us...> - 2007-05-31 13:52:51
|
Revision: 2570
http://svn.sourceforge.net/rubyeclipse/?rev=2570&view=rev
Author: cawilliams
Date: 2007-05-31 06:52:50 -0700 (Thu, 31 May 2007)
Log Message:
-----------
fix F3 - Go to Declaration on external ruby scripts
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectionConverter.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectionConverter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectionConverter.java 2007-05-31 13:41:24 UTC (rev 2569)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectionConverter.java 2007-05-31 13:52:50 UTC (rev 2570)
@@ -9,6 +9,7 @@
import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.internal.corext.util.RubyModelUtil;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.internal.ui.rubyeditor.IRubyScriptEditorInput;
import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor;
import org.rubypeople.rdt.ui.IWorkingCopyManager;
@@ -23,9 +24,13 @@
}
public static IRubyElement getInput(RubyEditor editor) {
- if (editor == null)
+ if (editor == null)
return null;
IEditorInput input= editor.getEditorInput();
+ if (input instanceof IRubyScriptEditorInput) {
+ IRubyScriptEditorInput scriptEditor = (IRubyScriptEditorInput) input;
+ return scriptEditor.getRubyScript();
+ }
IWorkingCopyManager manager= RubyPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(input);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|