Commit Graph

1354 Commits

Author SHA1 Message Date
N. Taylor Mullen 834fd5a5d0 Only use release VS. 2017-11-06 15:06:06 -08:00
N. Taylor Mullen a2972ebf1c Dispatch DocumentStructureChanged event on foreground thread.
- Had to add extra logic to track document structure changes so listeners could know if an event was on its way or not.
- Added and fixed some tests.

#1748
2017-11-06 14:49:18 -08:00
Ajay Bhargav Baaskaran 7002dbf20a Added Name and Documentation to DirectiveTokenDescriptor 2017-11-06 10:55:52 -08:00
Nate McMaster 4d737af167 Pin tool and package versions to make builds more repeatable
Part of aspnet/Universe#575
2017-11-01 18:12:08 -07:00
Nate McMaster 6c7551d9c7 Require the Microsoft.VisualStudio.Component.VSSDK workload to be installed 2017-10-30 08:59:20 -07:00
N. Taylor Mullen ab62ea9321 React to API feedback on VisualStudioRazorParser.
- Changed `ReparseAsync` to be `QueueReparse`. It's now async void to not give the misconception that it blocks until a reparse has been completed.
- Removed `IContextChangedListener`. People can get the same effect of the interface by retrieving the document tracker interface via the `RazorEditorFactoryService` and then when its context changes getting the parser.
- Exposed `TryGetParser` to aid in replacing `IContextChangedListener`.
- Updated tests to not rely on `IContextChangedListener`.
2017-10-25 10:28:01 -07:00
N. Taylor Mullen d027697389 Merge branch 'rel/vs15.5' into dev 2017-10-25 09:45:28 -07:00
N. Taylor Mullen 6ac0137a9f Make AtDirectiveCompletionPoint resilient to null owners.
- Added a test to verify the new owner == null case.

#1733
2017-10-25 09:44:33 -07:00
N. Taylor Mullen fb8aff12f1 Add EditorSettings management to workspaces.
- Built a design where there's a singleton `EditorSettingsManager` that handles the "current" settings state in the world. When it detects that settings have changed via an update method being called it dispatches a `Changed` event.
- Exposed editor settings on the document tracker. When the editor settings change the document tracker dispatches to any listeners that its context has changed.
- Added tests to validate all the various settings management.

#1718
2017-10-24 10:42:49 -07:00
N. Taylor Mullen 212d97e511 Manage VisualStudioRazorParser lifetime.
- Exposed `VisualStudioRazorParser`, `DocumentStructureChangedEventArgs` and `ICanHasContextChangedListener` as ways to consume the new parser for a Razor document.
- Split the `VisualStudioRazorParser` into an abstract base and an implementation to avoid internal constructors.
- Changed the parser and corresponding smart indenter to take in document trackers, template engine factories and parser context change listeners. Of these additions the parser context change listeners will be deprecated once we own the TagHelper discovery mechanisms.
- Changed how the parser manages its internal parsing life cycle. It now creates template engines when the document tracker tells it to. So when project changes happen or new documents are opened the parser will re-instantiate its internal parser to ensure that it is parsing against the correct configurations.
- Removed all accessor services in favor of a singular RazorEditorFactoryService. This service is responsible for retrieving/creating various Razor components.
- Changed the code document provider to now use the parser provider in order to locate code documents associated with buffers. Prior to this that logic was hard coded.
- Removed old template engine reconstruction logic in the document tracker now that the parser owns that piece.
- Updated tracker to notify listeners when it's unsubscribing. This is how listeners can know when to tear bits down.
- Refactored/added pieces to the `DefaultVisualStudioRazorParser` in order to improve its unit/integration testing ability.
- Updated existing tests to react to new signatures.
- Added new visual studio razor parser tests, uncommented existing ones, and re-enforced ones that were previously flakey.
- Added various tests for the new services added, i.e. text buffer factory service tests.

#1630
2017-10-23 14:39:15 -07:00
Sergei Dorogin a0733ffa91 RazorPageGenerator: extracted creating RazorEngine into a method [refactoring] (#1727)
* RazorPageGenerator: extracted creating RazorEngine into a method to simplify reusing logic in custom generators

RazorPageGenerator: added optional cli argument with base directory  (previously current dir always was used)
2017-10-23 12:44:29 -07:00
Ryan Nowak 984713c297 Add an opt-out for building the VSIX
Ex:
.\build.cmd /p:BuildVSIX=false
2017-10-20 16:33:38 -07:00
Ryan Nowak b6d01fda46 Target 15.6 for the VSIX in dev 2017-10-20 14:10:18 -07:00
Nate McMaster b064a28dcf Ensure the VSIX project is skipped when executing restore and build from dotnet-cli 2017-10-18 15:10:25 -07:00
Ryan Brandenburg c28940c915 Add RepositoryRoot 2017-10-18 09:37:36 -07:00
N. Taylor Mullen 0241e8ff8b Pin CodeAnalysis.CSharp to workaround newer VS MSBuild restore fixes.
- Noticed that our VSIX target would fail to restore the project on newer versions of MSBuild 15.0.
2017-10-17 16:45:17 -07:00
N. Taylor Mullen 31c16af40b Add smart indentation for brace completion.
- Added a standalone brace smart indenter that listens to `ITextBuffer` changed events to determine when a brace completion event needs to be handled.
- Added methods to deal with getting document trackers from `ITextBuffer`s.
- Added a `BraceSmartIndenterTest` and `BraceSmartIndenterIntegrationTest` to verify all parts of the smart indenter.
- Moved private test infrastructure classes into their own files and expanded on their functionality to enable the brace completion smart indent scenarios.

#1538
2017-10-12 15:30:28 -07:00
Ajay Bhargav Baaskaran f4e9ddad22 Link syntax tree Span nodes 2017-10-10 13:07:27 -07:00
N. Taylor Mullen e3d2b48b89 Fix [ForegroundFact].
#1716
2017-10-10 10:27:37 -07:00
Ryan Brandenburg 85634ea432 Update bootstrappers 2017-10-09 12:45:14 -07:00
Ajay Bhargav Baaskaran b50ead28e2 Merge branch 'rel/vs15.5' into dev 2017-10-04 17:00:03 -07:00
Ajay Bhargav Baaskaran fea4095833 Match BlockKindInternal values with BlockKind 2017-10-04 16:00:29 -07:00
Ajay Bhargav Baaskaran f41dc2aef9 Only handle indentation for open curly brace instead of all metacode 2017-10-03 16:28:42 -04:00
N. Taylor Mullen 786f825a3d Change powershell zip procedure to work on earlier versions. 2017-10-02 15:13:59 -07:00
N. Taylor Mullen 88a950d436 Revert "Revert MonoAddin build steps."
This reverts commit 44519485fd.
2017-10-02 11:56:45 -07:00
N. Taylor Mullen 44519485fd Revert MonoAddin build steps. 2017-10-02 11:34:41 -07:00
N. Taylor Mullen 059264ba34 Fix RazorAddin project.
- Move assembly attributes to work with incremental compilation.
- Utilize Mono.Addins from nuget.org.
2017-09-29 17:46:51 -07:00
N. Taylor Mullen 3c73812f8a Revert "Revert "Add Microsoft.MonoDevelop.RazorAddin.""
This reverts commit fa0990fe00.
2017-09-29 17:17:44 -07:00
N. Taylor Mullen fa0990fe00 Revert "Add Microsoft.MonoDevelop.RazorAddin."
This reverts commit fca4f23895.
2017-09-29 17:08:17 -07:00
N. Taylor Mullen fca4f23895 Add Microsoft.MonoDevelop.RazorAddin.
- As part of this work I also added `Microsoft.VisualStudio.Mac.LanguageServices.Razor` to be the Visual Studio for Mac specific Razor code.
- Added MSBuild infrastructure to automate creation of MonoDevelop addins (MPacks). This work enables us to not have a dependency on a specific version of monodevelop and does not require us to have tool-prerequisites on the box. Every build outputs the mpacks into the artifacts/build directory.
- Built in build-level metadata pieces to workaround how addins are typically developed. They are usually authored C# first and then config files are generated after the fact; with this changeset we auto-generate the addin.info and its corresponding assembly attributes. Both of these take information directly from the build system.

#1696
2017-09-29 16:26:50 -07:00
N. Taylor Mullen 6c8286eed7 Split LanguageServices.Razor.
- Created a new `Microsoft.VisualStudio.Editor.Razor` assembly to contain Visual Studio platform agnostic info.
- Added a new `Microsoft.VisualStudio.Editor.Razor.Test.Common` project to be the centerfold for all VisualStudio agnostic test pieces.
- Added a `Microsoft.VisualStudio.Editor.Razor.Test` project and pulled in LanguageService test files into the the Editor.Razor.Test project to correspond to their movement in the src project.

#1690
2017-09-29 16:26:50 -07:00
Ajay Bhargav Baaskaran bd8e9ecc31 Added RazorParserFeatureFlags and added support for minimized bool tag
helper bound attributes
 - Fixes #1678, #431
2017-09-29 16:02:09 -07:00
N. Taylor Mullen edcf6857d1 Add x64 service hub json.
- Updated corresponding entries in manifest and csproj to reflect the new json addition.

#1705
2017-09-29 12:01:58 -07:00
Nate McMaster 39c190aa0d Preserve the build number when building the VSIX (#1702) 2017-09-27 16:25:16 -07:00
Javier Calvarro Nelson d1cca77852 Update API Check baselines to 2.0.0 2017-09-22 15:33:52 -07:00
Justin Kotalik 4d0a7df1c4 Increase Minimum Version of Visual Studio to 15.3.0 2017-09-21 17:57:36 -07:00
Ryan Nowak cf141cf119 Create new template engine when version changes 2017-09-19 16:04:59 -07:00
Ryan Nowak f23ff9452c [Design] Create Template engine from project snapshot 2017-09-19 12:54:55 -07:00
Ryan Nowak 12e61d75a7 remove ifdefs, our tests compile release sometimes 2017-09-18 18:23:32 -07:00
Ryan Nowak 6e6a24cbb4 Add a background listener for notifications
This change adds an actual background worker for listening to project
change notifications and starts sending updates when the project's razor
dependencies change.

I had to do a litle surgery to get things working. There were plenty of
small bug fixes.

Additionally I got rid of the WeakReferences for tracking listeners. I
was seeing TextBuffers hanging around in VS longer than I expected and
the WeakReferences weren't getting cleaned up. I think it's better that
we just track the lifetime.
2017-09-18 16:56:53 -07:00
Ryan Nowak 7a0abc3f67 Add test for #1684 2017-09-15 12:07:11 -07:00
Ryan Nowak e05faf2347 Fix #1684 - CompletionProvider null ref
The CompletionProvider will be called in cases where the document
doesn't have a FilePath - such as the C# interactive window. This is
causing a null ref.
2017-09-15 11:24:17 -07:00
Ryan Nowak 7cca8618ea Change notifications for the project manager
There's still nothing processing the notifications in the background.
This is all the plumbing for dirty checking and publishing updates.
2017-09-12 10:36:56 -07:00
Ryan Nowak 82866d9442 Refactor project snapshot manager
Splits the 'trigger' out from the change manager. The next change will
add more functionality to DPSMBase.
2017-09-08 08:11:58 -07:00
Ryan Nowak 1806d26e9a Merge branch 'rynowak/foreground-theory' into dev 2017-09-07 13:07:13 -07:00
Ryan Nowak 5ee4c8ec4d Add [ForegroundTheory] 2017-09-07 13:06:55 -07:00
Ajay Bhargav Baaskaran aa445ee9b4 Add error for using single quotes in add/remove taghelper directive 2017-09-07 11:29:33 -07:00
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
N. Taylor Mullen 67f255adca Change completion provider to be lazy if not Razor.
#1672
2017-09-06 12:56:11 -07:00
Ryan Nowak ca844afe5a Add a subsystem for detecting versions
This adds the beginning of an API for detecting versions from the
project. We will flesh out this API more when we do tooling
extensiblity.
2017-09-06 12:36:19 -07:00