diff --git a/FsEye.LinqPad.Plugin/AssemblyInfo.fs b/FsEye.LinqPad.Plugin/AssemblyInfo.fs new file mode 100644 index 0000000..b42a231 --- /dev/null +++ b/FsEye.LinqPad.Plugin/AssemblyInfo.fs @@ -0,0 +1,38 @@ +namespace FsEye.LinqPad.Plugin + +open System.Reflection +open System.Runtime.CompilerServices +open System.Runtime.InteropServices + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[] +[] +[] +[] +[] +[] +[] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [] +[] + +() \ No newline at end of file diff --git a/FsEye.LinqPad.Plugin/FsEye.LinqPad.Plugin.fsproj b/FsEye.LinqPad.Plugin/FsEye.LinqPad.Plugin.fsproj new file mode 100644 index 0000000..017dc6b --- /dev/null +++ b/FsEye.LinqPad.Plugin/FsEye.LinqPad.Plugin.fsproj @@ -0,0 +1,92 @@ + + + + + Debug + AnyCPU + 2.0 + 4182585b-df88-4d96-b52f-fe93ffd364d7 + Library + FsEye.LinqPad.Plugin + FsEye.LinqPad.Plugin + v4.0 + 4.3.0.0 + true + FsEye.LinqPad.Plugin + + true + + + true + full + false + false + bin\Debug\ + DEBUG;TRACE + 3 + bin\Debug\FsEye.LinqPad.Plugin.XML + + + pdbonly + true + true + bin\Release\ + TRACE + 3 + bin\Release\FsEye.LinqPad.Plugin.XML + + + 11 + + + + + $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + + + + + + + + + + + + + ..\packages\LINQPad.4.51.3\lib\net40\LINQPad.exe + True + + + + True + + + + + + + + FsEye + {20de2466-d7b1-4f72-b8f8-51f10f5f186e} + True + + + + + + \ No newline at end of file diff --git a/FsEye.LinqPad.Plugin/LinqPadViewPlugin.fs b/FsEye.LinqPad.Plugin/LinqPadViewPlugin.fs new file mode 100644 index 0000000..0bac2cb --- /dev/null +++ b/FsEye.LinqPad.Plugin/LinqPadViewPlugin.fs @@ -0,0 +1,40 @@ +namespace Swensen.FsEye.Plugins + +open System +open System.Windows.Forms +open Swensen.FsEye +open LINQPad + +type LinqPadWatchViewer () = + let panel = new TableLayoutPanel () + let label = new Label () + let webBrowser = new WebBrowser () + + do + webBrowser.Dock <- DockStyle.Fill + webBrowser.IsWebBrowserContextMenuEnabled <- false + + label |> panel.Controls.Add + webBrowser |> panel.Controls.Add + + label.Dock <- DockStyle.Fill + label.Anchor <- AnchorStyles.Top ||| AnchorStyles.Left + label.TextAlign <- System.Drawing.ContentAlignment.MiddleLeft + + interface IWatchViewer with + member __.Watch (name,value,type') = + label.Text <- sprintf "%s: %s" name type'.Name + use writer = Util.CreateXhtmlWriter (enableExpansions=true) + writer.Write(value) + webBrowser.DocumentText <- writer.ToString () + member __.Control = + panel :> Control + +type LinqPadPlugin() = + interface IPlugin with + member __.Name = + "LinqPad" + member __.CreateWatchViewer() = + () |> LinqPadWatchViewer :> IWatchViewer + member this.IsWatchable(_,_) = + true diff --git a/FsEye.LinqPad.Plugin/packages.config b/FsEye.LinqPad.Plugin/packages.config new file mode 100644 index 0000000..0b89e24 --- /dev/null +++ b/FsEye.LinqPad.Plugin/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/FsEye.sln b/FsEye.sln index 7ae9345..9ba182f 100644 --- a/FsEye.sln +++ b/FsEye.sln @@ -22,6 +22,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsEye.PropertyGrid.Plugin", EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsEye.DataGridView.Plugin", "FsEye.DataGridView.Plugin\FsEye.DataGridView.Plugin.fsproj", "{CC563DCC-2EAF-4822-B4CE-9D80ACCA6B5E}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsEye.LinqPad.Plugin", "FsEye.LinqPad.Plugin\FsEye.LinqPad.Plugin.fsproj", "{4182585B-DF88-4D96-B52F-FE93FFD364D7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -114,6 +116,18 @@ Global {CC563DCC-2EAF-4822-B4CE-9D80ACCA6B5E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {CC563DCC-2EAF-4822-B4CE-9D80ACCA6B5E}.Release|Mixed Platforms.Build.0 = Release|Any CPU {CC563DCC-2EAF-4822-B4CE-9D80ACCA6B5E}.Release|x86.ActiveCfg = Release|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Debug|x86.ActiveCfg = Debug|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Debug|x86.Build.0 = Debug|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Release|Any CPU.Build.0 = Release|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Release|x86.ActiveCfg = Release|Any CPU + {4182585B-DF88-4D96-B52F-FE93FFD364D7}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Test.FsEye/packages.config b/Test.FsEye/packages.config index 6572843..4dbf3f5 100644 --- a/Test.FsEye/packages.config +++ b/Test.FsEye/packages.config @@ -4,4 +4,5 @@ + \ No newline at end of file diff --git a/package.bat b/package.bat index da743e9..062008a 100644 --- a/package.bat +++ b/package.bat @@ -20,6 +20,8 @@ copy FsEye\bin\Release\FsEye.xml staging copy "FsEye.PropertyGrid.Plugin\bin\Release\FsEye.PropertyGrid.Plugin.dll" staging\plugins copy "FsEye.TreeView.Plugin\bin\Release\FsEye.TreeView.Plugin.dll" staging\plugins copy "FsEye.DataGridView.Plugin\bin\Release\FsEye.DataGridView.Plugin.dll" staging\plugins +copy "FsEye.LinqPad.Plugin\bin\Release\FsEye.LinqPad.Plugin.dll" staging\plugins +copy "FsEye.LinqPad.Plugin\bin\Release\LINQPad.exe" staging\plugins REM zip staging files cd staging