Commit Graph

11 Commits

Author SHA1 Message Date
Ryan Nowak baa71375d0
Add and process notifications for Imports (#2656)
This builds support for tracking the effect of changes to imports on
other documents, and completes our model for being able to keep
generated code up to date.
2018-10-19 21:39:43 -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 1d5245c421 Reorganize file tracker
This is precursor to a much bigger change. Pushing out some of the
changes that have broad impact early to make it easier to review the
real change.
2018-05-08 16:27:51 -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 a6d03bd407 Workaround MonoDevelop.Core.FilePath tests failing to run due to strong name issues. 2018-03-13 16:56:23 -07: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 5c456fbd04 Merge branch 'rel/vs15.7' into dev
# Conflicts:
#	build/dependencies.props
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DefaultProjectSnapshot.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DefaultProjectSnapshotManager.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DefaultProjectSnapshotWorker.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DefaultProjectSnapshotWorkerFactory.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/ProjectSnapshot.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/ProjectSnapshotUpdateContext.cs
#	src/Microsoft.VisualStudio.Editor.Razor/DefaultVisualStudioDocumentTracker.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/Legacy/LegacyTagHelperResolver.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj
#	src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectSystem/Rules/RazorConfiguration.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectSystem/Rules/RazorExtension.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectSystem/Rules/RazorGeneral.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectSystem/Rules/RazorProjectProperties.cs
#	test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/ProjectSystem/DefaultProjectSnapshotTest.cs
#	test/Microsoft.VisualStudio.Editor.Razor.Test/Microsoft.VisualStudio.Editor.Razor.Test.csproj
2018-03-05 22:58:07 -08:00
N. Taylor Mullen fff1c01aa0 Add Mac implementation of VisualStudioWorkspaceAccessor new APIs.
- The Mac implementation does not have fallback logic like the windows variant because Workspaces in VS mac world are spun up / torn down regularly. We don't want to be tracking down bugs that involve us adding services or Razor logic to Workspaces that have nothing to do with Razor.
- Added a test for the `DefaultVisualStudioWorkspaceAccessor`. Could not add other tests due to limitations of MonoDevelop's abstractions.

#1989
2018-02-01 14:51:23 -08:00
N. Taylor Mullen f025a27f04 Unify how AdhocWorkspace is constructed.
- Created a new `TestWorkspace` type to lock on `AdhocWorkspace` construction. This type can't be constructed/changed in parallel.
- Updated test usages of `AdhocWorkspace` to make use of `TestWorkspace`.
- Added a `Microsoft.CodeAnalysis.Razor.Workspaces.Test.Common` project to have the `TestWorkspace` type.

#1913
2018-01-12 17:54:53 -08:00
N. Taylor Mullen 4b93741610 Add Mac project build change trigger.
- Added a Mac specific implementation of the project build change trigger. It applies to all types of project builds so we need to do a little extra filtering to ensure that we're not operating on a non-ASP.NET Core project.
- Added tests to validate that the project build event fires correctly.

#1851
2017-12-18 17:23:43 -08:00
N. Taylor Mullen b73c50be41 Add Mac implementation of FileChangeTracker.
- Added a LanguageServices Mac test project.
- Added a few tests for the new `DefaultFileChangeTracker`. There's currently an issue with the MonoDevelop.Core binaries we're compiling against which doesn't allow me to unit test other pieces of the class (they depend on instantiating mono develop objects).
- Added IVT from product projects to new mac testing project.

#1789
2017-12-12 15:47:16 -08:00