Skip to content

Commit

Permalink
Fix settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Socolin committed Dec 6, 2023
1 parent 603005c commit 9fbd7cb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
DotnetPluginId=ReSharperPlugin.NSubstituteComplete
DotnetSolution=NSubstituteComplete.sln
RiderPluginId=nsubstitutecomplete
PluginVersion=1.11.0
PluginVersion=1.11.1

BuildConfiguration=Release
PublishToken="_PLACE_HOLDER_"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using JetBrains.Application.Settings;
using JetBrains.Application.UI.Options;
using JetBrains.IDE.UI.Extensions;
using JetBrains.Lifetimes;
using JetBrains.ReSharper.UnitTestFramework.Settings;
using JetBrains.ReSharper.UnitTestFramework.UI.Options.ViewModel;
using JetBrains.Threading;
using JetBrains.Util.Media;

namespace ReSharperPlugin.NSubstituteComplete.Options
{
public class MockAliasesModel : BeTreeGridExtensions.DictionaryModel<string, string>.FromIndexed
{
public MockAliasesModel(
Lifetime lifetime,
[NotNull] GroupingEventHosts hosts,
[NotNull] OptionsSettingsSmartContext smartContext
public class MockAliasesModel(
Lifetime lifetime,
[NotNull] GroupingEventHosts hosts,
[NotNull] OptionsSettingsSmartContext smartContext
)
: BeTreeGridExtensions.DictionaryModel<string, string>.FromScalar<string>(
lifetime,
hosts,
smartContext,
smartContext.Schema.GetScalarEntry<NSubstituteCompleteSettings, string>(s => s.MockAliases),
SemicolonSeparatedPairSerializer.Deserialize,
SemicolonSeparatedPairSerializer.Serialize
)
: base(lifetime, hosts, smartContext, smartContext.Schema.GetIndexedEntry<UnitTestRunnerSettings, IIndexedEntry<string, string>>(s => s.EnvironmentVariablesIndexed))
{
}

public override Entry GetNewEntry() => new(this.myLifetime, this.mySaveRequested.Incoming, string.Empty, string.Empty);
{
public override Entry GetNewEntry() => new(myLifetime, mySaveRequested.Incoming, string.Empty, string.Empty);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ [CanBeNull] ISolution solution
var model = new MockAliasesModel(lifetime, threading.GroupingEvents, smartContext);
var beToolbar = model.SelectedEntry.GetBeSingleSelectionListWithToolbar(model.Entries,
lifetime,
(entryLt, line, _) => new List<BeControl>
{
(entryLt, line, _) =>
[
solution == null ? line.Name.GetBeTextBox(entryLt) : line.Name.GetBeTextBox(entryLt).WithTypeCompletion(solution, lifetime, CSharpLanguage.Instance),
solution == null ? line.Value.GetBeTextBox(entryLt) : line.Value.GetBeTextBox(entryLt).WithTypeCompletion(solution, lifetime, CSharpLanguage.Instance),
},
],
iconHost,
new[] {"Type (interface),*", "Alias,*"},
dock: BeDock.RIGHT)
Expand Down

0 comments on commit 9fbd7cb

Please sign in to comment.