Commit Graph

903 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran c6a35e7b26 Added HasIndexer property to BoundAttributeDescriptor 2017-03-21 16:18:31 -07:00
Nate McMaster 9aa4048866
Switch off Travis container-based infrastructure
Something about running tests inside a docker container causes the tests to timeout

[skip appveyor]
2017-03-21 13:39:05 -07:00
N. Taylor Mullen 8e7d853bf9 Add global.json to git ignore. 2017-03-21 12:40:43 -07:00
Nate McMaster 049de5d631
Update Travis to macOS Sierra
[skip appveyor]
2017-03-21 12:21:01 -07:00
Ajay Bhargav Baaskaran 55d6362325 [Fixes #1094] Use custom JsonConverters for serializing/deserializing TagHelperResolutionResult 2017-03-21 12:08:06 -07:00
Ryan Nowak 5f547d8e32 Add intentation support
This is a code dump from the editor
2017-03-20 19:52:29 -07:00
N. Taylor Mullen f302d68589 Remove ViewComponent descriptor resolution from tooling.
#1074
2017-03-20 16:38:20 -07:00
Ajay Bhargav Baaskaran f3744efc5c Use Version 8.0.3 of Json.Net 2017-03-20 16:31:10 -07:00
N. Taylor Mullen d5e003fa4c Fix `RazorLanguageService`.
- Previously our constructor was calling down into the wrong overload.
2017-03-20 16:27:56 -07:00
Ryan Nowak 53ac097ce4 Add TagHelperFactsService 2017-03-20 15:50:34 -07:00
Stefan Nikolei 319c535224 Remove RazorIrNodeVisitorOfT (#1089) 2017-03-20 14:51:51 -07:00
Ajay Bhargav Baaskaran 4a71b1d57d [Fixes #980] Generate parser error for unquoted string token directives 2017-03-20 11:58:55 -07:00
Ryan Nowak ca6f988bd9 Add GetTagHelperSpans
This is a code dump from the editor
2017-03-20 11:18:05 -07:00
Ryan Nowak fdd08ceab2 Adding RazorSyntaxFactsService
This is a code dump from tooling -> Razor

This service will exist to answer questions about syntax trees for the
editor. Right now I'm just moving in the code in the simplest way
possible. Tests + cleanup to follow.
2017-03-20 08:21:28 -07:00
Ryan Nowak 8a6a22c767 Fix one of Taylor's broken comparers
This was a bug that wasn't being caught by tests until I implemented
IEquatable on the TagHelper types.
2017-03-19 12:39:33 -07:00
Ryan Nowak bbd08f0cc9 Add TagHelper directive and match info to CodeDocument 2017-03-19 12:33:09 -07:00
Ryan Nowak feb5f395d2 Make TagHelperDescriptor and friends IEquatable 2017-03-19 11:38:41 -07:00
Ryan Nowak b6aa6b8099 Make AcceptedCharacters non-legacy 2017-03-19 11:30:19 -07:00
Ryan Nowak acbbdf0b2c Rename BlockType -> BlockKind
Also moved BlockKind and SpanKind out of .Legacy
2017-03-19 11:18:40 -07:00
Ryan Nowak 0aee9152bd Make AcceptedCharacters public
Needed for tooling
2017-03-19 11:02:31 -07:00
Ryan Brandenburg a7eb30ddca Remove old razor 2017-03-17 14:58:13 -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
Ryan Nowak 90b48347a5 Port the legacy RazorEditorParser 2017-03-16 12:47:29 -07:00
Nate McMaster 9b3e8d0cda React to aspnet/Testing#259 2017-03-16 09:31:55 -07:00
Nate McMaster 43a41398ac Unify dependency versions to one file 2017-03-15 16:44:00 -07:00
Ajay Bhargav Baaskaran 310ccc31d0 Include default imports when ImportsFileName is null 2017-03-14 19:33:18 -07:00
Nate McMaster aa597309a2
Update appveyor and travis settings 2017-03-14 13:41:17 -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
Pranav K 2fc88fe9c1 Add support for base path in FindHiearchicalItems
Required for https://github.com/aspnet/Mvc/issues/5915
2017-03-13 11:15:11 -07:00
Pranav K 7d43bfc709 Add RazorSourceDocument.Create(string template)
Add document and fix casing of RazorSourceDocument.FileName
Fixes #1063
2017-03-13 09:44:06 -07:00
Ryan Nowak 1330b7792d Add editor references to LanguageServices 2017-03-09 15:25:54 -08:00
Ryan Nowak bf2a6140f0 Add back a constructor
We still need this for now. Both constructors call the non-obsolete
constructor on the base class.

Will remove this once ServiceHub starts calling the new constructor.
2017-03-09 15:25:54 -08:00
Jass Bagga a418a175a9 Add TagName to TagHelperContext
Addresses #1065
2017-03-09 14:59:11 -08:00
Pranav K b56751bf2e Fix typo 2017-03-09 12:08:50 -08:00
Pranav K 3f911fd518 Account for missing ArtifactsDir 2017-03-09 11:45:08 -08:00
Pranav K addbac24aa Account for missing trailing slash in package path when restoring vsix 2017-03-09 10:34:59 -08:00
Pranav K 3ba44f5038 Build the vsix as part of the default build cycle
Fixes #1029
2017-03-09 10:07:38 -08:00
David Fowler 28ab31eb1d Update .travis.yml 2017-03-09 09:07:54 -08:00
Pranav K a034b2ed04 Collate diagnositcs from Imports 2017-03-08 18:29:17 -08: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
Ryan Nowak 59078850d8 Exclude new project from msbuild 2017-03-06 18:12:01 -08:00
Ryan Nowak 9a27405718 Add LanguageServices test project 2017-03-06 17:55:00 -08:00
Yves57 dee8d8694f Prevent LOH allocations when constructing large Razor Source Documents. (#1049)
* Prevent LOH allocations when constructing large Razor Source Documents.

* Feedback
2017-03-06 16:50:05 -08:00
Ryan Nowak 3159266169 Whitespace cleanup 2017-03-06 16:29:59 -08:00
Ryan Nowak cefca39510 Fix broken padding in design time
The padding calculation for C# expression wasn't taking into account the
` = ` so all of the padding values for expressions were off by 3.
2017-03-06 15:54:47 -08:00
Ryan Nowak 966cd4a68d Introducing BasicWriter and TagHelperWriter
These are the replacements for CSharpRenderingConventions
2017-03-06 13:12:57 -08:00
Ryan Nowak 7730d33482 Introducing DocumentWriter 2017-03-03 15:00:09 -08:00
Nate McMaster 29d2defd11 Update AppVeyor and Travis settings 2017-03-01 18:25:45 -08:00
Nate McMaster f1f37b931c Change korebuild branch and fix argument forwarding in bootstrapper 2017-03-01 18:14:13 -08:00
Ajay Bhargav Baaskaran d422e61c3e Make CSharpRenderingContext and friends public 2017-02-28 19:04:51 -08:00