Skip to content

Commit 3f27684

Browse files
committed
New UI form for Find Variable/Parameter references, use a tree view to show references that have been found.
1 parent c31e16e commit 3f27684

12 files changed

Lines changed: 620 additions & 377 deletions

SQL2012_BIDSHelper.csproj

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</UpgradeBackupLocation>
2424
<SignAssembly>true</SignAssembly>
2525
<AssemblyOriginatorKeyFile>BIDSHelper.snk</AssemblyOriginatorKeyFile>
26-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
26+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
2727
<PublishUrl>publish\</PublishUrl>
2828
<Install>true</Install>
2929
<InstallFrom>Disk</InstallFrom>
@@ -54,8 +54,11 @@
5454
<DebugType>full</DebugType>
5555
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
5656
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
57-
<CodeAnalysisRuleSet>..\..\..\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Static Analysis Tools\Rule Sets\BIDSHelper.ruleset</CodeAnalysisRuleSet>
57+
<CodeAnalysisRuleSet>BasicCorrectnessRules.ruleset</CodeAnalysisRuleSet>
5858
<RunCodeAnalysis>false</RunCodeAnalysis>
59+
<PlatformTarget>x86</PlatformTarget>
60+
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
61+
<Prefer32Bit>false</Prefer32Bit>
5962
</PropertyGroup>
6063
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
6164
<DebugSymbols>false</DebugSymbols>
@@ -70,6 +73,7 @@
7073
<NoWarn>1591</NoWarn>
7174
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
7275
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
76+
<Prefer32Bit>false</Prefer32Bit>
7377
</PropertyGroup>
7478
<PropertyGroup>
7579
<PreBuildEvent>
@@ -87,6 +91,7 @@
8791
<DebugType>full</DebugType>
8892
<PlatformTarget>AnyCPU</PlatformTarget>
8993
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
94+
<Prefer32Bit>false</Prefer32Bit>
9095
</PropertyGroup>
9196
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
9297
<ItemGroup>
@@ -110,6 +115,7 @@
110115
</Reference>
111116
<Reference Include="Microsoft.AnalysisServices.AdomdClient, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
112117
<SpecificVersion>True</SpecificVersion>
118+
<Private>False</Private>
113119
</Reference>
114120
<Reference Include="Microsoft.AnalysisServices.BackEnd">
115121
<HintPath>$(ProgramFiles)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Business Intelligence Semantic Model\Microsoft.AnalysisServices.BackEnd.dll</HintPath>
@@ -129,16 +135,18 @@
129135
<HintPath>c:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Microsoft.AnalysisServices.Design.DLL</HintPath>
130136
<Private>False</Private>
131137
</Reference>
132-
<Reference Include="Microsoft.AnalysisServices.MPFProjectBase, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=x86">
133-
<HintPath>$(ProgramFiles)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Business Intelligence Semantic Model\Microsoft.AnalysisServices.MPFProjectBase.dll</HintPath>
138+
<Reference Include="Microsoft.AnalysisServices.MPFProjectBase.11, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=x86">
139+
<SpecificVersion>False</SpecificVersion>
140+
<HintPath>..\..\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Business Intelligence Semantic Model\Microsoft.AnalysisServices.MPFProjectBase.11.dll</HintPath>
134141
<Private>False</Private>
135142
</Reference>
136143
<Reference Include="Microsoft.AnalysisServices.Project, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
137144
<SpecificVersion>True</SpecificVersion>
138145
<Private>False</Private>
139146
</Reference>
140-
<Reference Include="Microsoft.AnalysisServices.VSHost, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
141-
<HintPath>$(ProgramFiles)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Business Intelligence Semantic Model\Microsoft.AnalysisServices.VSHost.dll</HintPath>
147+
<Reference Include="Microsoft.AnalysisServices.VSHost.11, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
148+
<SpecificVersion>False</SpecificVersion>
149+
<HintPath>..\..\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Business Intelligence Semantic Model\Microsoft.AnalysisServices.VSHost.11.dll</HintPath>
142150
<Private>False</Private>
143151
</Reference>
144152
<Reference Include="Microsoft.DataTransformationServices.Controls, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
@@ -161,6 +169,7 @@
161169
</Reference>
162170
<Reference Include="Microsoft.DataWarehouse.Interfaces, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
163171
<SpecificVersion>True</SpecificVersion>
172+
<Private>False</Private>
164173
</Reference>
165174
<Reference Include="Microsoft.DataWarehouse.VsIntegration, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
166175
<SpecificVersion>True</SpecificVersion>
@@ -169,25 +178,29 @@
169178
</Reference>
170179
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
171180
<HintPath>..\..\..\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.Common.dll</HintPath>
181+
<Private>False</Private>
172182
</Reference>
173183
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
174184
<HintPath>..\..\..\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WinForms.DLL</HintPath>
185+
<Private>False</Private>
175186
</Reference>
176187
<Reference Include="Microsoft.SqlServer.DlgGrid, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
177188
<SpecificVersion>True</SpecificVersion>
178189
<HintPath>.\Microsoft.SqlServer.DlgGrid.dll</HintPath>
179190
</Reference>
180191
<Reference Include="Microsoft.SqlServer.DTSPipelineWrap, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
181192
<SpecificVersion>True</SpecificVersion>
193+
<Private>False</Private>
182194
</Reference>
183195
<Reference Include="Microsoft.SQLServer.DTSRuntimeWrap, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
184196
<SpecificVersion>True</SpecificVersion>
185197
<Private>False</Private>
186198
</Reference>
187-
<Reference Include="Microsoft.SqlServer.ExecPackageTaskWrap, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
199+
<Reference Include="Microsoft.SqlServer.ExecPackageTaskWrap, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
188200
<SpecificVersion>False</SpecificVersion>
189201
<EmbedInteropTypes>False</EmbedInteropTypes>
190-
<HintPath>..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ExecPackageTaskWrap\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ExecPackageTaskWrap.dll</HintPath>
202+
<HintPath>..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ExecPackageTaskWrap\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ExecPackageTaskWrap.dll</HintPath>
203+
<Private>False</Private>
191204
</Reference>
192205
<Reference Include="Microsoft.SqlServer.Graph, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
193206
<SpecificVersion>False</SpecificVersion>
@@ -204,19 +217,25 @@
204217
</Reference>
205218
<Reference Include="Microsoft.SQLServer.ManagedDTS, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
206219
<SpecificVersion>True</SpecificVersion>
220+
<Private>False</Private>
207221
</Reference>
208222
<Reference Include="Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=x86">
209223
<SpecificVersion>False</SpecificVersion>
210224
<HintPath>..\..\Program Files (x86)\Microsoft SQL Server\110\DTS\Tasks\Microsoft.SqlServer.SQLTask.dll</HintPath>
225+
<Private>False</Private>
211226
</Reference>
212227
<Reference Include="Microsoft.VisualBasic" />
213228
<Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
214229
<SpecificVersion>True</SpecificVersion>
230+
<Private>False</Private>
215231
</Reference>
216232
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
217233
<SpecificVersion>False</SpecificVersion>
234+
<Private>False</Private>
235+
</Reference>
236+
<Reference Include="Microsoft.VisualStudio.Shell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
237+
<Private>False</Private>
218238
</Reference>
219-
<Reference Include="Microsoft.VisualStudio.Shell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
220239
<Reference Include="msddsp, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
221240
<SpecificVersion>True</SpecificVersion>
222241
<HintPath>DLLs\SQL2012\msddsp.dll</HintPath>
@@ -265,6 +284,7 @@
265284
</Reference>
266285
<Reference Include="Microsoft.SqlServer.Dts.Design, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">
267286
<SpecificVersion>True</SpecificVersion>
287+
<Private>False</Private>
268288
</Reference>
269289
<Reference Include="WindowsBase" />
270290
</ItemGroup>
@@ -509,12 +529,6 @@
509529
<Compile Include="SSIS\DesignPracticesPlugin.cs" />
510530
<Compile Include="SSIS\DesignPracticeScanner\DesignPractice.cs" />
511531
<Compile Include="SSIS\DesignPracticeScanner\DesignPractices.cs" />
512-
<Compile Include="SSIS\FindReferences.cs">
513-
<SubType>Form</SubType>
514-
</Compile>
515-
<Compile Include="SSIS\FindReferences.Designer.cs">
516-
<DependentUpon>FindReferences.cs</DependentUpon>
517-
</Compile>
518532
<Compile Include="SSIS\FindReferencesControl.cs">
519533
<SubType>UserControl</SubType>
520534
</Compile>
@@ -527,9 +541,18 @@
527541
<Compile Include="SSIS\FindUnusedVariables.Designer.cs">
528542
<DependentUpon>FindUnusedVariables.cs</DependentUpon>
529543
</Compile>
544+
<Compile Include="SSIS\FindVariableReferences.cs">
545+
<SubType>Form</SubType>
546+
</Compile>
547+
<Compile Include="SSIS\FindVariableReferences.Designer.cs">
548+
<DependentUpon>FindVariableReferences.cs</DependentUpon>
549+
</Compile>
530550
<Compile Include="SSIS\FindVariables.cs" />
531551
<Compile Include="SSIS\PackageHelper.cs">
532552
</Compile>
553+
<Compile Include="SSIS\ParametersWindowPlugin.cs">
554+
<SubType>Code</SubType>
555+
</Compile>
533556
<Compile Include="SSIS\SortablePackagePropertiesPlugin.cs" />
534557
<Compile Include="SSIS\RelativePathsPlugin.cs" />
535558
<Compile Include="SSIS\AutoSortProjectFilesPlugin.cs" />
@@ -972,16 +995,16 @@
972995
<DependentUpon>DesignWarningsOptionsPage.cs</DependentUpon>
973996
<SubType>Designer</SubType>
974997
</EmbeddedResource>
975-
<EmbeddedResource Include="SSIS\FindReferences.resx">
976-
<DependentUpon>FindReferences.cs</DependentUpon>
977-
</EmbeddedResource>
978998
<EmbeddedResource Include="SSIS\FindReferencesControl.resx">
979999
<DependentUpon>FindReferencesControl.cs</DependentUpon>
9801000
<SubType>Designer</SubType>
9811001
</EmbeddedResource>
9821002
<EmbeddedResource Include="SSIS\FindUnusedVariables.resx">
9831003
<DependentUpon>FindUnusedVariables.cs</DependentUpon>
9841004
</EmbeddedResource>
1005+
<EmbeddedResource Include="SSIS\FindVariableReferences.resx">
1006+
<DependentUpon>FindVariableReferences.cs</DependentUpon>
1007+
</EmbeddedResource>
9851008
<EmbeddedResource Include="SSIS\SortablePackageProperties.rdlc" />
9861009
<EmbeddedResource Include="SSIS\ExpressionListControl.resx">
9871010
<DependentUpon>ExpressionListControl.cs</DependentUpon>

SQL2012_BIDSHelper.csproj.user

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<ProjectView>ProjectFiles</ProjectView>
4+
<ProjectView>ShowAllFiles</ProjectView>
55
</PropertyGroup>
66
<PropertyGroup>
77
<ReferencePath>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\110\SDK\Assemblies\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Business Intelligence Semantic Model\</ReferencePath>
88
</PropertyGroup>
99
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
1010
<StartAction>Program</StartAction>
1111
<StartProgram>C:\Program Files %28x86%29\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe</StartProgram>
12-
<StartArguments>/resetaddin BIDSHelper2012-ForTesting.addin</StartArguments>
12+
<StartArguments>"C:\Users\greendg\Documents\Visual Studio 2012\Projects\SSISPlay\SSISPlay.sln"</StartArguments>
1313
</PropertyGroup>
1414
</Project>

SQL2014_BIDSHelper.csproj

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -503,17 +503,11 @@
503503
<Compile Include="SSIS\DesignPracticesPlugin.cs" />
504504
<Compile Include="SSIS\DesignPracticeScanner\DesignPractice.cs" />
505505
<Compile Include="SSIS\DesignPracticeScanner\DesignPractices.cs" />
506-
<Compile Include="SSIS\FindReferences.cs">
506+
<Compile Include="SSIS\FindVariableReferences.cs">
507507
<SubType>Form</SubType>
508508
</Compile>
509-
<Compile Include="SSIS\FindReferences.Designer.cs">
510-
<DependentUpon>FindReferences.cs</DependentUpon>
511-
</Compile>
512-
<Compile Include="SSIS\FindReferencesControl.cs">
513-
<SubType>UserControl</SubType>
514-
</Compile>
515-
<Compile Include="SSIS\FindReferencesControl.Designer.cs">
516-
<DependentUpon>FindReferencesControl.cs</DependentUpon>
509+
<Compile Include="SSIS\FindVariableReferences.Designer.cs">
510+
<DependentUpon>FindVariableReferences.cs</DependentUpon>
517511
</Compile>
518512
<Compile Include="SSIS\FindUnusedVariables.cs">
519513
<SubType>Form</SubType>
@@ -967,11 +961,8 @@
967961
<DependentUpon>DesignWarningsOptionsPage.cs</DependentUpon>
968962
<SubType>Designer</SubType>
969963
</EmbeddedResource>
970-
<EmbeddedResource Include="SSIS\FindReferences.resx">
971-
<DependentUpon>FindReferences.cs</DependentUpon>
972-
</EmbeddedResource>
973-
<EmbeddedResource Include="SSIS\FindReferencesControl.resx">
974-
<DependentUpon>FindReferencesControl.cs</DependentUpon>
964+
<EmbeddedResource Include="SSIS\FindVariableReferences.resx">
965+
<DependentUpon>FindVariableReferences.cs</DependentUpon>
975966
<SubType>Designer</SubType>
976967
</EmbeddedResource>
977968
<EmbeddedResource Include="SSIS\FindUnusedVariables.resx">

SSIS/Biml/BimlUtility.cs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,26 @@ private static string GetValidationReporterMessage(ValidationItem item)
113113
builder.AppendFormat("Schema {0}. ", item.SchemaName);
114114
}
115115

116-
if (item.Exception != null)
116+
ParseException(item.Exception, ref builder);
117+
118+
return builder.ToString().TrimEnd();
119+
}
120+
121+
private static void ParseException(System.Exception exception, ref StringBuilder builder)
122+
{
123+
if (exception == null)
117124
{
118-
// Just show the exception type name, which can help indicate the type of issue, e.g. invalid XML vs invalid BIML
119-
// We don't want the full Exception as it is confusing and makes you think something has gone wrong.
120-
builder.AppendFormat("Exception type: {0}", item.Exception.GetType().Name);
125+
return;
121126
}
122127

123-
return builder.ToString().TrimEnd();
128+
// Changed my mind!!!
129+
//// Just show the exception type name, which can help indicate the type of issue, e.g. invalid XML vs invalid BIML
130+
//// We don't want the full Exception as it is confusing and makes you think something has gone wrong.
131+
//builder.AppendFormat("Exception type: {0}", item.Exception.GetType().Name);
132+
133+
builder.AppendFormat("\tException type: {0}, Message: {1}\r\n", exception.GetType().Name, exception.Message);
134+
135+
ParseException(exception.InnerException, ref builder);
124136
}
125137

126138
private static void GetMessageString(string input, ref StringBuilder builder)

0 commit comments

Comments
 (0)