Skip to content

Commit

Permalink
Remove VimGrep functionality
Browse files Browse the repository at this point in the history
Several classes in VSMac became internal at some point. These were
related to "Find in Files" functionality.

This unfortunately means that we need to remove VimGrep functionality for now.
We can probably reinstate it by providing the UI for VimGrep ourselves. It's
not a good time to do this right now though as VSMac is transitioning from GTK
to use Cocoa for UI.

Update VSMac and Mono to latest stable versions.
  • Loading branch information
Jason Imison authored and nosami committed Apr 22, 2021
1 parent d5a64c3 commit 369641e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 62 deletions.
10 changes: 5 additions & 5 deletions Scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
echo "Downloading Mono"
wget --quiet https://download.visualstudio.microsoft.com/download/pr/5b7dcb51-3035-46f7-a8cb-efe3a1da351c/dcba976cd3257636b6b2828575d29d3c/monoframework-mdk-6.4.0.208.macos10.xamarin.universal.pkg
wget --quiet https://download.visualstudio.microsoft.com/download/pr/2516b6e5-6965-4f5b-af68-d1959a446e7a/443346a56436b5e2682b7c5b5b25e990/monoframework-mdk-6.12.0.125.macos10.xamarin.universal.pkg

sudo installer -pkg monoframework-mdk-6.4.0.208.macos10.xamarin.universal.pkg -target /
sudo installer -pkg monoframework-mdk-6.12.0.125.macos10.xamarin.universal.pkg -target /

echo "Downloading VSMac"
wget --quiet https://download.visualstudio.microsoft.com/download/pr/82f53c42-6dc7-481b-82e1-c899bb15a753/df08f05921d42cc6b3b02e9cb082841f/visualstudioformac-8.4.0.2350.dmg
wget --quiet https://download.visualstudio.microsoft.com/download/pr/e5b7cb77-1248-4fb7-a3fe-532ca3335f78/777b586636b0cdba9db15d69bf8d8b1f/visualstudioformac-8.9.7.8.dmg

sudo hdiutil attach visualstudioformac-8.4.0.2350.dmg
sudo hdiutil attach visualstudioformac-8.9.7.8.dmg

echo "Removing pre-installed VSMac"
sudo rm -rf "/Applications/Visual Studio.app"
Expand All @@ -19,7 +19,7 @@ rm -rf ~/Library/Preferences/Xamarin/
rm -rf ~/Library/Developer/Xamarin
rm -rf ~/Library/Application\ Support/VisualStudio

echo "Installing VSMac 8.4"
echo "Installing VSMac 8.9"
ditto -rsrc "/Volumes/Visual Studio/" /Applications/

msbuild /p:Configuration=ReleaseMac /p:Platform="Any CPU" /t:Restore /t:Build
Expand Down
37 changes: 0 additions & 37 deletions Src/VimMac/ShellWildcardSearchScope.cs

This file was deleted.

20 changes: 0 additions & 20 deletions Src/VimMac/VimHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,26 +265,6 @@ private void EnsureLinePointVisible(ITextView textView, SnapshotPoint point)

public void FindInFiles(string pattern, bool matchCase, string filesOfType, VimGrepFlags flags, FSharpFunc<Unit, Unit> action)
{
var find = new FindReplace();

var options = new FilterOptions
{
CaseSensitive = matchCase,
RegexSearch = true,
};
var scope = new ShellWildcardSearchScope(_vim.VimData.CurrentDirectory, filesOfType);

using (var monitor = IdeApp.Workbench.ProgressMonitors.GetSearchProgressMonitor(true))
{
var results = find.FindAll(scope, monitor, pattern, null, options, System.Threading.CancellationToken.None);
foreach (var result in results)
{
//TODO: Cancellation?
monitor.ReportResult(result);
}
}

action.Invoke(null);
}

public void FormatLines(ITextView textView, SnapshotLineRange range)
Expand Down

0 comments on commit 369641e

Please sign in to comment.