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

Support Visual Studio for Mac 2019 #49

Closed
wants to merge 7 commits into from

Conversation

@rdavisau
Copy link
Collaborator

@rdavisau rdavisau commented Apr 8, 2019

(Not ready to merge!)

This PR aims to update Continuous to support Visual Studio for Mac 2019 by making the changes required to support the new editor APIs. From my initial assessment, we need to do the following:

  • Replace usages of deprecated Document.Editor property with ITextView/ITextBuffer-based equivalents
  • Replace usages of deprecated Document.Analysis property with an alternative solution
  • Replace Document.Editor-based document manipulation (used for writing back watch results)
  • Test it all properly, make sure things still work as expected

So far, the core functionality (so, everything except for watch results) is working OK. I used this guide to help identify API replacements.

I've had the work at this state for the last couple of weeks but haven't done much iOS development over that time. That will probably change next week and I'll be able to test drive this against real world projects, but I'm putting this up here in case anyone else has a need for it in the short term.

My main concern currently is about whether we are causing any additional typing latency (noting that it's also possible that the previous version was causing latency). I'm not sure that TextBuffer.Changed (the new API I've used to detect document changes) is semantically equivalent to the old Document.DocumentParsed; the new API requires throttling moving processing off the main thread to work well.

@rdavisau
Copy link
Collaborator Author

@rdavisau rdavisau commented May 31, 2019

Just to update anyone interested - it took a little longer than expected for me to hit some heavy iOS work, but I have been using this version in anger for the last few weeks and I'm happy that the performance of Continuous doesn't appear to have changed significantly with these updates. All that is outstanding is the write back of 'watch statements', which I will now look into.

Loading

boundDoc = doc;
if (boundDoc != null) {
boundDoc.DocumentParsed += ActiveDoc_DocumentParsed;
buffer = doc.GetContent<ITextBuffer2>();

Choose a reason for hiding this comment

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

If you use ITextBuffer here instead of ITextBuffer2 it will work with both the old and the new text editor.

Loading

@rdavisau rdavisau force-pushed the support-vsm2019 branch from 3d84a1e to 3482d81 Jul 18, 2019
@rdavisau
Copy link
Collaborator Author

@rdavisau rdavisau commented Jul 19, 2019

Watch variables are now working again:

image

With that, this has the minimum set of changes required to make things work on 2019. But, this branch history is borked so I'll think I'll open a new PR.

Loading

@rdavisau
Copy link
Collaborator Author

@rdavisau rdavisau commented Jul 19, 2019

Superseded by #50

Loading

@rdavisau rdavisau closed this Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants