Commit Graph

1123 Commits

Author SHA1 Message Date
Ryan Nowak 17800b6055 Fix #1355 Make extension nodes check for their extensions 2017-06-08 17:08:04 -07:00
Ryan Nowak e05c697c58 Fix #1356 verify diagnostics in integration tests 2017-06-08 17:03:43 -07:00
Nate McMaster 4d18334573 Target .NET Standard 2.0 2017-06-08 16:37:27 -07:00
Ajay Bhargav Baaskaran 8bba757703 Don't ignore whitespace at the start of '<text>' tag 2017-06-08 11:56:24 -07:00
Pranav K 758be9ae13 Remove usage of TaskCache 2017-06-08 11:05:39 -07:00
Ajay Bhargav Baaskaran a6d2c04195 [Fixes #1379] Rename CSharpStatement to CSharpCode 2017-06-07 15:20:47 -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
Nate McMaster 1dfe37b55a React to downstream upgrades to .NET Standard 2.0 2017-06-07 12:51:48 -07:00
Ryan Nowak 45dec0dca4 Fix #1407 null refs in VCTH tests
Dictionary isn't thread safe YO.
2017-06-07 12:37:04 -07:00
Ajay Bhargav Baaskaran 74fef5f722 Moved VCTH types to Razor.Extensions 2017-06-06 15:49:35 -07:00
Ryan Nowak 6664efb6d9 Fixes #1296 - ItemCollection should be ICollection
A little bit more kindness for consumers.

I didn't add any tests because these are all just trivial forwards.
2017-06-06 11:11:30 -07:00
Pranav K d5c1c63d19 Generate assembly attributes as part of code generation 2017-06-05 14:24:17 -07:00
Mike Harder f658d3a080 Merge remote-tracking branch 'origin/rel/2.0.0-preview2' into dev 2017-06-05 11:15:50 -07:00
Mike Harder 48285f63c6 Revert "Update Roslyn Version to support C# 7.1"
This reverts commit 8f299c5b11.
2017-06-05 10:39:20 -07:00
Ryan Nowak 8297633445 Merge branch 'rel/2.0.0-preview2' into dev 2017-06-03 17:34:10 -07:00
Ryan Nowak 8f299c5b11 Update Roslyn Version to support C# 7.1 2017-06-03 17:27:40 -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
Ajay Bhargav Baaskaran 9e89808457 Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 17:24:50 -07:00
Ajay Bhargav Baaskaran eb2e090e2a Fix failing test 2017-06-01 17:24:24 -07:00
Ajay Bhargav Baaskaran f390830eda Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 17:16:13 -07:00
Ajay Bhargav Baaskaran eab052d9e0 Merge branch 'rel/15.3' into rel/2.0.0-preview2 2017-06-01 17:15:07 -07:00
Ajay Bhargav Baaskaran 4c1795fc79 [Fixes #1394] Fix unexpected indentation when autoformatting in VS 2017-06-01 15:57:52 -07:00
N. Taylor Mullen 517eba930f Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 15:48:07 -07:00
N. Taylor Mullen 4fde9ca07d Merge branch 'rel/15.3' into rel/2.0.0-preview2
# Conflicts:
#	src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpCodeParser.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpAutoCompleteTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpSectionTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpSpecialBlockTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/HtmlDocumentTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/HtmlToCodeSwitchTest.cs
2017-06-01 15:32:47 -07:00
N. Taylor Mullen 1f32a8322e Make invalid namespace tokens support IntelliSense.
- Added a `DirectiveTokenEditHandler` to enable IntelliSense for invalid namespace tokens.
- Added tests to verify new `DirectiveTokenEditHandler`.
- Updated test expectations for `DirectiveTokenEditHandler`.

#1393
2017-06-01 12:04:20 -07:00
N. Taylor Mullen 2e8c154fcb Make namespace tokens tolerant to EOF and invalid states.
- Updated our `QualifiedIdentifier` to properly parse invalid namespaces. This is more consistent with how the rest of the system works; we consume tokens until we determine if we're in an invalid or valid state. If invalid, we log an error and put back all invalid tokens for the parser to treat as non-directive tokens.
- Added unit tests to validate our extensible directive system can handle malformed namespace tokens at EOF and inline.
- Added a code gen test for Razor.Extensions to prove we've fixed the underlying issue for our `@namespace` directive that crashed VS.

#1393
2017-06-01 12:04:20 -07:00
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