Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Karlaš <david.karlas@microsoft.com>2019-08-16 18:08:19 +0300
committerDavid Karlaš <david.karlas@microsoft.com>2019-08-16 18:08:19 +0300
commitda506282f884d31860bdc94bb270a566bddc577f (patch)
tree2aa262d63566837f071d6c9bbcfd42477d4a6f41
parentbf08f61283c38940a96fab59bfaa6e74f255207c (diff)
-rw-r--r--src/Editor/Language/Def/Intellisense/Completion3.cs9
-rw-r--r--src/Editor/Language/Def/Intellisense/Completion4.cs3
-rw-r--r--src/Editor/Language/Def/Intellisense/CompletionIcon2.cs7
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs3
-rw-r--r--src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj1
-rw-r--r--src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs5
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs3
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs9
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs3
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs11
-rw-r--r--src/Editor/Text/Impl/StandaloneUndo/UndoTransactionImpl.cs2
-rw-r--r--src/FPF/PresentationCore/System.Windows.DataFormats.cs1
12 files changed, 34 insertions, 23 deletions
diff --git a/src/Editor/Language/Def/Intellisense/Completion3.cs b/src/Editor/Language/Def/Intellisense/Completion3.cs
index 1abba8a..513d884 100644
--- a/src/Editor/Language/Def/Intellisense/Completion3.cs
+++ b/src/Editor/Language/Def/Intellisense/Completion3.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation
// All rights reserved
+using Microsoft.VisualStudio.Core.Imaging;
using Microsoft.VisualStudio.Imaging.Interop;
using System;
using System.Collections.Generic;
@@ -10,7 +11,7 @@ using System.Windows.Media;
namespace Microsoft.VisualStudio.Language.Intellisense
{
/// <summary>
- /// Completion3 uses <see cref="ImageMoniker"/>s instead of <see cref="ImageSource"/>s to reference icons.
+ /// Completion3 uses <see cref="ImageId"/>s instead of <see cref="ImageSource"/>s to reference icons.
/// </summary>
[CLSCompliant(false)]
public class Completion3 : Completion2
@@ -35,7 +36,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
public Completion3(string displayText,
string insertionText,
string description,
- ImageMoniker iconMoniker,
+ ImageId iconMoniker,
string iconAutomationText)
: this(displayText, insertionText, description,
iconMoniker, iconAutomationText: iconAutomationText, attributeIcons: null)
@@ -54,7 +55,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
public Completion3(string displayText,
string insertionText,
string description,
- ImageMoniker iconMoniker,
+ ImageId iconMoniker,
string iconAutomationText,
IEnumerable<CompletionIcon2> attributeIcons)
: base(displayText, insertionText, description,
@@ -67,7 +68,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <summary>
/// Gets or sets the moniker used to define a multi-resolution image.
/// </summary>
- public virtual ImageMoniker IconMoniker
+ public virtual ImageId IconMoniker
{
get;
private set;
diff --git a/src/Editor/Language/Def/Intellisense/Completion4.cs b/src/Editor/Language/Def/Intellisense/Completion4.cs
index dec2eac..1c81fc4 100644
--- a/src/Editor/Language/Def/Intellisense/Completion4.cs
+++ b/src/Editor/Language/Def/Intellisense/Completion4.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation
// All rights reserved
+using Microsoft.VisualStudio.Core.Imaging;
using Microsoft.VisualStudio.Imaging.Interop;
using System;
using System.Collections.Generic;
@@ -34,7 +35,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
public Completion4(string displayText,
string insertionText,
string description,
- ImageMoniker iconMoniker,
+ ImageId iconMoniker,
string iconAutomationText = null,
IEnumerable<CompletionIcon2> attributeIcons = null,
string suffix = null)
diff --git a/src/Editor/Language/Def/Intellisense/CompletionIcon2.cs b/src/Editor/Language/Def/Intellisense/CompletionIcon2.cs
index 2f1209a..1d8bd07 100644
--- a/src/Editor/Language/Def/Intellisense/CompletionIcon2.cs
+++ b/src/Editor/Language/Def/Intellisense/CompletionIcon2.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation
// All rights reserved.
+using Microsoft.VisualStudio.Core.Imaging;
using Microsoft.VisualStudio.Imaging.Interop;
using System;
using System.Diagnostics;
@@ -9,7 +10,7 @@ using System.Windows.Media;
namespace Microsoft.VisualStudio.Language.Intellisense
{
/// <summary>
- /// CompletionIcon2 uses <see cref="ImageMoniker"/>s instead of <see cref="ImageSource"/>s to reference icons.
+ /// CompletionIcon2 uses <see cref="ImageId"/>s instead of <see cref="ImageSource"/>s to reference icons.
/// </summary>
[CLSCompliant(false)]
#pragma warning disable CA1036 // Override methods on comparable types
@@ -31,7 +32,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <param name="automationName">The automation name for the icon.</param>
/// <param name="automationId">The automation id for the icon.</param>
/// <param name="position">The display position of the icon. If no value is provided this will be zero.</param>
- public CompletionIcon2(ImageMoniker imageMoniker, string automationName, string automationId, int position=0) : base()
+ public CompletionIcon2(ImageId imageMoniker, string automationName, string automationId, int position=0) : base()
{
this.IconMoniker = imageMoniker;
this.AutomationName = automationName;
@@ -42,7 +43,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <summary>
/// Gets or sets the moniker used to define a multi-resolution image.
/// </summary>
- public virtual ImageMoniker IconMoniker
+ public virtual ImageId IconMoniker
{
get;
private set;
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs b/src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs
index 2d0b486..27eb587 100644
--- a/src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs
+++ b/src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs
@@ -2,6 +2,7 @@
// All rights reserved
using System;
+using Microsoft.VisualStudio.Core.Imaging;
using Microsoft.VisualStudio.Imaging.Interop;
namespace Microsoft.VisualStudio.Language.Intellisense
@@ -15,7 +16,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <summary>
/// The icon shown on the filter's button.
/// </summary>
- ImageMoniker Moniker { get; }
+ ImageId Moniker { get; }
/// <summary>
/// The tooltip shown when the mouse hovers over the button.
diff --git a/src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj b/src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj
index 7857d74..21c94f1 100644
--- a/src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj
+++ b/src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj
@@ -16,7 +16,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.ImageCatalog" />
- <PackageReference Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
diff --git a/src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs b/src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs
index 6abe3ff..a67adc9 100644
--- a/src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs
+++ b/src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs
@@ -2,6 +2,7 @@
// All rights reserved
using System;
+using Microsoft.VisualStudio.Core.Imaging;
using Microsoft.VisualStudio.Imaging.Interop;
namespace Microsoft.VisualStudio.Language.Intellisense
@@ -12,7 +13,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <summary>
/// Create an instance of an IntellisenseFilter with the specified attributes.
/// </summary>
- public IntellisenseFilter(ImageMoniker moniker, string toolTip, string accessKey, string automationText,
+ public IntellisenseFilter(ImageId moniker, string toolTip, string accessKey, string automationText,
bool initialIsChecked = false, bool initialIsEnabled = true)
{
if (string.IsNullOrEmpty(accessKey))
@@ -31,7 +32,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <summary>
/// The icon shown on the filter's button.
/// </summary>
- public ImageMoniker Moniker { get; }
+ public ImageId Moniker { get; }
/// <summary>
/// The tooltip shown when the mouse hovers over the button.
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs b/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs
index 2ef136c..23bb2e2 100644
--- a/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs
+++ b/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation
// All rights reserved
+using Microsoft.VisualStudio.Core.Imaging;
using Microsoft.VisualStudio.Imaging.Interop;
using Microsoft.VisualStudio.Text;
using System;
@@ -50,7 +51,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// Gets an <see cref="ImageMoniker"/> representing an image equivalent for the
/// <see cref="IDocumentPeekResult"/>.
/// </summary>
- ImageMoniker Image { get; }
+ ImageId Image { get; }
/// <summary>
/// Gets the Guid for the desired editor to open when navigating.
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs
index 4647b9a..1977110 100644
--- a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs
@@ -4,6 +4,7 @@
using System;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Imaging.Interop;
+using Microsoft.VisualStudio.Core.Imaging;
namespace Microsoft.VisualStudio.Language.Intellisense
{
@@ -65,7 +66,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <param name="idEndLine">Line number of the result's identifying span's end position.</param>
/// <param name="idEndIndex">Character index of the result's identifying span's end position.</param>
/// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
- IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageMoniker image, string filePath,
+ IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageId image, string filePath,
int startLine, int startIndex, int endLine, int endIndex,
int idStartLine, int idStartIndex, int idEndLine, int idEndIndex);
@@ -85,7 +86,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <param name="idEndIndex">Character index of the result's identifying span's end position.</param>
/// <param name="isReadOnly">Defines whether this result is read-only.</param>
/// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
- IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageMoniker image, string filePath,
+ IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageId image, string filePath,
int startLine, int startIndex, int endLine, int endIndex,
int idStartLine, int idStartIndex, int idEndLine, int idEndIndex,
bool isReadOnly);
@@ -107,7 +108,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <param name="isReadOnly">Defines whether this result is read-only.</param>
/// <param name="editorDestination">A Guid representing the editor the <see cref="IDocumentPeekResult"/> should navigate to.</param>
/// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
- IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageMoniker image, string filePath,
+ IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageId image, string filePath,
int startLine, int startIndex, int endLine, int endIndex,
int idStartLine, int idStartIndex, int idEndLine, int idEndIndex,
bool isReadOnly, Guid editorDestination);
@@ -130,7 +131,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <param name="editorDestination">A Guid representing the editor the <see cref="IDocumentPeekResult"/> should navigate to.</param>
/// <param name="postNavigationCallback">Pass in a callback function to the <see cref="IPeekResult"/>.<seealso cref="IPeekResult.PostNavigationCallback"/></param>
/// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
- IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageMoniker image, string filePath,
+ IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageId image, string filePath,
int startLine, int startIndex, int endLine, int endIndex,
int idStartLine, int idStartIndex, int idEndLine, int idEndIndex,
bool isReadOnly, Guid editorDestination, Action<IPeekResult, object, object> postNavigationCallback);
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs
index 4e84126..1042363 100644
--- a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using Microsoft.VisualStudio.Core.Imaging;
using Microsoft.VisualStudio.Imaging.Interop;
using Microsoft.VisualStudio.Utilities;
@@ -49,7 +50,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// Gets an optional icon representing the suggested action or null if this suggested
/// action doesn't have an icon.
/// </summary>
- ImageMoniker IconMoniker { get; }
+ ImageId IconMoniker { get; }
/// <summary>
/// Gets the text to be used as the automation name for the icon when it's displayed.
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs
index 4c65723..b8a9de6 100644
--- a/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs
@@ -4,6 +4,7 @@
namespace Microsoft.VisualStudio.Language.Intellisense
{
using System;
+ using Microsoft.VisualStudio.Core.Imaging;
using Microsoft.VisualStudio.Imaging.Interop;
/// <summary>
@@ -11,7 +12,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// </summary>
/// <remarks>
/// <see cref="SuggestedActionCategoryToIconDefinition"/>s are associations between
- /// <see cref="SuggestedActionCategoryDefinition"/>s and <see cref="ImageMoniker"/>s
+ /// <see cref="SuggestedActionCategoryDefinition"/>s and <see cref="ImageId"/>s
/// that define an icon for a particular <see cref="ISuggestedActionCategory"/>. Icons
/// are inheritable and icons defined for base categories will be displayed for their
/// children as well, unless the child defines its own icon. Icon definitions are joined
@@ -31,7 +32,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense
public sealed class SuggestedActionCategoryToIconDefinition
{
/// <summary>
- /// Creates a new instance with the specified <see cref="ImageMoniker"/>.
+ /// Creates a new instance with the specified <see cref="ImageId"/>.
/// </summary>
/// <remarks>
/// When a LightBulb session is created, the highest precedence category
@@ -39,8 +40,8 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// with applicable <see cref="ISuggestedAction2"/>s will have its icon displayed in
/// the LightBulb control.
/// </remarks>
- /// <param name="imageMoniker">The <see cref="ImageMoniker"/> of the icon to display.</param>
- public SuggestedActionCategoryToIconDefinition(ImageMoniker imageMoniker)
+ /// <param name="imageMoniker">The <see cref="ImageId"/> of the icon to display.</param>
+ public SuggestedActionCategoryToIconDefinition(ImageId imageMoniker)
{
this.ImageMoniker = imageMoniker;
}
@@ -48,6 +49,6 @@ namespace Microsoft.VisualStudio.Language.Intellisense
/// <summary>
/// Gets the <see cref="ImageMoniker"/> to associate with the named <see cref="ISuggestedActionCategory"/>.
/// </summary>
- public ImageMoniker ImageMoniker { get; set; }
+ public ImageId ImageMoniker { get; set; }
}
}
diff --git a/src/Editor/Text/Impl/StandaloneUndo/UndoTransactionImpl.cs b/src/Editor/Text/Impl/StandaloneUndo/UndoTransactionImpl.cs
index 7bc7db8..41d9b4a 100644
--- a/src/Editor/Text/Impl/StandaloneUndo/UndoTransactionImpl.cs
+++ b/src/Editor/Text/Impl/StandaloneUndo/UndoTransactionImpl.cs
@@ -135,6 +135,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Standalone
// now we need to pump these primitives into the parent, if the parent exists.
FlattenPrimitivesToParent();
+ Dispose();
}
/// <summary>
@@ -184,6 +185,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Standalone
this.primitives.Clear();
this.state = UndoTransactionState.Canceled;
+ Dispose();
}
/// <summary>
diff --git a/src/FPF/PresentationCore/System.Windows.DataFormats.cs b/src/FPF/PresentationCore/System.Windows.DataFormats.cs
index a997a38..3ca9ae2 100644
--- a/src/FPF/PresentationCore/System.Windows.DataFormats.cs
+++ b/src/FPF/PresentationCore/System.Windows.DataFormats.cs
@@ -7,6 +7,7 @@ namespace System.Windows
public static readonly string Rtf = "public.rtf";
public static readonly string Html = "public.html";
public static readonly string CommaSeparatedValue = "public.utf8-tab-separated-values-text";
+ public static readonly string FileDrop = "";
internal static string ConvertToDataFormats(TextDataFormat textDataformat)
{