Commit Graph

54 Commits

Author SHA1 Message Date
Ryan Nowak 00dc95098f Update our diagnostics window
Updates our diagnostics window to use the 'in the box' version of the
assembly/version discovery logic.
2017-09-06 15:37:06 -07:00
Ajay Bhargav Baaskaran 5cb11b9bf4 Implmement a project system for Razor 2017-08-30 12:58:38 -07:00
Ryan Nowak d87e0f7fbd Fixes #1632 - track textviews in the document tracker
I've stripped out some of the dead code and complexity from the document
tracker in an attempt to simplify it. I will bring this back as part of
the multi-targeting work.
2017-08-24 10:47:33 -07:00
Nate McMaster 4094e8b8f3 Use PackageReference instead of project.json in the VSIX project (#1642) 2017-08-24 09:30:29 -07:00
Nate McMaster 4cadee2762 Use Directory.Build.props/targets (#1641) 2017-08-23 12:24:57 -07:00
Ajay Bhargav Baaskaran dbcac41be7 Get the correct version of Mvc for multitargeting 2017-08-07 12:55:37 -07:00
Ryan Nowak 5161ebaf8a Enables the Razor Document Tracker
This enables the tracking of events that change the 'razor' state of a
document that's open in the editor.

Also fixed a crash that can occur when creating a new project with the
Razor Info window open.
2017-08-07 12:36:13 -07:00
N. Taylor Mullen aa980fc67c Roslyn-ize our tooling contracts.
- Added `ILanguageServiceFactory` types for all serviceable contracts.
- Maintained binary compatibility by copy/pasting existing services into a Legacy folder.
- Added a Workspaces.Test project since their implementations moved.
- Updated binary incompatible version of `RazorSyntaxFactsService` to not depend on VisualStudio. Added an extension type to the VS.LanguageServices.Razor project to enable easy-access from VisualStudio.

Below on refers to the binary incompatible copies.
Core services that were **entirely** moved from VisualStudio.Razor => Razor.Workspaces are as follows:
- `RazorSyntaxFactsService`, this included mutating the API to not depend on VisualStudio and moving some primitive types such as `AcceptedCharacters`.
- `TagHelperCompletionService`
- `TagHelperFactsService`
These all have a `ServiceLayer` of `Editor`.

Bits that were partially moved:
- `RazorTemplateEngineFactoryService`. The Default implementation and its corresponding factory still live in VisualStudio.Razor. This way Razor.Workspaces can get by without a reference to Mvc.Razor.Extensions.
- `ITagHelperResolver` used to exist in VisualStudio.Razor. Removed the type and replaced its usage with the already-existing `TagHelperResolver` type in Razor.Workspaces. Both contracts were nearly identical.
These all have a `ServiceLayer` of `Default`.

#1260
2017-08-02 16:58:44 -07:00
Ryan Brandenburg 643efbe660 Change version on Binding redirects 2017-07-24 14:50:30 -07:00
Mike Harder 01fe818dcd Update dependencies to match Visual Studio 15.3 (#1534) 2017-07-11 16:34:32 -07:00
Ryan Nowak 1d5dfcc6b4 Update our VSIX version to 15.5 2017-07-10 08:08:09 -07:00
Ryan Nowak 95c5049dd0 Add DisplayName and Description for directives
Renamed Name -> Directive so that it doesn't overlap with DisplayName.
2017-06-07 13:37:34 -07:00
Ryan Nowak fcb8669c98 Use project.json for the VSIX project
Also did some spring cleaning on redundent references in the language
services package.

Note that the 'immutable' packages are now totally redundant with
Shell.15.0. You're supposed to use one or the other. Since our minimum VS
is 15, I just went with shell 15.0.

Now the VSIX project doesn't have many references in it.
2017-06-03 17:27:35 -07:00
N. Taylor Mullen 5aababce6e Remove magic string keys from TH builders.
- Replaced the magic strings with extension methods that produce the same behavior as the string keys did.
- Added tests to validate new extension methods.

#1307
2017-05-19 11:15:38 -07:00
Ryan Nowak f96b22ffc3 Bump VSIX version up to 15.4.XXXXX 2017-05-17 13:38:32 -07:00
N. Taylor Mullen 577511945b Merge branch 'rel/15.3' into dev 2017-05-16 14:54:36 -07:00
N. Taylor Mullen a18b96cbf3 Suppress unneeded dlls from Razor VSIX
#1349
2017-05-16 14:53:25 -07:00
N. Taylor Mullen 01ec2202b2 Remove assembly name filter from THD API.
- This parameter was always passed `null` by tooling in the past.

#1279
2017-05-16 11:06:07 -07:00
Ryan Nowak b17e506ce8 Some API cleanup around directivest 2017-05-12 13:27:28 -07:00
Ryan Nowak 3969c23316 Adds a tracking system for Razor documents
This is a MEF service that can actively or passively track open ITextViews
and give us information about the Razor initialization state and eventing
when it changes.

The purpose of this is to act as a bridge between the VS mef world and the
roslyn world.

For now this doesn't do any passive tracking of Razor documents, it's only
on demand. That means it will only be initialized and used right now when
you are using the Razor developer tools. This is just to reduce our risk,
it's not ideal to ship code in VS that's doing something without anyone
looking at the result.
2017-05-11 08:24:37 -07:00
Ryan Nowak 8881d73598 Bump our VSIX version to 15.3.XXXXX 2017-04-26 10:06:31 -07:00
Ryan Nowak 27148c05f6 Update our Roslyn dependencies to 15.3 2017-04-24 18:59:06 -07:00
N. Taylor Mullen 1d10293db5 Revert "Uncap version max for vsix manifest."
This reverts commit ee1fd61e64.
2017-04-14 16:19:03 -07:00
N. Taylor Mullen ee1fd61e64 Uncap version max for vsix manifest. 2017-04-14 14:12:47 -07:00
N. Taylor Mullen 1b8a4e704c Rename ITagHelperDescriptorBuilder => TagHelperDescriptorBuilder.
#1210
2017-04-11 17:08:38 -07:00
N. Taylor Mullen 0618bae3bd Rename Microsoft.AspNetCore.Razor.Evolution => Microsoft.AspNetCore.Razor.Language.
- Also updated corresponding test project to go from Evolution => Language.
- Regenerated test files to reflect new file paths.

#1169
2017-04-10 10:20:04 -07:00
Pranav K 1bd31f42c0 Updating versions to 2.0.0-preview1 2017-04-03 22:31:17 -07:00
Pranav K ac176f8671 Revert package version changes
Fixes #1098
2017-04-03 15:46:46 -07:00
Pranav K 468c090272 Update vsix metadata 2017-03-31 14:37:50 -07:00
Ryan Brandenburg 9ffc745e76 Add Mvc.Razor.Extensions to VSIX 2017-03-24 11:45:04 -07:00
N. Taylor Mullen 8f9ff1abd9 Clean up TagHelperDescriptor APIs.
- Removed all design time descriptors and put their API surface into their corresponding descriptor. Part of removing the design time API surface was removing the tracking of `<Remarks>`, it wasn't used so there's on need to track it until we need it.
- Removed the Type requirement from `TagHelperDescriptor`. With this separation we'll be able to have abstract `TagHelper`s that aren't based on a class implementation.
- Removed Prefix from the `TagHelperDescriptor` API surface. It was a legacy requirement based on how the Razor parser was put together. We can work around this now.
- Stripped correlation information from the immediate `TagHelperDescriptor` API surface. Instead this information is now tracked in `TagMatchingRule`s. This change means that you will not have multiple `TagHelperDescriptor`s per `TagHelper`; instead it's all tracked in a single descriptor. A side effect of this change was the transformation of `IsIndexer` => 3 new properties.
- Renamed many descriptor types and property names.
- Added builder APIs to construct TagHelpers since they're inherently immutable in their API surface.
- Added `ITagHelperDescriptorBuilder` to represent `TagHelper`s that are built from an `ITagHelper` implementing class. It re-introduces the `TypeName` association of a `TagHelper`.
- Added `ITagHelperBoundAttributeDescriptorBuilder` to represent that an attribute was associated with a property.
- Added validation methods to the descriptor builders to enable consumers to validate the current state of the builder and add diagnostics as necessary.
- Moved descriptors away from RazorError.
- Updated the various comparers to understand the descriptors new API.
- Added a new `RazorDiagnosticFactory` abstraction to handle `RazorDiagnostic`s and their corresponding errors/ids etc. This new API should allow for easy addition of new `RazorDiagnostic` errors.
- Updated the `DefaultTagHelperDescriptorFactory` to construct `TagHelperDescriptor`s using the new builder APIs and in the new descriptor format (1 descriptor per type).
- Updated `ViewComponentTagHelperDescriptorFactory` to construct `TagHelperDescriptor`s with the builder API.
- With both factory implementations code was duplicated because the ViewComponent work will be moving outside of Razor once we have the proper hooks.
- Updated `TagHelper` binding bits to capture a binding result in order to query which rules appy to a given tag name.
Addressed feedback
- Update tests to react to new `TagHelperDescriptor` API.
- Remove case sensitive comparers and some cleanup
- Added TagHelperDescriptorJsonConverter, RazorDiagnosticJsonConverter and added serialization tests
2017-03-17 12:18:05 -07:00
Pranav K ff197e6fed Bump up version of the vsix
Add an icon to the vsix
Change minimum requirement of the vsix to VS RTM

Fixes #1064
Fixes #1056
2017-03-13 13:28:33 -07:00
Ryan Nowak 871f9e43ca Update versions of VS and Roslyn 2.0.0 dependencies
VS has gone RTM so, updating to the RTM versions of those dependencies.

Roslyn does not publish our shim packages on NuGet.org, so updating those
to a non-ancient version for projects that use 2.0.0. The projects that
use 1.3.x are staying put for now.

The code change is dealing with something that was obsoleted.
2017-03-08 08:57:49 -08:00
Pranav K 3772c7c343 Downgrade versions of new packages to 1.0.0 2017-02-27 15:45:17 -08:00
Pranav K 9da7a957f4 Remove facade assemblies from VSIX output
Fixes #940
2017-02-27 08:59:31 -08:00
Ryan Nowak 04395b8bfa Update VSIX version 2017-02-23 15:53:10 -08:00
Ryan Nowak f0d5461e31 Improve branding for our extension 2017-02-23 13:12:58 -08:00
Ryan Nowak 615d8e71d6 ifdef all the Razor Info window code
We don't want to ship this in VS yet :) Now the Razor Info window will
only be available in debug builds.
2017-02-23 11:03:25 -08:00
N. Taylor Mullen 7a2f89b5de Add assembly name filtering to GetTagHelpers calls.
- Updated the Razor extension to properly discover all assembly names available to a project and use those as a TagHelper filter.

#1022
2017-02-17 14:54:06 -08:00
N. Taylor Mullen de6bfa480f Only show C# projects in Razor info window. 2017-02-17 11:18:28 -08:00
Ryan Nowak 290c11ef3a Set ToolsVersion=15.0 2017-02-17 11:13:07 -08:00
N. Taylor Mullen 8c17375be0 Surface TagHelper resolution errors.
- Decided to not expose the resolutions errors in the Razor extension. If we feel that it's good debug information we can add it later.
- Added a `TagHelperResolutionResult` type to Razor.Workspaces so it can be used in the language and remote service.

#1014
2017-02-17 10:51:44 -08:00
Nate McMaster 279855d947
Downgrade to stable packages 2017-02-14 16:15:35 -08:00
Pranav K 80172c641d Fix building the vsix inside VS 2017-02-14 12:55:43 -08:00
Ryan Nowak d72cd469bd Add CodeAnalysis.Razor to the vsix
Also adds some error handling so you can know if something went wrong.
2017-02-10 13:02:52 -08:00
N. Taylor Mullen 6d18c3e85a React to removal of DirectiveTokenDescriptor.Value. 2017-02-07 10:20:25 -08:00
Ryan Nowak 3d5cfc8b8b Bump up binding redircts
The LanguageServices assembly should now be a 1.2.0 assembly since it
builds a package.
2017-01-20 17:53:52 -08:00
Ryan Nowak c31475af4e Move the LanguageServices package to src
Moves the LanguageServices package to src so it will build on the CI.
2017-01-20 16:43:21 -08:00
Pranav K 1b0379126b Downgrade the versions of new CodeAnalysis packages
Workaround for #935
2017-01-13 17:18:36 -08:00
Pranav K 9dbf80dde7 Modifications to allow building VSIX from build. 2017-01-13 11:55:46 -08:00