Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ module SymbolTooltips =
let functionName =
let name =
if func.IsConstructor then
match func.EnclosingEntity with
match func.DeclaringEntity with
| Some ent -> ent.DisplayName
| _ ->
//LoggingService.LogWarning(sprintf "getFuncSignatureWithFormat: No enclosing entity found for: %s" func.DisplayName)
Expand All @@ -433,7 +433,7 @@ module SymbolTooltips =
let modifier =
//F# types are prefixed with new, should non F# types be too for consistancy?
if func.IsConstructor then
match func.EnclosingEntity with
match func.DeclaringEntity with
| Some ent -> if ent.IsFSharp then "new" ++ accessibility
else accessibility
| _ ->
Expand Down Expand Up @@ -488,7 +488,7 @@ module SymbolTooltips =
| _ -> indent + name.PadRight padding + ":"

let isDelegate =
match func.EnclosingEntity with
match func.DeclaringEntity with
| Some ent -> ent.IsDelegate
| _ ->
//LoggingService.logWarning "getFuncSignatureWithFormat: No enclosing entity found for: %s" func.DisplayName
Expand Down Expand Up @@ -616,7 +616,7 @@ module SymbolTooltips =

let getAPCaseSignature displayContext (apc:FSharpActivePatternCase) =
let findVal =
apc.Group.EnclosingEntity
apc.Group.DeclaringEntity
|> Option.bind (fun ent -> ent.MembersFunctionsAndValues
|> Seq.tryFind (fun func -> func.DisplayName.Contains apc.DisplayName)
|> Option.map (getFuncSignature displayContext))
Expand Down Expand Up @@ -652,7 +652,7 @@ module SymbolTooltips =

| ActivePatternCase ap ->
let parent =
ap.Group.EnclosingEntity
ap.Group.DeclaringEntity
|> Option.map (fun enclosing -> enclosing.UnAnnotate().DisplayName)
|> Option.fill "None"
sprintf "<small>From type:\t%s</small>%s<small>Assembly:\t%s</small>" parent Environment.NewLine ap.Assembly.SimpleName
Expand All @@ -673,7 +673,7 @@ module SymbolTooltips =
None

| Constructor func ->
match func.EnclosingEntity with
match func.DeclaringEntity with
| Some ent when ent.IsValueType || ent.IsEnum ->
//ValueTypes
let signature = getFuncSignature symbol.DisplayContext func
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Net.Compilers\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers\build\Microsoft.Net.Compilers.props')" Label="Paket" />
<Import Project="..\..\..\MonoDevelop.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -74,6 +76,15 @@
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Paket>True</Paket>
</Reference>
<Reference Include="System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Paket>True</Paket>
</Reference>
<Reference Include="FSharp.Compiler.Service">
<HintPath>..\packages\FSharp.Compiler.Service\lib\net45\FSharp.Compiler.Service.dll</HintPath>
<Private>True</Private>
Expand All @@ -93,6 +104,28 @@
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>..\packages\Microsoft.DiaSymReader\lib\net20\Microsoft.DiaSymReader.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>..\packages\Microsoft.DiaSymReader.PortablePdb\lib\net45\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
Expand All @@ -115,11 +148,20 @@
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="System.ComponentModel.Composition">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="System.ValueTuple">
<HintPath>..\packages\System.ValueTuple\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<HintPath>..\packages\System.ValueTuple\lib\net461\System.ValueTuple.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Net.Compilers\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers\build\Microsoft.Net.Compilers.props')" Label="Paket" />
<Import Project="..\..\..\MonoDevelop.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -233,6 +234,15 @@
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Paket>True</Paket>
</Reference>
<Reference Include="System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Paket>True</Paket>
</Reference>
<Reference Include="FSharp.Compiler.Service">
<HintPath>..\packages\FSharp.Compiler.Service\lib\net45\FSharp.Compiler.Service.dll</HintPath>
<Private>True</Private>
Expand All @@ -252,6 +262,28 @@
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>..\packages\Microsoft.DiaSymReader\lib\net20\Microsoft.DiaSymReader.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>..\packages\Microsoft.DiaSymReader.PortablePdb\lib\net45\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
Expand Down Expand Up @@ -311,6 +343,15 @@
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="System.ComponentModel.Composition">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module Patterns =
| IdentifierSymbol symbolUse ->
match symbolUse with
| SymbolUse.Val v ->
let isMut = v.IsMutable && (match v.EnclosingEntity with Some de -> not de.IsEnum | None -> v.IsMutable)
let isMut = v.IsMutable && (match v.DeclaringEntity with Some de -> not de.IsEnum | None -> v.IsMutable)
Some isMut
| _ -> None
| _ -> None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,20 @@ module Completion =
try
match symbolUse with
| SymbolUse.Constructor c ->
c.EnclosingEntity
c.DeclaringEntity
|> Option.map (fun ent -> let un = ent.UnAnnotate()
un.DisplayName, un)
| SymbolUse.Event ev ->
ev.EnclosingEntity
ev.DeclaringEntity
|> Option.map (fun ent -> let un = ent.UnAnnotate()
un.DisplayName, un)
| SymbolUse.Property pr ->
pr.EnclosingEntity
pr.DeclaringEntity
|> Option.map (fun ent -> let un = ent.UnAnnotate()
un.DisplayName, un)
| SymbolUse.ActivePatternCase ap ->
if ap.Group.Names.Count > 1 then
ap.Group.EnclosingEntity
ap.Group.DeclaringEntity
|> Option.map (fun enclosing -> let un = enclosing.UnAnnotate()
un.DisplayName, un)
else None
Expand All @@ -293,22 +293,22 @@ module Completion =
else None
| SymbolUse.Function f ->
if f.IsExtensionMember then
let real = f.LogicalEnclosingEntity.UnAnnotate()
let real = f.ApparentEnclosingEntity.UnAnnotate()
Some(real.DisplayName, real)
else
f.EnclosingEntity
f.DeclaringEntity
|> Option.map (fun real -> let un = real.UnAnnotate()
un.DisplayName, un)
| SymbolUse.Operator o ->
o.EnclosingEntity
o.DeclaringEntity
|> Option.map (fun ent -> let un = ent.UnAnnotate()
un.DisplayName, un)
| SymbolUse.Pattern p ->
p.EnclosingEntity
p.DeclaringEntity
|> Option.map (fun ent -> let un = ent.UnAnnotate()
un.DisplayName, ent)
| SymbolUse.Val v ->
v.EnclosingEntity
v.DeclaringEntity
|> Option.map (fun ent -> let un = ent.UnAnnotate()
un.DisplayName, un)
| SymbolUse.TypeAbbreviation ta ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module unitTestGatherer =
match symbolUse.Symbol with
| :? FSharpMemberOrFunctionOrValue as func ->
let typeName =
match func.EnclosingEntity with
match func.DeclaringEntity with
| Some ent -> ent.QualifiedName
| None _ ->
MonoDevelop.Core.LoggingService.LogWarning(sprintf "F# GatherUnitTests: found a unit test method with no qualified name: %s" func.FullName)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Net.Compilers\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers\build\Microsoft.Net.Compilers.props')" Label="Paket" />
<Import Project="..\..\..\MonoDevelop.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -281,7 +283,29 @@
<ItemGroup>
<Reference Include="FSharp.Core">
<HintPath>..\packages\FSharp.Core\lib\net45\FSharp.Core.dll</HintPath>
<Private>True</Private>
<Private>false</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>..\packages\Microsoft.DiaSymReader\lib\net20\Microsoft.DiaSymReader.dll</HintPath>
<Private>false</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>..\packages\Microsoft.DiaSymReader.PortablePdb\lib\net45\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
<Private>false</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
Expand Down Expand Up @@ -379,16 +403,25 @@
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="System.ComponentModel.Composition">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
<ItemGroup>
<Reference Include="System.ValueTuple">
<HintPath>..\packages\System.ValueTuple\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<HintPath>..\packages\System.ValueTuple\lib\net461\System.ValueTuple.dll</HintPath>
<Private>false</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="..\packages\StrongNamer\build\StrongNamer.targets" Condition="Exists('..\packages\StrongNamer\build\StrongNamer.targets')" Label="Paket" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module Search =
let correctDisplayName (symbol:FSharpSymbolUse) =
match symbol with
| SymbolUse.Constructor c ->
match c.EnclosingEntity with
match c.DeclaringEntity with
| Some ent -> ent.DisplayName
| _ -> LoggingService.LogError(sprintf "Constructor with no EnclosingEntity: %s" c.DisplayName)
c.DisplayName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module Refactoring =
match symbolUse.Symbol with
| :? FSharpMemberOrFunctionOrValue as mfv when mfv.IsDispatchSlot ->
maybe {
let! ent = mfv.EnclosingEntity
let! ent = mfv.DeclaringEntity
let! bt = ent.BaseType
if bt.HasTypeDefinition then
let baseDefs = bt.TypeDefinition.MembersFunctionsAndValues
Expand Down Expand Up @@ -391,7 +391,7 @@ module Refactoring =
match symbolUse.Symbol with
| :? FSharpMemberOrFunctionOrValue as mfv when mfv.IsDispatchSlot ->
maybe {
let! ent = mfv.EnclosingEntity
let! ent = mfv.DeclaringEntity
let! bt = ent.BaseType
return bt.HasTypeDefinition } |> Option.getOrElse (fun () -> false)

Expand Down Expand Up @@ -500,7 +500,7 @@ type CurrentRefactoringOperationsHandler() =
| :? FSharpEntity ->
GettextCatalog.GetString ("Go to _Base Type")
| :? FSharpMemberOrFunctionOrValue as mfv ->
match mfv.EnclosingEntity with
match mfv.DeclaringEntity with
| Some ent when ent.IsInterface ->
if mfv.IsProperty then GettextCatalog.GetString ("Go to _Interface Property")
elif mfv.IsEvent then GettextCatalog.GetString ("Go to _Interface Event")
Expand Down Expand Up @@ -544,7 +544,7 @@ type CurrentRefactoringOperationsHandler() =
| :? FSharpEntity as fse when fse.IsInterface -> GettextCatalog.GetString ("Find Implementing Types")
| :? FSharpEntity -> GettextCatalog.GetString ("Find Derived Types")
| :? FSharpMemberOrFunctionOrValue as mfv ->
match mfv.EnclosingEntity with
match mfv.DeclaringEntity with
| Some ent when ent.IsInterface ->
GettextCatalog.GetString ("Find Implementing Symbols")
| _ -> GettextCatalog.GetString ("Find overriden Symbols")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type FileSystem (defaultFileSystem : IFileSystem, openDocuments: unit -> Documen
member x.FileDelete fileName = defaultFileSystem.FileDelete fileName
member x.AssemblyLoadFrom fileName = defaultFileSystem.AssemblyLoadFrom fileName
member x.AssemblyLoad(assemblyName) = defaultFileSystem.AssemblyLoad assemblyName
member x.IsStableFileHeuristic fileName = true

module FileService =
let supportedFileExtensions =
Expand Down
Loading