Skip to content

Commit

Permalink
Merge pull request #315 from tomasr/develop
Browse files Browse the repository at this point in the history
v4.4 Release
  • Loading branch information
tomasr authored May 9, 2022
2 parents 7ebf9f6 + b7993d4 commit fd0f89f
Show file tree
Hide file tree
Showing 70 changed files with 659 additions and 1,381 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Viasfora

A Visual Studio 2012 - 2017 extension that enhances the
A Visual Studio 2020 extension that enhances the
text editing experience!

__Official Site__: http://viasfora.com/
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ configuration: Release

platform: Any CPU

image: Visual Studio 2017
image: Visual Studio 2022

environment:
EnableNuGetPackageRestore: true
Expand Down
3 changes: 3 additions & 0 deletions src/Viasfora.Core/Commands/TextViewCommandListener.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Editor;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.TextManager.Interop;
using Microsoft.VisualStudio.Utilities;
Expand Down Expand Up @@ -54,6 +55,7 @@ public TextViewCommandHandler(TextViewCommandListener provider, IVsTextView view
}

public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) {
ThreadHelper.ThrowIfNotOnUIThread();
var cmdId = (int)prgCmds[0].cmdID;
var handler = this.provider.FindHandler(pguidCmdGroup, cmdId);
if ( handler != null ) {
Expand Down Expand Up @@ -87,6 +89,7 @@ public void SetOleCmdText(IntPtr pCmdText, string text) {
}

public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) {
ThreadHelper.ThrowIfNotOnUIThread();
int hr = VSConstants.S_OK;
var cmdId = (int)nCmdID;
var handler = this.provider.FindHandler(pguidCmdGroup, cmdId);
Expand Down
7 changes: 4 additions & 3 deletions src/Viasfora.Core/Compatibility/SComponentModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using Microsoft.VisualStudio.Shell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Winterdom.Viasfora.Compatibility {

Expand All @@ -15,8 +12,12 @@ public class SComponentModel {
private object sComponentModel;

public SComponentModel() {
ThreadHelper.ThrowIfNotOnUIThread();
this.sComponentModel =
ServiceProvider.GlobalProvider.GetService(new Guid(SComponentModelHost));
if ( this.sComponentModel == null ) {
throw new InvalidOperationException("SComponentModelHost not available");
}
}

public T GetService<T>() {
Expand Down
290 changes: 0 additions & 290 deletions src/Viasfora.Core/Design/UIElementDialogPage.cs

This file was deleted.

7 changes: 0 additions & 7 deletions src/Viasfora.Core/KnownFeatures.cs

This file was deleted.

2 changes: 2 additions & 0 deletions src/Viasfora.Core/Margins/DevViewMargin.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Windows;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Projection;
using Microsoft.VisualStudio.Utilities;
Expand Down Expand Up @@ -104,6 +105,7 @@ private void OnGraphBuffersChanged(object sender, GraphBuffersChangedEventArgs e
}

private void OnViewBuffer(object sender, EventArgs e) {
ThreadHelper.ThrowIfNotOnUIThread();
var buffer = GetSelectedBuffer();
if ( buffer != null ) {
OpenBufferInEditor(buffer);
Expand Down
2 changes: 2 additions & 0 deletions src/Viasfora.Core/Outlining/UserOutliningManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text;
using Winterdom.Viasfora.Settings;

Expand All @@ -20,6 +21,7 @@ public static IOutliningManager GetManager(ITextBuffer buffer) {
}

protected override void OnSpanAdded(SnapshotSpan span) {
ThreadHelper.ThrowIfNotOnUIThread();
UpdateUserSettings(span.Snapshot.TextBuffer, span.Snapshot);
}
protected override void OnRegionRemoved(SnapshotPoint point) {
Expand Down
Loading

0 comments on commit fd0f89f

Please sign in to comment.