Browse Source

Fix problems with F# interactive, thanks Matt!

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3799 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Robert Pickering 17 years ago
parent
commit
a859e782a3
  1. 14
      src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/Src/fsi.fs
  2. 1
      src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/Src/project.fs

14
src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/Src/fsi.fs

@ -131,8 +131,16 @@ type SentToFSharpInteractive = class @@ -131,8 +131,16 @@ type SentToFSharpInteractive = class
match window.ActiveViewContent :> obj with
| :? ITextEditorControlProvider as textArea ->
let textArea = textArea.TextEditorControl.ActiveTextAreaControl.TextArea
for selection in textArea.SelectionManager.SelectionCollection do
TheControl.fsiProcess.StandardInput.WriteLine(selection.SelectedText)
let pad = WorkbenchSingleton.Workbench.GetPad(typeof<FSharpInteractive>)
pad.BringPadToFront()
if textArea.SelectionManager.HasSomethingSelected then
for selection in textArea.SelectionManager.SelectionCollection do
TheControl.fsiProcess.StandardInput.WriteLine(selection.SelectedText)
else
let line = textArea.Document.GetLineNumberForOffset(textArea.Caret.Offset)
let lineSegment = textArea.Document.GetLineSegment(line)
let lineText = textArea.Document.GetText(lineSegment.Offset, lineSegment.TotalLength)
TheControl.fsiProcess.StandardInput.WriteLine(lineText)
TheControl.fsiProcess.StandardInput.WriteLine(";;")
| _ -> ()
end
end

1
src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/Src/project.fs

@ -10,7 +10,6 @@ namespace FSharpBinding @@ -10,7 +10,6 @@ namespace FSharpBinding
//Global todos
//TODO add "compiling" dialog to output the correct directory
//TODO output to correct directory :)
//TODO copy all config to the correct locations
//TODO add directory structure

Loading…
Cancel
Save