-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
1,247 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
ReSharper.FSharp/src/FSharp/FSharp.Common/Resources/Strings.Designer.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// <auto-generated/> | ||
namespace JetBrains.ReSharper.Plugins.FSharp.Resources | ||
|
||
open System | ||
open JetBrains.Application.I18n | ||
open JetBrains.DataFlow | ||
open JetBrains.Diagnostics | ||
open JetBrains.Lifetimes | ||
open JetBrains.Util | ||
open JetBrains.Util.Logging | ||
open JetBrains.Application.I18n.Plurals | ||
|
||
[<global.System.Diagnostics.DebuggerNonUserCode>] | ||
[<global.System.Runtime.CompilerServices.CompilerGenerated>] | ||
type public Strings() = | ||
static let logger = Logger.GetLogger("JetBrains.ReSharper.Plugins.FSharp.Resources.Strings") | ||
|
||
static let mutable resourceManager = null | ||
|
||
static do | ||
CultureContextComponent.Instance.Change.Advise(Lifetime.Eternal, fun (args:PropertyChangedEventArgs<CultureContextComponent>) -> | ||
let instance = if args.HasNew then args.New else null | ||
if instance <> null then | ||
resourceManager <- Lazy<JetResourceManager>(fun _ -> | ||
instance.CreateResourceManager("JetBrains.ReSharper.Plugins.FSharp.Resources.Strings", | ||
typeof<Strings>.Assembly)) | ||
else | ||
resourceManager <- null) | ||
|
||
[<global.System.ComponentModel.EditorBrowsable(global.System.ComponentModel.EditorBrowsableState.Advanced)>] | ||
static member ResourceManager: JetResourceManager = | ||
match resourceManager with | ||
| null -> ErrorJetResourceManager.Instance | ||
| _ -> resourceManager.Value | ||
|
||
static member Choice(format: string, [<ParamArray>] args: Object array): string = | ||
match Strings.ResourceManager.ChoiceFormatter with | ||
| null -> "???" | ||
| formatter -> String.Format(formatter, format, args) | ||
|
||
static member FSharpTypeHints_TopLevelMembers_Description = Strings.ResourceManager.GetString("FSharpTypeHints_TopLevelMembers_Description") | ||
static member FSharpTypeHints_LocalBindings_Description = Strings.ResourceManager.GetString("FSharpTypeHints_LocalBindings_Description") |
25 changes: 25 additions & 0 deletions
25
ReSharper.FSharp/src/FSharp/FSharp.Common/Resources/Strings.resx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<root> | ||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
<xsd:element name="root" msdata:IsDataSet="true"> | ||
</xsd:element> | ||
</xsd:schema> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>1.3</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
</resheader> | ||
<data name="FSharpTypeHints_TopLevelMembers_Description" xml:space="preserve"> | ||
<value>Type hints for top-level bindings and type members</value> | ||
</data> | ||
<data name="FSharpTypeHints_LocalBindings_Description" xml:space="preserve"> | ||
<value>Type hints for local bindings</value> | ||
</data> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Options/FSharpTypeHintOptionsPage.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Options | ||
|
||
open System.Runtime.InteropServices | ||
open JetBrains.Application.UI.Options | ||
open JetBrains.Application.UI.Options.OptionsDialog | ||
open JetBrains.IDE.UI.Options | ||
open JetBrains.Lifetimes | ||
open JetBrains.ReSharper.Feature.Services.InlayHints | ||
open JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Resources | ||
open JetBrains.ReSharper.Plugins.FSharp.Settings | ||
|
||
[<OptionsPage(nameof(FSharpInlayHintsPage), | ||
"F#", | ||
null, | ||
Sequence = 3., | ||
ParentId = InlayHintsOptionsPage.PID, | ||
NameResourceType = typeof<Strings>, | ||
NameResourceName = nameof(Strings.FSharpOptionPageTitle))>] | ||
type FSharpInlayHintsPage(lifetime: Lifetime, optionsPageContext: OptionsPageContext, optionsSettingsSmartContext: OptionsSettingsSmartContext, [<Optional; DefaultParameterValue(false)>] wrapInScrollablePanel) = | ||
inherit BeSimpleOptionsPage(lifetime, optionsPageContext, optionsSettingsSmartContext, wrapInScrollablePanel) | ||
|
||
|
||
[<OptionsPage(nameof(FSharpTypeHintsOptionsPage), | ||
"Type Hints", | ||
null, | ||
ParentId = nameof(FSharpInlayHintsPage), | ||
NestingType = OptionPageNestingType.Child, | ||
Sequence = 1., | ||
NameResourceType = typeof<Strings>, | ||
NameResourceName = nameof(Strings.FSharpTypeHints_OptionsPage_Title))>] | ||
type FSharpTypeHintsOptionsPage(lifetime: Lifetime, optionsPageContext: OptionsPageContext, | ||
optionsSettingsSmartContext: OptionsSettingsSmartContext) as this = | ||
inherit InlayHintsOptionPageBase(lifetime, optionsPageContext, optionsSettingsSmartContext, optionsPageContext.IsReSharper) | ||
|
||
do | ||
this.AddVisibilityHelpText() | ||
|
||
this.AddHeader(Strings.FSharpSignatureHints_TopLevelMembersSettings_Header) |> ignore | ||
this.AddVisibilityOption(fun (s: FSharpTypeHintOptions) -> s.ShowTypeHintsForTopLevelMembers) | ||
this.AddCommentText(Strings.FSharpSignatureHints_TopLevelMembersSettings_Comment) | ||
|
||
this.AddHeader(Strings.FSharpSignatureHints_LocalBindingsSettings_Header) |> ignore | ||
this.AddVisibilityOption(fun (s: FSharpTypeHintOptions) -> s.ShowTypeHintsForLocalBindings) |
13 changes: 13 additions & 0 deletions
13
...rper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/Options/FSharpTypeHintsOptionsRegistrator.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Daemon.Options | ||
|
||
open JetBrains.Application.Parts | ||
open JetBrains.Application.Settings | ||
open JetBrains.ProjectModel | ||
open JetBrains.ReSharper.Feature.Services.InlayHints | ||
open JetBrains.ReSharper.Plugins.FSharp.Settings | ||
|
||
[<SolutionComponent(InstantiationEx.LegacyDefault)>] | ||
type FSharpTypeHintsOptionsRegistrator(inlayHintsOptionsStore: InlayHintsOptionsStore, settingsStore: ISettingsStore) = | ||
do | ||
let settingsKey = settingsStore.Schema.GetKey<FSharpTypeHintOptions>() | ||
inlayHintsOptionsStore.RegisterSettingsKeyToRehighlightVisibleDocumentOnItsChange(settingsKey) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.