Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crashes in Release build #63

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 3 additions & 2 deletions MonacoEditorComponent/Monaco/Editor/IModelDeltaDecoration.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using Monaco.Helpers;
using Newtonsoft.Json;

namespace Monaco.Editor
{
Expand All @@ -10,7 +11,7 @@ public sealed class IModelDeltaDecoration
[JsonProperty("options")]
public IModelDecorationOptions Options { get; private set; }

[JsonProperty("range")]
[JsonProperty("range"), JsonConverter(typeof(InterfaceToClassConverter<IRange, Range>))]
public IRange Range { get; private set; }

public IModelDeltaDecoration(IRange range, IModelDecorationOptions options)
Expand Down
5 changes: 4 additions & 1 deletion MonacoEditorComponent/Monaco/Helpers/CssGlyphStyle.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Monaco.Helpers
using Newtonsoft.Json;

namespace Monaco.Helpers
{
[JsonConverter(typeof(CssStyleConverter))]
public sealed class CssGlyphStyle : ICssStyle
{
public System.Uri GlyphImage { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion MonacoEditorComponent/Monaco/Helpers/CssInlineStyle.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text;
using Newtonsoft.Json;
using System.Text;
using Windows.UI.Text;
using Windows.UI.Xaml.Media;

Expand All @@ -7,6 +8,7 @@ namespace Monaco.Helpers
/// <summary>
/// Inline styles modify the text style itself and are useful for manipulating the colors and styles of text to indicate conditions.
/// </summary>
[JsonConverter(typeof(CssStyleConverter))]
public sealed class CssInlineStyle : ICssStyle
{
public TextDecoration TextDecoration { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion MonacoEditorComponent/Monaco/Helpers/CssLineStyle.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json;
using System;
using System.Text;
using Windows.UI.Xaml.Media;

Expand All @@ -8,6 +9,7 @@ namespace Monaco.Helpers
/// Simple Proxy to general CSS Line Styles.
/// Line styles are overlayed behind text in the editor and are useful for highlighting sections of text efficiently
/// </summary>
[JsonConverter(typeof(CssStyleConverter))]
public sealed class CssLineStyle : ICssStyle
{
public SolidColorBrush BackgroundColor { get; set; }
Expand Down
1 change: 0 additions & 1 deletion MonacoEditorComponent/Monaco/Helpers/ICssStyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Monaco.Helpers
{
[JsonConverter(typeof(CssStyleConverter))]
public interface ICssStyle
{
uint Id { get; }
Expand Down
10 changes: 5 additions & 5 deletions MonacoEditorComponent/MonacoEditorComponent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>MonacoEditorComponent</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -252,18 +252,18 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.10</Version>
<Version>6.2.12</Version>
</PackageReference>
<PackageReference Include="Microsoft.TypeScript.MSBuild">
<Version>3.8.3</Version>
<Version>4.3.5</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="Nito.AsyncEx">
<Version>5.0.0</Version>
<Version>5.1.0</Version>
</PackageReference>
<PackageReference Include="ObservableVector">
<Version>2.1.0</Version>
Expand Down
2 changes: 1 addition & 1 deletion MonacoEditorTestApp/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ private async void ButtonSetMarker_Click(object sender, RoutedEventArgs e)
}
else
{
//Editor.Markers.Clear();
Editor.Markers.Clear();
await Editor.SetModelMarkersAsync("CodeEditor", Array.Empty<IMarkerData>());
Comment on lines +363 to 364
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't we need only one and not the other? Trying to remember why the original line was commented out now.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this is the resolution to #62, but not sure why the next line wasn't accomplishing the same thing...


_actionProvider.IsOn = false;
Expand Down
4 changes: 2 additions & 2 deletions MonacoEditorTestApp/MonacoEditorTestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>MonacoEditorTestApp</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -138,7 +138,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.10</Version>
<Version>6.2.12</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down