Skip to content

Commit

Permalink
Rider 2023.3 support (#452)
Browse files Browse the repository at this point in the history
* Rider 2023.3 version bump

* Replace obsolete methods

* Use GroupingEventHosts instead of now internal GroupingEventHost constructor
  • Loading branch information
freza-tm authored Dec 13, 2023
1 parent 8049b73 commit 9d3ba15
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/XamlStyler.Extension.Rider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ plugins {
id 'java'

// RIDER: May need updating with new Rider releases
id 'org.jetbrains.kotlin.jvm' version '1.7.22'
id 'org.jetbrains.kotlin.jvm' version '1.9.10'
id 'com.jetbrains.rdgen' version '2023.2.0'

// RIDER: Will probably need updating with new Rider releases, use latest version number from https://github.com/JetBrains/gradle-intellij-plugin/releases
id 'org.jetbrains.intellij' version '1.15.0'
id 'org.jetbrains.intellij' version '1.16.1'
}

ext {
Expand All @@ -25,7 +25,7 @@ repositories {
}

wrapper {
gradleVersion = '7.6'
gradleVersion = '8.5'
distributionType = Wrapper.DistributionType.ALL
distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
}
Expand Down
2 changes: 1 addition & 1 deletion src/XamlStyler.Extension.Rider/dotnet/Plugin.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<!-- RIDER: To be updated with new Rider release -->

<SdkVersion>2023.2.0</SdkVersion>
<SdkVersion>2023.3.0</SdkVersion>
<Title>XAML Styler</Title>
<Description>XAML Styler is an extension that formats XAML source code based on a set of styling rules. This tool can help you/your team maintain a better XAML coding style as well as a much better XAML readability.</Description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public StringListViewModel(
{
myLifetime = lifetime;
mySource = source;
myEntryChanged = new GroupingEventHost(lifetime, false).CreateEvent(lifetime,
myEntryChanged = new GroupingEventHosts(lifetime)[Rgc.Invariant].CreateEvent(lifetime,
"StringListViewModel.EntryChangedGrouped",
TimeSpan.FromMilliseconds(100),
OnEntryChanged);
Expand All @@ -30,8 +30,8 @@ public StringListViewModel(
.Select(entry => new StringListEntry(lifetime, myEntryChanged.Incoming, entry.Trim()))
.ToList();

Entries = new ListEvents<StringListEntry>(lifetime, "StringListViewModel.Entries", entries, false);
SelectedEntry = new Property<StringListEntry>(lifetime, "StringListViewModel.SelectedEntry");
Entries = new ListEvents<StringListEntry>("StringListViewModel.Entries", entries, false);
SelectedEntry = new Property<StringListEntry>("StringListViewModel.SelectedEntry");
}

public ListEvents<StringListEntry> Entries { get; }
Expand Down Expand Up @@ -71,7 +71,7 @@ public StringListEntry(
[NotNull] ISimpleSignal entryChanged,
string value)
{
Value = new Property<string>(lifetime, "StringListEntry.Value", value);
Value = new Property<string>("StringListEntry.Value", value);
Value.Change.Advise_NoAcknowledgement(lifetime, entryChanged.Fire);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public XamlStylerOptionsPage(
// Configuration
AddHeader("Configuration");
AddText("External configuration file:");
var configPath = new Property<FileSystemPath>(lifetime, "XamlStylerOptionsPage::configPath");
var configPath = new Property<FileSystemPath>("XamlStylerOptionsPage::configPath");
OptionsSettingsSmartContext.SetBinding(lifetime, (XamlStylerSettings k) => k.ConfigPath, configPath);
AddFileChooserOption(configPath, "External configuration file", FileSystemPath.Empty, null, commonFileDialogs, null, false, "", null, null, null, null);
AddBoolOption((XamlStylerSettings x) => x.SearchToDriveRoot, "Search to drive root");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public RiderXamlStylerHost(
if (rdSolutionModel != null)
{
var rdXamlStylerModel = rdSolutionModel.GetXamlStylerModel();
rdXamlStylerModel.PerformReformat.Set(PerformReformatHandler);
rdXamlStylerModel.PerformReformat.SetAsync(PerformReformatHandler);
}
}

private RdTask<RdXamlStylerFormattingResult> PerformReformatHandler(
private Task<RdXamlStylerFormattingResult> PerformReformatHandler(
Lifetime requestLifetime,
RdXamlStylerFormattingRequest request)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected override Action<ITextControl> ExecutePsiTransaction(
[NotNull] IProgressIndicator progress)
{
// Fetch settings
var lifetime = solution.GetLifetime();
var lifetime = solution.GetSolutionLifetimes().MaximumLifetime;
var settings = solution.GetSettingsStore().SettingsStore.BindToContextLive(lifetime, ContextRange.Smart(solution.ToDataContext()));
var stylerOptions = StylerOptionsFactory.FromSettings(
settings,
Expand Down
2 changes: 1 addition & 1 deletion src/XamlStyler.Extension.Rider/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ BuildConfiguration=Release
# 2021.2 (stable versions)
#
# RIDER: To be updated with new Rider release
ProductVersion=2023.2
ProductVersion=2023.3

0 comments on commit 9d3ba15

Please sign in to comment.