Skip to content
This repository was archived by the owner on Oct 31, 2021. It is now read-only.

Commit 363c576

Browse files
add FSharp.Editing.Messages project
1 parent a607c0a commit 363c576

File tree

5 files changed

+229
-0
lines changed

5 files changed

+229
-0
lines changed

FSharpVSPowerTools.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Editing.VisualStudio
6060
EndProject
6161
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Editing.VisualStudio.Tests", "tests\FSharp.Editing.VisualStudio.Tests\FSharp.Editing.VisualStudio.Tests.fsproj", "{CA2902E0-5E1C-46EE-963D-D72BC3B6EFAA}"
6262
EndProject
63+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Editing.Messages", "src\FSharp.Editing.Messages\FSharp.Editing.Messages.fsproj", "{90B29F03-2CD0-4265-B06D-851DC045D62B}"
64+
EndProject
6365
Global
6466
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6567
Debug|Any CPU = Debug|Any CPU
@@ -94,6 +96,10 @@ Global
9496
{CA2902E0-5E1C-46EE-963D-D72BC3B6EFAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
9597
{CA2902E0-5E1C-46EE-963D-D72BC3B6EFAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
9698
{CA2902E0-5E1C-46EE-963D-D72BC3B6EFAA}.Release|Any CPU.Build.0 = Release|Any CPU
99+
{90B29F03-2CD0-4265-B06D-851DC045D62B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
100+
{90B29F03-2CD0-4265-B06D-851DC045D62B}.Debug|Any CPU.Build.0 = Debug|Any CPU
101+
{90B29F03-2CD0-4265-B06D-851DC045D62B}.Release|Any CPU.ActiveCfg = Release|Any CPU
102+
{90B29F03-2CD0-4265-B06D-851DC045D62B}.Release|Any CPU.Build.0 = Release|Any CPU
97103
EndGlobalSection
98104
GlobalSection(SolutionProperties) = preSolution
99105
HideSolutionNode = FALSE
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
namespace FSharp.Editing.Messages.AssemblyInfo
2+
3+
open System.Reflection
4+
open System.Runtime.CompilerServices
5+
open System.Runtime.InteropServices
6+
7+
// General Information about an assembly is controlled through the following
8+
// set of attributes. Change these attribute values to modify the information
9+
// associated with an assembly.
10+
[<assembly: AssemblyTitle("FSharp.Editing.Messages")>]
11+
[<assembly: AssemblyDescription("")>]
12+
[<assembly: AssemblyConfiguration("")>]
13+
[<assembly: AssemblyCompany("")>]
14+
[<assembly: AssemblyProduct("FSharp.Editing.Messages")>]
15+
[<assembly: AssemblyCopyright("Copyright © 2016")>]
16+
[<assembly: AssemblyTrademark("")>]
17+
[<assembly: AssemblyCulture("")>]
18+
19+
// Setting ComVisible to false makes the types in this assembly not visible
20+
// to COM components. If you need to access a type in this assembly from
21+
// COM, set the ComVisible attribute to true on that type.
22+
[<assembly: ComVisible(false)>]
23+
24+
// The following GUID is for the ID of the typelib if this project is exposed to COM
25+
[<assembly: Guid("90b29f03-2cd0-4265-b06d-851dc045d62b")>]
26+
27+
// Version information for an assembly consists of the following four values:
28+
//
29+
// Major Version
30+
// Minor Version
31+
// Build Number
32+
// Revision
33+
//
34+
// You can specify all the values or you can default the Build and Revision Numbers
35+
// by using the '*' as shown below:
36+
// [<assembly: AssemblyVersion("1.0.*")>]
37+
[<assembly: AssemblyVersion("1.0.0.0")>]
38+
[<assembly: AssemblyFileVersion("1.0.0.0")>]
39+
40+
do
41+
()
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>90b29f03-2cd0-4265-b06d-851dc045d62b</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<RootNamespace>FSharp.Editing.Messages</RootNamespace>
11+
<AssemblyName>FSharp.Editing.Messages</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<Name>FSharp.Editing.Messages</Name>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<Tailcalls>false</Tailcalls>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<WarningLevel>3</WarningLevel>
25+
<DocumentationFile>bin\Debug\FSharp.Editing.Messages.XML</DocumentationFile>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<Tailcalls>true</Tailcalls>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<WarningLevel>3</WarningLevel>
34+
<DocumentationFile>bin\Release\FSharp.Editing.Messages.XML</DocumentationFile>
35+
</PropertyGroup>
36+
<PropertyGroup>
37+
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
38+
</PropertyGroup>
39+
<Choose>
40+
<When Condition="'$(VisualStudioVersion)' == '11.0'">
41+
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
42+
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
43+
</PropertyGroup>
44+
</When>
45+
<Otherwise>
46+
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
47+
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
48+
</PropertyGroup>
49+
</Otherwise>
50+
</Choose>
51+
<Import Project="$(FSharpTargetsPath)" />
52+
<ItemGroup>
53+
<Compile Include="AssemblyInfo.fs" />
54+
<Compile Include="Messages.fs" />
55+
<None Include="paket.references" />
56+
</ItemGroup>
57+
<ItemGroup>
58+
<Reference Include="mscorlib" />
59+
<Reference Include="System" />
60+
<Reference Include="System.Core" />
61+
<Reference Include="System.Numerics" />
62+
</ItemGroup>
63+
<Choose>
64+
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v2.0' Or $(TargetFrameworkVersion) == 'v3.0' Or $(TargetFrameworkVersion) == 'v3.5')">
65+
<ItemGroup>
66+
<Reference Include="FSharp.Core">
67+
<HintPath>..\..\packages\FSharp.Core\lib\net20\FSharp.Core.dll</HintPath>
68+
<Private>True</Private>
69+
<Paket>True</Paket>
70+
</Reference>
71+
</ItemGroup>
72+
</When>
73+
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
74+
<ItemGroup>
75+
<Reference Include="FSharp.Core">
76+
<HintPath>..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll</HintPath>
77+
<Private>True</Private>
78+
<Paket>True</Paket>
79+
</Reference>
80+
</ItemGroup>
81+
</When>
82+
<When Condition="($(TargetFrameworkIdentifier) == 'MonoAndroid') Or ($(TargetFrameworkIdentifier) == 'MonoTouch') Or ($(TargetFrameworkIdentifier) == 'Xamarin.iOS')">
83+
<ItemGroup>
84+
<Reference Include="FSharp.Core">
85+
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.dll</HintPath>
86+
<Private>True</Private>
87+
<Paket>True</Paket>
88+
</Reference>
89+
</ItemGroup>
90+
</When>
91+
<When Condition="($(TargetFrameworkIdentifier) == '.NETCore') Or ($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2' Or $(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And $(TargetFrameworkVersion) == 'v1.0') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac') Or ($(TargetFrameworkProfile) == 'Profile7') Or ($(TargetFrameworkProfile) == 'Profile44')">
92+
<ItemGroup>
93+
<Reference Include="FSharp.Core">
94+
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+netcore45\FSharp.Core.dll</HintPath>
95+
<Private>True</Private>
96+
<Paket>True</Paket>
97+
</Reference>
98+
</ItemGroup>
99+
</When>
100+
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v1.0') Or ($(TargetFrameworkIdentifier) == 'WindowsPhone' And ($(TargetFrameworkVersion) == 'v8.0' Or $(TargetFrameworkVersion) == 'v8.1')) Or ($(TargetFrameworkProfile) == 'Profile31') Or ($(TargetFrameworkProfile) == 'Profile49') Or ($(TargetFrameworkProfile) == 'Profile78')">
101+
<ItemGroup>
102+
<Reference Include="FSharp.Core">
103+
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wp8\FSharp.Core.dll</HintPath>
104+
<Private>True</Private>
105+
<Paket>True</Paket>
106+
</Reference>
107+
</ItemGroup>
108+
</When>
109+
<When Condition="($(TargetFrameworkIdentifier) == 'WindowsPhoneApp') Or ($(TargetFrameworkProfile) == 'Profile32') Or ($(TargetFrameworkProfile) == 'Profile84') Or ($(TargetFrameworkProfile) == 'Profile111') Or ($(TargetFrameworkProfile) == 'Profile151') Or ($(TargetFrameworkProfile) == 'Profile157') Or ($(TargetFrameworkProfile) == 'Profile259')">
110+
<ItemGroup>
111+
<Reference Include="FSharp.Core">
112+
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll</HintPath>
113+
<Private>True</Private>
114+
<Paket>True</Paket>
115+
</Reference>
116+
</ItemGroup>
117+
</When>
118+
<When Condition="($(TargetFrameworkIdentifier) == 'Silverlight' And $(TargetFrameworkVersion) == 'v5.0') Or ($(TargetFrameworkProfile) == 'Profile24') Or ($(TargetFrameworkProfile) == 'Profile47')">
119+
<ItemGroup>
120+
<Reference Include="FSharp.Core">
121+
<HintPath>..\..\packages\FSharp.Core\lib\portable-net45+sl5+netcore45\FSharp.Core.dll</HintPath>
122+
<Private>True</Private>
123+
<Paket>True</Paket>
124+
</Reference>
125+
</ItemGroup>
126+
</When>
127+
</Choose>
128+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
129+
Other similar extension points exist, see Microsoft.Common.targets.
130+
<Target Name="BeforeBuild">
131+
</Target>
132+
<Target Name="AfterBuild">
133+
</Target>
134+
-->
135+
</Project>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
namespace FSharp.Editing.Messages
2+
3+
type [<Measure>] requestId
4+
type RequestId = int64<requestId>
5+
type FilePath = string
6+
type DocumentContent = string
7+
8+
type Project =
9+
{ FileName: FilePath
10+
Files: FilePath list
11+
ReferencedProjects: FilePath list
12+
CompilerOptions: string list }
13+
14+
type ServerCapability =
15+
| SyntaxHighlighting
16+
| HighlighIdentifier
17+
| ImplementInterface
18+
19+
type ClientNotification =
20+
/// New solution loaded or new folder opened. All server state should be discarded.
21+
| Cleanup
22+
/// A new project loaded or a known project changed in any way (name, file list, references, etc.)
23+
| ProjectLoaded of Project
24+
/// Previously loaded project was unloaded from IDE or deleted from disk so it should not be part of solution anymore.
25+
| ProjectUnloaded
26+
/// Document opened in an IDE for the first time. No need to send its content since server can read it from disk.
27+
| DocumentOpened of file: FilePath
28+
/// Document closed. Server can stop tracking its content in a special way and just read it from disk.
29+
| DocumentClosed of file: FilePath
30+
| DocumentRenamed of oldFile: FilePath * newFile: FilePath
31+
/// Opened document changed in IDE without saving to disk. Full new content should be sent
32+
/// (for now. Later we can add incremental changes support).
33+
| DocumentChanged of file: FilePath * content: DocumentContent
34+
| Subscribe of ServerCapability Set
35+
36+
type SyntaxHighlightingInfo =
37+
{ ClassificationRanges: unit list }
38+
39+
type ServerNotification =
40+
| SyntaxHighlightingChanged of file: FilePath * SyntaxHighlightingInfo
41+
42+
type RequestMessage =
43+
{ RequestId: RequestId }
44+
45+
type ResponseMessage =
46+
{ RequestId: RequestId }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FSharp.Core

0 commit comments

Comments
 (0)