Commit Graph

11 Commits

Author SHA1 Message Date
Ryan Nowak e248f2fb2a Rename a file 2018-06-06 09:30:24 -07:00
N. Taylor Mullen 56d69db0fa Add Razor document tracking to FallbackRazorProjectHost.
- VisualStudio defaults to adding a `<none>` link item when right click -> add existing item for Razor files; therefore, this also includes the knowledge of the "None" item group when finding Razor files.
- Added unit and functional tests to verify the new `FallbackRazorProjectHost` behavior.
- Added new schema items to represent the `Content` and `None` item type information (pulled from the project system repo).

#2373
2018-05-30 11:15:25 -07:00
Ryan Nowak fafdd7e3af Track the open/closed state of documents
This change intoduces content changes to our project snapshots. We now
know the open/closed state of documents that are initialized by the
Razor project system and listen to the correct data source based on
whether the file is open in the editor.

There are a few other random improvements in here as well like a
workaround for the upcoming name change to our OOP client type.
2018-05-11 08:18:08 -07:00
Ryan Nowak e0612d7e07 Fixes for the document window state 2018-05-03 10:28:13 -07:00
Ryan Nowak e2edc280c5 Add documents, engine, tag helpers to snapshot
The project snapshot now maintains a RazorProjectEngine as well as set
of Tag Helpers that are known for that snapshot.

Pivoted some more services to be snapshot-centric.

Also added the ability to track .cshtml documents to the project system.
For now most components just ignore document changes.
2018-04-25 19:05:54 -04:00
N. Taylor Mullen 1d602d1205 Add host project system for VS4Mac.
- Tied into VS4Macs ProjectExtensions in order to bootstrap our Razor world.
- We currently watch all DotNet projects with the expectation that they're the only ones that can potentially turn into Razor compatible projects.
- Added a fallback Razor project host which is used for pre-Razor SDK Razor versions (< 2.1).
- Added a default Razor project host which consumes all MSBuild data from the users packages and sets up the Razor world accordingly.
- Had to modify some existing contracts to work better with new expectations. one of these was the VS4Mac specific Workspace accessor; essentially we needed to be able to lookup a workspace from a solution.
- Some of our previous expectations about addins were wrong (not being able to directly reference your libraries). To avoid using reflection to bootstrap our types I tried out directly referencing our libraries and all worked fine.
- Refactored the DefaultRazorProjectHost in windows (since we had to in Mac) for testing purposes.

#2081
2018-03-13 15:31:45 -07:00
N. Taylor Mullen 492e958114 Change HostProjectBuildComplete to persist workspace projects.
- This was missed in the VS15.7 movement to dev.
2018-03-13 15:11:21 -07:00
Ryan Nowak d6784b5f16 Report faults on Razor project system exceptions
Using the async-tasks service will automatically handle and report
exceptions from the project system
2018-02-28 13:04:42 -08:00
Ryan Nowak 5008c7803c Add a project system
Step 1: Add HostProject

This is a somewhat complex addition to the ProjectSnapshotManager. Now
that we accept updates from the underlying IDE project system we need to
coordinate those with the Workspace.

This means that ProjectSnapshot itself now also has a version concept.

Step 2: Introduce a new project system based on CPS

We use project capabilities defined by the Razor SDK to determine
whether to rely on MSBuild evaluation to detect the configuration or
whether to fallback to assembly-based detection.

Step 3: Flow RazorConfiguration everywhere

We use now expose the RazorConfiguration to the language service and
editor. This means that we no longer need to detect the project's
configuration asynchronously, it happens much faster now.
2018-02-19 14:39:19 -08:00
Nate McMaster 13824c418e Catch 15.7 up with dev
This change integrates most of the non-breaking work that we did in 2.1
including the updates to make Razor less coupled to MVC.
2018-02-19 10:46:16 -08:00
Ryan Nowak 6e6a24cbb4 Add a background listener for notifications
This change adds an actual background worker for listening to project
change notifications and starts sending updates when the project's razor
dependencies change.

I had to do a litle surgery to get things working. There were plenty of
small bug fixes.

Additionally I got rid of the WeakReferences for tracking listeners. I
was seeing TextBuffers hanging around in VS longer than I expected and
the WeakReferences weren't getting cleaned up. I think it's better that
we just track the lifetime.
2017-09-18 16:56:53 -07:00