Commit Graph

1097 Commits

Author SHA1 Message Date
Pranav K 0a75ecd3a6 Updating versions to preview3 2017-06-01 10:47:38 -07:00
Pranav K ba4a00404b Merge remote-tracking branch 'origin/rel/2.0.0-preview2' into dev 2017-05-31 20:02:43 -07:00
Pranav K e31d242122 Updating build scripts to point to 2.0.0-preview2 KoreBuild 2017-05-31 19:53:31 -07:00
Pranav K 4b415bade5 Merge remote-tracking branch 'origin/rel/2.0.0-preview2' into dev 2017-05-31 19:46:24 -07:00
Pranav K ca4b8e0b85 Branching for rel/2.0.0-preview2 2017-05-31 19:37:12 -07:00
N. Taylor Mullen 0688cd3ef7 Log errors if directives do not start at beginning of line.
- Updated tests to validate expectations.
- Added two additional tests to validate extensible directives and built-in directives get start at line verification.
2017-05-30 15:19:46 -07:00
N. Taylor Mullen 3b53f04518 Change ParserContext to take a RazorSourceDocument.
- This moves ParserContext closer to operating on a RazorSourceDocument and exposes it at the parsing layer.
- Was not able to replace the `ITextDocument` property on `ParserContext` due to its current wiring. Our tokenizers rely on a single reader that iterates over the document and take turns tokenizing characters from that reader. The reader that the tokenizers pull from is also highly coupled with the parsers implementations; they end up moving the readers pointer frequently.
2017-05-30 15:18:19 -07:00
Kiran Challa 4056e86382 Updated to use the latest shared runtime 2017-05-29 04:41:43 -07:00
Ajay Bhargav Baaskaran 2f03a39e41 Refactored attribute values IR 2017-05-26 12:34:34 -07:00
N. Taylor Mullen dcccea3004 Add Checksum computation to RazorSourceDocument.
- Renamed many of our `RazorSourceDocument` abstractions to not include the word `Razor`.
- Added a `GetChecksum()` method to `RazorSourceDocument` to allow source documents to compute their own checksums.
- Re-generated codegen tests that did not normalize new lines. Ones that did re-generate newlines converted from stream => string => normalized string and then ran the Razor parser.
- Added tests to validate `GetChecksum` for all source document types.
- Removed unused `LegacySourceDocument`.
2017-05-26 12:29:36 -07:00
N. Taylor Mullen d917311883 Make ViewComponentTagHelper's bound attribute display names nicer.
- Went from `typeName __Generated__SomeViewComponentTagHelper.PropertyName` to `typeName SomeViewComponentTagHelper.PropertyName`.
- Updated `TagHelperBoundDescriptorBuilder` to allow setting of `DisplayName`.
- Added `TagHelperBoundAttributeDescriptorBuilderTest` class to verify new `DisplayName` additions.
- Updated `ViewComponentTagHelperDescriptorFactoryTest` expectations.

#1251
2017-05-25 15:57:51 -07:00
Ajay Bhargav Baaskaran cdddaefa81 Fixed a bug in VCTH pass and added an integration test 2017-05-25 15:44:24 -07:00
Ajay Bhargav Baaskaran 1efcdafa45 Removed ExecuteTagHelpersIRNode 2017-05-22 11:03:34 -07:00
N. Taylor Mullen ebe8ab4612 Rename TagHelperBoundAttributeDescriptorBuilder => BoundAttributeDescriptorBuilder.
#1369
2017-05-19 12:44:07 -07:00
N. Taylor Mullen 9bc9f0ef05 Rename HtmlCase => HtmlConventions.
- Moved the invalid non-whitespace html character entries from the various builders into the new HtmlConventions class.
- Updated test file name.
2017-05-19 12:36:55 -07:00
Ryan Nowak 6b1117caa9 Make this type internal 2017-05-19 11:34:51 -07:00
N. Taylor Mullen 30231979e8 React to rel/15.3 display name changes. 2017-05-19 11:29:48 -07:00
N. Taylor Mullen 2eb443acb6 Merge branch 'rel/15.3' into dev
# Conflicts:
#	src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpCodeParser.cs
#	src/Microsoft.AspNetCore.Razor.Language/TagHelperDescriptorBuilder.cs
#	src/Microsoft.CodeAnalysis.Razor/ViewComponentTagHelperDescriptorFactory.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs
#	test/Microsoft.CodeAnalysis.Razor.Test/ViewComponentTagHelperDescriptorFactoryTest.cs
2017-05-19 11:23:00 -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 315221c758 Re-enable some skipped tests
The underlying bug in this area has been fixed.
2017-05-19 10:18:17 -07:00
Ryan Nowak f4f291a7f2 PR feedback 2017-05-19 09:47:55 -07:00
Ryan Nowak 2a88d6efcf Fix aspnet/Mvc#6296 sanitize class and namespace
The new @namespace directive isn't sanitizing class and namespace names
when generating them. This means that a file-system-legal character like
'-' will show up in a class name, and that's not good.

Note that the old code paths (document classifiers) already had tests for
this and did it properly. It was only missing from @namespace.
2017-05-19 08:54:24 -07:00
N. Taylor Mullen 4c98b7f8f3 Make ViewComponentTagHelper's display name nicer.
- Went from `__Generated__SomeViewComponentTagHelper` to `SomeViewComponentTagHelper`.
- Updated `TagHelperDescriptorBuilder` to allow setting of `DisplayName`.
- Added `TagHelperDescriptorBuilderTest` class to verify new `DisplayName` additions.
- Updated `ViewComponentTagHelperDescriptorFactoryTest` expectations.

#1251
2017-05-18 14:48:59 -07:00
N. Taylor Mullen 03f3975360 Allow directive string tokens to be colorized.
- Without a directive string token having a `SpanKind.Code` it cannot have any sort of C# coloring associated with it.
- Updated tests to reflect new `SpanKind` expectations.

#1269
2017-05-18 10:36:54 -07:00
Ryan Nowak e391ac7a3c Split options into ParserOptions and CodeGenerationOptions 2017-05-18 10:22:39 -07:00
Ryan Nowak 5a1090f324 Api Cleanup for language services
Created internal + public versions of
- BlockKind
- SpanKind
- AcceptedCharacters

That way these types are only exposed through the VS apis and not
through the runtime API surface.

Also deleted RazorEditorParser. Yep. It's going to take significant work
to just port it to the language services assembly. Let's reevaluate this
when we get closer to the next foundational update.
2017-05-17 22:09:01 -07:00
Ryan Nowak 94aaa3db9e Configure xunit for better display 2017-05-17 20:31:37 -07:00
Ryan Nowak 811ea019a5 Fixes #1245 - Make TemplateCodeExtension public
This removes the hardcoding of an MVC type from Razor.
2017-05-17 20:25:06 -07:00
Ryan Nowak f96b22ffc3 Bump VSIX version up to 15.4.XXXXX 2017-05-17 13:38:32 -07:00
N. Taylor Mullen 657c2a8da3 Merge branch 'rel/15.3' into dev
# Conflicts:
#	test/Microsoft.AspNetCore.Mvc.Razor.Extensions.Test/IntegrationTests/CodeGenerationIntegrationTest.cs
2017-05-17 11:24:32 -07:00
Ajay Bhargav Baaskaran 7bd13061b5 Set the chunk generator of non-string tag helper attributes to ExpressionChunkGenerator 2017-05-17 11:17:01 -07:00
N. Taylor Mullen b8ea008151 Make extensible directive type token rendering allow value types.
- Instead of rendering a null assigning statement for a type token we now render a `default(TTypeToken)`. With this approach type tokens can be value types without creating a design time error.
- Re-generated baseline files to reflect new directive token code generation.

#1176
2017-05-17 10:31:16 -07:00
N. Taylor Mullen 19f895b9ad Validate line mappings for integration tests in Razor.Extensions.
- Split line mapping validation into its own method.
- Prior to this we were calling the wrong method in our design time code generation integration tests within the Razor.Extensions test project.
- Re-generated line mapping baselines to conform with the cshtml files for Razor.extensions code generation integration tests.

#1351
2017-05-17 10:20:36 -07:00
Ryan Brandenburg b96a486650 Compile CodeGeneration tests 2017-05-16 16:26:47 -07:00
Ryan Nowak ad294fb4ba Add a new THProvider api
This change adds an API for Tag Helper discovery.

I also got rid of the 'design time' flag for the provider as an
experimental change. We need to think through the consequences of this
before committing to it. Right now I've left those tests failing until we
can make a decision.

This change decouples VCTH discovery a bit more, but we're still not ready
to move that into a the MVC extensions assembly. For that we need the
ability to discover the MVC extensibility.
2017-05-16 14:59:37 -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 9fe7c77d30 Move TagHelperBinding out of Legacy.
- Added additional properties to the class to make it more production ready.

#1092
2017-05-16 11:06:07 -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
N. Taylor Mullen 8616cf5dd0 Reduce catch all element completion usage.
- This makes it so if you have catch all `TagHelperDescriptor`s their completions don't apply to every existing completion. Instead, they now only apply to already TagHelperified completions and existing completions that are prefixed with a non-empty TagHelperPrefix.
- Updated existing test to have new expectations.
- Added new test to validate non-empty tag helper prefix case.

#1230
2017-05-16 11:06:05 -07:00
Nate McMaster 5856517be7 Remove workaround from test csproj files 2017-05-15 12:52:58 -07:00
Ryan Nowak 2167e4151e Fix #1311 add a base class for features 2017-05-12 21:15:59 -07:00
Ryan Nowak 72fe4cc952 Fix #1330 - make TagHelpers static class internal 2017-05-12 18:15:43 -07:00
Ryan Nowak fd3a34b000 Remove RazorIRBuilder.Document 2017-05-12 18:12:30 -07:00
Ryan Nowak 2ec2b98f83 Fix #1312 - make ExecuteCore protected 2017-05-12 17:54:09 -07:00
N. Taylor Mullen 3830a1b7ac Rename the BoundAttributeDescriptor builder.
- ITagHelperBoundAttributeDescriptor => TagHelperBoundAttributeDescriptorBuilder

#1306
2017-05-12 17:39:45 -07:00
Ryan Nowak 2b9c69bed8 Fixes #1308 and #1315
Misc project item cleanup
2017-05-12 17:33:49 -07:00
Ryan Nowak a1a560ddda Fix #1314 - remove namespaces from options 2017-05-12 17:26:08 -07:00
Ryan Nowak a8dd0355d0 Remove default usings
This change removes the default usings for 'System' and
'System.Threading.Tasks' and adds them to the MVC template engine.

This is preparation for removing this feature from the razor options, I
wanted to get all of the intentional diff out of the way.
2017-05-12 17:08:58 -07:00
Ajay Bhargav Baaskaran 8cf7d248e7 [Issue #1318] Renamed RuntimeTarget to CodeTarget 2017-05-12 16:32:55 -07:00