Feature/peek def code gen (#215)

* Add codeGen for existing types

* Modify code gen logic to match current code

* Extend logic for new smo objects

* Add logic to retrieve token type from QuickInfo

* Remove duplicate types

* Add tests for new types

* Modify GetScript logic to use suggestions first

* Add more tests

* Modify codeGen to include quickInfo logic

* Cake build changes to run CodeGen

* CodeGen replace indentation

* Refactor GetScript and add more tests

* Refactor Resolver calls

* Fix TestDriver test for Definition

* Change quickInfo string case

* Revert change sto .sln file

* Fix typos in comments

* change String to string

* Rename test sql objects
This commit is contained in:
Sharon Ravindran
2017-01-19 13:24:58 -08:00
committed by GitHub
parent c055c459a0
commit 5464e4e63a
11 changed files with 1336 additions and 314 deletions

View File

@@ -3,11 +3,13 @@
#load "scripts/runhelpers.cake"
#load "scripts/archiving.cake"
#load "scripts/artifacts.cake"
#tool "nuget:?package=Mono.TextTransform"
using System.ComponentModel;
using System.Net;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Cake.Common.IO
// Basic arguments
var target = Argument("target", "Default");
@@ -258,6 +260,7 @@ Task("TestCore")
Task("Test")
.IsDependentOn("Setup")
.IsDependentOn("SRGen")
.IsDependentOn("CodeGen")
.IsDependentOn("BuildTest")
.Does(() =>
{
@@ -306,6 +309,7 @@ Task("Test")
Task("OnlyPublish")
.IsDependentOn("Setup")
.IsDependentOn("SRGen")
.IsDependentOn("CodeGen")
.Does(() =>
{
var project = buildPlan.MainProject;
@@ -541,6 +545,20 @@ Task("SRGen")
}
});
/// <summary>
/// Executes T4Template-based code generators
/// </summary>
Task("CodeGen")
.Does(() =>
{
var t4Files = GetFiles(sourceFolder + "/**/*.tt");
foreach(var t4Template in t4Files)
{
TransformTemplate(t4Template, new TextTransformSettings {});
}
});
/// <summary>
/// Default Task aliases to Local.
/// </summary>