Commit Graph

1027 Commits

Author SHA1 Message Date
N. Taylor Mullen 774aebaa01 Rename TagHelperDescriptorProvider => TagHelperBinder.
- Moved the type out of the Legacy namespace.
- Renamed the types method to `GetBinding` since `TagHelper` is now inferred.
- Updated test names to reflect new method/class name.
- Updated product code variables to reflect new naming (provider => binder).

#1289
2017-05-08 16:59:53 -07:00
Ryan Nowak a570139b08 Fix #1059 and #1060 2017-05-08 12:30:19 -07:00
Ryan Nowak 1705888721 Add a test for #153 - already fixed 2017-05-05 12:48:01 -07:00
N. Taylor Mullen 1795fc26c1 Add AttributeCompletion API.
- Added a `GetAttributeCompletions` API that's consistent with current Razor's editor expectations.
- Added unit tests to validate all code paths of the new `GetAttributeCompletions` method.

#1120
2017-05-05 11:57:31 -07:00
Ajay Bhargav Baaskaran c71f6e7c3f [Fixes #1058] Added a test to verify nested enum behavior 2017-05-05 11:50:31 -07:00
Pavel Krymets 5c5462afba Merge branch 'rel/2.0.0-preview1' into dev 2017-05-05 10:26:18 -07:00
Pavel Krymets e3276bdf8e Update InternalAspNetCoreSdkVersion 2017-05-05 10:26:11 -07:00
Ryan Nowak e15d1be616 Introduce SourceChange in place of TextChange
This is the first step on the journey to replacing RazorEditorParser. We
can't just get rid of this because VS is using it today.
2017-05-03 17:53:08 -07:00
Pranav K e6c8ea8341 Merge remote-tracking branch 'origin/rel/2.0.0-preview1' into dev 2017-05-01 22:02:34 -07:00
N. Taylor Mullen 0e509b4bbb Add incomplete directive integration tests.
- These tests validate that our extensible directives do not have code that explodes when an incomplete directive is encountered. This is typically the case when a user is in the midst of typing a directive at design time.
- Added an extensions test and a language test.

#1271
2017-05-01 14:32:17 -07:00
Pranav K e711985920 Use the bundled NETStandard.Library package in netstandard targeting libraries 2017-05-01 12:40:03 -07:00
Ryan Brandenburg 8af9f656dd Add CodeGen tests for @inherits 2017-05-01 10:42:00 -07:00
Ryan Brandenburg dc66eabbff Fail if baseline longer than generated 2017-05-01 10:23:19 -07:00
N. Taylor Mullen f0d0c3d0b8 Merge branch 'preview-1/stabilization' into dev
# Conflicts:
#	build/dependencies.props
2017-04-28 17:20:20 -07:00
N. Taylor Mullen 86beea4269 Fix @namespace directive to handle incomplete directives.
- This involved not using the `First()` method when reading the directives tokens.
- Added two tests to validate an empty directive token and a missed directive token for the `@namespace` directive.

#1268
2017-04-28 17:14:34 -07:00
N. Taylor Mullen 207e0f0b59 Change `GetImports` to allow querying of information on non-existent files.
- Added tests to validate imports can still be found on non-existent files.

#1267
2017-04-28 17:00:24 -07:00
Pranav K c176bdbab0 Use Bundled NETStandard.Library \ NETCoreApp versions instead of explicitly specifying one 2017-04-28 16:00:48 -07:00
N. Taylor Mullen 49e3533bc3 Add test to validate unbalanced triple dash comment inside razor block.
#302
2017-04-27 12:03:59 -07:00
N. Taylor Mullen 344862fbc3 Change string token parsing to not flow errored tokens.
- Found that our extensible directive string parsing system wasn't consistent with the rest of the extensible directive tokens. Basically, if there were malformed string tokens we'd consume them and pass them along to extensible directive passes. This was a big no-no because it means extensible directive passes weren't able to rely on tokens being passed to them being well-formed.
- Fixed up existing extensible directive tests that relied on output of string tokens.

#1247
2017-04-26 16:38:58 -07:00
Pranav K a9ce780cef Updating package version to preview2 2017-04-26 10:49:43 -07:00
Ryan Nowak 8881d73598 Bump our VSIX version to 15.3.XXXXX 2017-04-26 10:06:31 -07:00
Pranav K 1b57cee851 Merge branch 'rel/2.0.0-preview1' into dev 2017-04-25 22:04:55 -07:00
Pranav K 339b2c3e4a Branching for 2.0.0-preview1 2017-04-25 22:04:52 -07:00
Pranav K 8270a002b3 Use Bundled NETStandard.Library \ NETCoreApp versions instead of explicitly specifying one 2017-04-25 12:52:11 -07:00
Ryan Nowak 27148c05f6 Update our Roslyn dependencies to 15.3 2017-04-24 18:59:06 -07:00
Ajay Bhargav Baaskaran 52c4abee9b Fix build break 2017-04-21 13:38:39 -07:00
Ajay Bhargav Baaskaran 4e2cd0c2d6 Finish writer implementation of the remaining IR nodes and added tests
- SetTagHelperPropertyIRNode
- ChecksumIRNode
- UsingStatementIRNode
- Preallocated attributes target extension
- HtmlAttributeIRNode and friends
- Design time directive helper target extension
- Removed renderers and rendering conventions
- Regenerated IR baselines
Issue - #846 and #1051
2017-04-21 11:46:34 -07:00
N. Taylor Mullen 1696e2aebf Upgrade Razor's Roslyn dependency to 2.0.0.
- Added C# 7 test to validate questionable features work end-to-end.
- Had to add several explicit package references to let our VS specific packages work as expected.

#1046
2017-04-21 11:40:21 -07:00
N. Taylor Mullen c25aadf599 Enable page directive to handle malformed text.
- Made a targeted fix to PageDirective that stops it from crashing Visual Studio when its malformed.
- Added unit test to validate PageDirective didn't throw when attempting to determine if something was a page.
- Added an integration test to validate malformed page tags can make their way through the entire Razor pipeline and don't destroy the rest of the content.

#1247
2017-04-20 14:05:54 -07:00
N. Taylor Mullen 715aa9bcae Fix cross plat tests for TagHelperBinderSyntaxTreePassTest. 2017-04-20 13:33:00 -07:00
N. Taylor Mullen f31b45d84a Enable TagHelper directives to handle malformed text.
- Prior to this change we'd try to substring a TagHelper directive with length 1 but our substring call would be for -1 (explosions).
- Added tests to validate that `@tagHelperPrefix`, `@removeTagHelper` and `@addTagHelper` all behave properly when they have malformed quotes.

#1242
2017-04-20 11:43:38 -07:00
Andrew Stanton-Nurse e856224682 react to removal of PlatformAbstractions (#1243) 2017-04-20 09:30:59 -07:00
Kiran Challa 4319593e7f Updated dependency model version to 2.0.0-* 2017-04-18 15:42:27 -07:00
N. Taylor Mullen a4a194e273 Make ViewComponentTagHelper discovery resilient to null. 2017-04-18 14:33:44 -07:00
N. Taylor Mullen 385e2523a9 Re-enable ViewComponentTagHelpers for tooling.
#1231
2017-04-14 17:11:26 -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 6f7cb763a2 Update TModel code generation.
- Prior to this TModel would be set to a potentially non-fully qualified name. This would cause errors in default MVC templates.
- Regenerated test files to reflect new TModel.
- Updated unit test to reflect new behavior.

#1222
2017-04-14 12:32:20 -07:00
N. Taylor Mullen d273c6cd4c Ensure output hint descriptors don't schema check.
- Prior to this if you had a `TagHelper` whos output hint was not in the final form of the completions we'd fall through into a schema check which resulted in a completion being added when it shouldn't. Example: `TagHelper` for `my-tr` that has an output hint of `tr` would end up getting added to the completion list under `body` because `my-tr` was not in the schema and would then be treated like the `environment` `TagHelper` (a new element).
- Added a test to validate that `TagHelper`s with output hints are cross referenced vs. existing completions and do not fall through to a schema check.

#1225
2017-04-14 12:14:52 -07:00
Ajay Bhargav Baaskaran 0b17f14d68 Moved AddTagHelperHtmlAttribute from renderer to writer 2017-04-14 11:49:56 -07:00
N. Taylor Mullen cf44f103c1 Prefix TagHelpers with tag helper prefix in completion list.
- We don't want tooling applying tag helper prefix to what we deem `TagHelper`s. Ultimately we should consume all the necessary data and do that work.
- Added two tests to validate that we're applying tag helper prefix to `TagHelper` element completions for catch-all's and non-catch-alls.

#1224
2017-04-14 11:40:28 -07:00
Pranav K b8aa060f32 Target 1.0.4 RuntimeFrameworkVersion in the tool 2017-04-14 10:00:02 -07:00
N. Taylor Mullen 46a5ca972f Allow catch-all THDs to apply to all completions.
- Prior to this catch-alls were explicitly ignored not to populate the IntelliSense with an excess amount of `TagHelper`s. To maintain backwards compatible expectations this commit reverts that expectation.
- Scoped an existing test to only test its primary scenario.
- Added a new test to verify that catch-alls accurately apply to all completions (including dynamically added ones).

#1219
2017-04-13 23:35:59 -07:00
Ajay Bhargav Baaskaran cd486226d6 [Fixes #1195] Add a way to parse just until the first directive 2017-04-13 15:02:17 -07:00
Ryan Nowak c0e3519bc3 Set an order on @inject to run behind @namespace
The problem is that @inject uses the type name, and @namespace can change
it. Setting an explicit order makes sure that these things happen in a
sensible sequence.
2017-04-13 13:59:47 -07:00
N. Taylor Mullen 3b31e977b2 Fix ability to generate baselines.
- Prior to this removing the `__RemoveThisBitTo__` wasn't sufficient to generate baselines; reason being the constants were defined in the wrong assembly. Since we moved test infrastructure bits around the constants needed to follow.
2017-04-13 11:07:02 -07:00
N. Taylor Mullen 688731983c Add dependencies.props to Solution Items. 2017-04-13 11:05:19 -07:00
N. Taylor Mullen a1cfd22a32 Add element completion API for TagHelpers.
- Added a new `TagHelperCompletionService` which can be queried for information on what completion information should be provided.
- Added tests to validate the completion service's expectations.
- Fixed an issue where `TagHelper`s with output hints that did not exist in a passed in completion would never be highlighted as `TagHelper`'s; even when their primary targeting element was already in the element completion list.

#1181
2017-04-12 14:31:11 -07:00
N. Taylor Mullen 1b8a4e704c Rename ITagHelperDescriptorBuilder => TagHelperDescriptorBuilder.
#1210
2017-04-11 17:08:38 -07:00
Ryan Nowak e5cac9fb7f Implement @namespace
This change adds support for @namespace, and introduces a set of
changes that are needed to support @namespace in the parser.

@namespace and @class have always been treated as reserved words by Razor,
with the intent that someday they would be allowed as directives.

This changes makes that possible.

You will still get an error about @namespace being a reserved word if you
don't have the directive.
2017-04-11 12:46:02 -07:00