Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #9457 from mono/removeITextView3
Browse files Browse the repository at this point in the history
Sync vs-editor-api and adopt code to changes
  • Loading branch information
sandyarmstrong authored Dec 18, 2019
2 parents a89047e + c4bdc23 commit 646adc7
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 15 deletions.
13 changes: 13 additions & 0 deletions main/Main.sln
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextLogicUtil", "external\v
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextUIUtil", "external\vs-editor-api\src\Editor\Text\Util\TextUIUtil\TextUIUtil.csproj", "{B2B41590-92EF-4120-B9B8-E861F3903FDD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextUICocoaUtil", "external\vs-editor-api\src\Editor\Text\Util\TextUICocoaUtil\TextUICocoaUtil.csproj", "{B2B41590-670F-4169-B3D4-7BC7E77900CE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{10D43FCD-8287-47D2-A8DD-7BDC77CFBDE7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Def", "Def", "{1EA941BE-66DE-4D0E-B840-FC556F5BA803}"
Expand Down Expand Up @@ -2435,6 +2437,16 @@ Global
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
{3AFF3617-E88F-4F96-AA81-00D3D9E15C05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AFF3617-E88F-4F96-AA81-00D3D9E15C05}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{3AFF3617-E88F-4F96-AA81-00D3D9E15C05}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -2862,6 +2874,7 @@ Global
{1206D585-670F-4951-A6BF-493C79C950E4} = {745BF6CA-BC7C-4863-B1B4-C423A828820A}
{69F195E1-A8C9-43B3-AE91-A8FC79393163} = {745BF6CA-BC7C-4863-B1B4-C423A828820A}
{B2B41590-92EF-4120-B9B8-E861F3903FDD} = {745BF6CA-BC7C-4863-B1B4-C423A828820A}
{B2B41590-670F-4169-B3D4-7BC7E77900CE} = {745BF6CA-BC7C-4863-B1B4-C423A828820A}
{10D43FCD-8287-47D2-A8DD-7BDC77CFBDE7} = {5A92B792-BF17-4748-B29E-34C99B2E8722}
{1EA941BE-66DE-4D0E-B840-FC556F5BA803} = {10D43FCD-8287-47D2-A8DD-7BDC77CFBDE7}
{3AFF3617-E88F-4F96-AA81-00D3D9E15C05} = {1EA941BE-66DE-4D0E-B840-FC556F5BA803}
Expand Down
1 change: 0 additions & 1 deletion main/build/MacOSX/BinaryCompatBaseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ In assembly 'Microsoft.VisualStudio.Utilities, Version=15.0.0.0, Culture=neutral
In assembly 'Microsoft.VisualStudio.Utilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Unable to resolve type reference 'System.Windows.Media.VisualTreeHelper' in 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
In assembly 'Microsoft.VisualStudio.Utilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Unable to resolve type reference 'System.Windows.PresentationSource' in 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
In assembly 'Microsoft.VisualStudio.Utilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Unable to resolve type reference 'System.Windows.TextTrimming' in 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
In assembly 'Microsoft.VisualStudio.Utilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Unable to resolve type reference 'System.Windows.UIElement' in 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
In assembly 'Microsoft.VisualStudio.Utilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Unable to resolve type reference 'System.Windows.Window' in 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
In assembly 'MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3ead7498f347467b': unable to resolve reference to 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
In assembly 'MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3ead7498f347467b': unable to resolve reference to 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Expand Down
2 changes: 1 addition & 1 deletion main/external/vs-editor-api
Submodule vs-editor-api updated 37 files
+3 −0 build/Project.props
+2 −2 global.json
+27 −0 src/Editor/FPF/PresentationCore/System.Windows.UIElement.cs
+1 −1 src/Editor/Language/Def/Intellisense/IPopupIntellisensePresenter.cs
+5 −0 src/Editor/Text/Def/TextUI/AssemblyInfo.cs
+0 −30 src/Editor/Text/Def/TextUI/Editor/ITextView3.cs
+0 −174 src/Editor/Text/Def/TextUI/Editor/ITextViewFactoryService.cs
+46 −0 src/Editor/Text/Def/TextUI/Editor/ITextViewZoomManager.cs
+30 −0 src/Editor/Text/Def/TextUI/Editor/IViewScroller2.cs
+17 −6 src/Editor/Text/Def/TextUI/Operations/IEditorOperations4.cs
+19 −1 src/Editor/Text/Def/TextUICocoa/Editor/ICocoaTextView.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Editor/IViewSynchronizationManager.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/CodeSnippet.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/ExpansionField.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/ExpansionTemplate.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/IExpansionClient.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/IExpansionFunction.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/IExpansionManager.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/IExpansionService.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/IExpansionServiceProvider.cs
+0 −0 src/Editor/Text/Def/TextUICocoa/Snippet/IExpansionSession.cs
+3 −3 src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentService.cs
+1 −1 src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentServiceFactory.cs
+1 −1 src/Editor/Text/Impl/BraceCompletion/BraceCompletionImpl.csproj
+41 −41 src/Editor/Text/Impl/EditorOperations/EditorOperations.cs
+7 −0 src/Editor/Text/Impl/EditorOperations/EditorOperationsFactoryService.cs
+1 −0 src/Editor/Text/Util/TextDataUtil/AssemblyInfo.cs
+48 −0 src/Editor/Text/Util/TextUICocoaUtil/AssemblyInfo.cs
+65 −0 src/Editor/Text/Util/TextUICocoaUtil/CocoaTextViewZoomManager.cs
+4 −4 src/Editor/Text/Util/TextUICocoaUtil/DifferenceBrushManager.cs
+0 −0 src/Editor/Text/Util/TextUICocoaUtil/IDragDropMouseProcessor.cs
+0 −0 src/Editor/Text/Util/TextUICocoaUtil/TelemetryLogger.cs
+35 −0 src/Editor/Text/Util/TextUICocoaUtil/TextUICocoaUtil.csproj
+27 −0 src/Editor/Text/Util/TextUIUtil/DefaultTextViewZoomManager.cs
+42 −43 src/Editor/Text/Util/TextUIUtil/ExtensionMethods.cs
+35 −0 src/Editor/Text/Util/TextUIUtil/TextViewZoomManager.cs
+12 −4 src/OpenSource.Impl.projitems
1 change: 1 addition & 0 deletions main/msbuild/ReferencesVSEditor.Mac.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<IncludeCopyLocal Include="Microsoft.VisualStudio.Language.StandardClassification.dll" />
<IncludeCopyLocal Include="Microsoft.VisualStudio.Text.Data.Utilities.dll" />
<IncludeCopyLocal Include="Microsoft.VisualStudio.Text.UI.Utilities.dll" />
<IncludeCopyLocal Include="Microsoft.VisualStudio.Text.UI.Cocoa.Utilities.dll" />
<IncludeCopyLocal Include="Microsoft.VisualStudio.UI.Text.AdornmentLibrary.ToolTip.Implementation.dll" />
<IncludeCopyLocal Include="Microsoft.VisualStudio.UI.Text.Cocoa.View.Implementation.dll" />
<IncludeCopyLocal Include="Microsoft.VisualStudio.Language.StandardClassification.Implementation.dll" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
namespace Microsoft.VisualStudio.Text.Editor
{
internal interface IMdTextView :
#if WINDOWS
ITextView2
#else
ITextView3
#endif
internal interface IMdTextView : ITextView2
{
MonoDevelop.SourceEditor.IMDSpaceReservationManager GetSpaceReservationManager(string name);

Gtk.Container VisualElement
{
get;
Gtk.Container VisualElement
{
get;
}

void Focus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<Import assembly="../../../bin/Microsoft.VisualStudio.Text.PatternMatching.Implementation.dll" />
<Import assembly="../../../bin/Microsoft.VisualStudio.Text.UI.Cocoa.dll" />
<Import assembly="../../../bin/Microsoft.VisualStudio.Text.UI.Utilities.dll" />
<Import assembly="../../../bin/Microsoft.VisualStudio.Text.UI.Cocoa.Utilities.dll" />
<Import assembly="../../../bin/Microsoft.VisualStudio.Text.UI.Wpf.dll" />
<Import assembly="../../../bin/Microsoft.VisualStudio.UI.Text.Commanding.Implementation.dll" />
<Import assembly="../../../bin/Microsoft.VisualStudio.UI.Text.EditorOperations.Implementation.dll" />
Expand Down Expand Up @@ -74,6 +75,7 @@
<Assembly file="../../../bin/Microsoft.VisualStudio.Text.Outlining.Implementation.dll" />
<Assembly file="../../../bin/Microsoft.VisualStudio.Text.PatternMatching.Implementation.dll" />
<Assembly file="../../../bin/Microsoft.VisualStudio.Text.UI.Utilities.dll" />
<Assembly file="../../../bin/Microsoft.VisualStudio.Text.UI.Cocoa.Utilities.dll" />
<Assembly file="../../../bin/Microsoft.VisualStudio.Text.UI.Wpf.dll" />
<Assembly file="../../../bin/Microsoft.VisualStudio.Text.UI.Cocoa.dll" />
<Assembly file="../../../bin/Microsoft.VisualStudio.UI.Text.Commanding.Implementation.dll" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ bool CanHandleCommand (object commandId)
}
}
#if !WINDOWS
if (TextView is ITextView3 textView3)
return textView3.IsKeyboardFocused;
if (TextView is ICocoaTextView cocoaTextView)
return cocoaTextView.IsKeyboardFocused;
#endif

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void IToolboxConsumer.ConsumeItem (ItemToolboxNode item)
if (item is ITextToolboxNode tn) {
tn.InsertAtCaret (this.Document);
#if !WINDOWS
((ITextView3)TextView).Focus ();
((ICocoaTextView)TextView).Focus ();
#endif
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ protected void UpdateEnableDisableFolding (CommandInfo info)
#else
info.Text = IsFoldMarkerMarginEnabled ? GettextCatalog.GetString ("Disable _Folding") : GettextCatalog.GetString ("Enable _Folding");
info.Enabled = GetContent<IFoldable> () != null ||
GetContent<Microsoft.VisualStudio.Text.Editor.ITextView3> () != null;
GetContent<Microsoft.VisualStudio.Text.Editor.ITextView> () != null;
// As we need to support both the new and the legacy editor, we need to check if perhaps
// we are running in the new one. The legacy editor already implements <see cref="ITextView"/>
// so we can't simply look for that and we do not want to import anything related to Cocoa.
Expand Down

0 comments on commit 646adc7

Please sign in to comment.