Skip to content

Commit 119d2be

Browse files
authored
Merge pull request #60 from BIDeveloperExtensions/bidshelper-vsix
2.3.1 release merge
2 parents 04fee13 + e793985 commit 119d2be

146 files changed

Lines changed: 2278 additions & 72260 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BidsHelperPackage.cs

Lines changed: 247 additions & 58 deletions
Large diffs are not rendered by default.

Core/Options/BIDSHelperOptionsVersionCheckPage.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,35 @@ private void BIDSHelperOptionsVersionCheckPage_Load(object sender, EventArgs e)
129129
this.lblLocalVersion.Text += string.Format(CultureInfo.InvariantCulture, " (Debug Build {0:yyyy-MM-dd HH:mm:ss})", buildDateTime);
130130
#endif
131131

132+
this.lblSqlVersion.Text += string.Format("\r\nSSDT Extensions Installed: SSAS ({0}), SSIS ({1}), SSRS ({2})",
133+
(BIDSHelperPackage.SSASExtensionVersion == null ? "N/A" : BIDSHelperPackage.SSASExtensionVersion.ToString()),
134+
(BIDSHelperPackage.SSISExtensionVersion == null ? "N/A" : BIDSHelperPackage.SSISExtensionVersion.ToString()),
135+
(BIDSHelperPackage.SSRSExtensionVersion == null ? "N/A" : BIDSHelperPackage.SSRSExtensionVersion.ToString()));
136+
137+
//release 2.3.0 expected: 2.8.11 SSAS extension or higher, version 2.5.6 SSRS extension or higher, and 2.1 SSIS extension or higher
138+
Version SSASExpectedVersion = new Version("2.8.11");
139+
Version SSRSExpectedVersion = new Version("2.5.6");
140+
Version SSISExpectedVersion = new Version("2.1");
141+
142+
string sUpgradeSSDTMessage = string.Empty;
143+
if (BIDSHelperPackage.SSASExtensionVersion != null && BIDSHelperPackage.SSASExtensionVersion < SSASExpectedVersion)
144+
{
145+
if (sUpgradeSSDTMessage != string.Empty) sUpgradeSSDTMessage += ", ";
146+
sUpgradeSSDTMessage += "SSAS to " + SSASExpectedVersion;
147+
}
148+
if (BIDSHelperPackage.SSRSExtensionVersion != null && BIDSHelperPackage.SSRSExtensionVersion < SSRSExpectedVersion)
149+
{
150+
if (sUpgradeSSDTMessage != string.Empty) sUpgradeSSDTMessage += ", ";
151+
sUpgradeSSDTMessage += "SSRS to " + SSRSExpectedVersion;
152+
}
153+
if (BIDSHelperPackage.SSISExtensionVersion != null && BIDSHelperPackage.SSISExtensionVersion < SSISExpectedVersion)
154+
{
155+
if (sUpgradeSSDTMessage != string.Empty) sUpgradeSSDTMessage += ", ";
156+
sUpgradeSSDTMessage += "SSIS to " + SSISExpectedVersion;
157+
}
158+
if (sUpgradeSSDTMessage != string.Empty)
159+
this.lblSqlVersion.Text += "\r\n" + "Please upgrade " + sUpgradeSSDTMessage;
160+
132161
// First check we have a valid instance, the add-in may be disabled.
133162
if (VersionCheckPlugin.Instance == null)
134163
{

Core/Options/BIDSHelperPreferencesDialogPage.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ protected override IWin32Window Window
2222
{
2323
get
2424
{
25-
page = new BIDSHelperPreferencesPage();
26-
page.OptionsPage = this;
27-
page.Initialize();
28-
return page;
25+
try
26+
{
27+
page = new BIDSHelperPreferencesPage();
28+
page.OptionsPage = this;
29+
page.Initialize();
30+
return page;
31+
}
32+
catch (Exception ex)
33+
{
34+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
35+
return null;
36+
}
2937
}
3038
}
3139

Core/Options/BIDSHelperPreferencesPage.cs

Lines changed: 141 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,60 @@ public BIDSHelperPreferencesDialogPage OptionsPage
1919

2020
public void Initialize()
2121
{
22-
this.Width = 395; //392
23-
this.Height = 290;
22+
try
23+
{
24+
this.Width = 395; //392
25+
this.Height = 290;
2426

25-
// Smart Diff
26-
lblTFS.Text = "Visual Studio Built-in";
27-
lblVSS.Text = string.Empty;
27+
// Smart Diff
28+
lblTFS.Text = "Visual Studio Built-in";
29+
lblVSS.Text = string.Empty;
2830

29-
if (string.IsNullOrEmpty(SmartDiffPlugin.CustomDiffViewer))
30-
{
31-
radSmartDiffDefault.Checked = true;
32-
txtSmartDiffCustom.Text = "\"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\diffmerge.exe\" ? ? /ignoreeol /ignorespace";
33-
}
34-
else
35-
{
36-
radSmartDiffCustom.Checked = true;
37-
txtSmartDiffCustom.Text = SmartDiffPlugin.CustomDiffViewer;
38-
}
31+
if (string.IsNullOrEmpty(SmartDiffPlugin.CustomDiffViewer))
32+
{
33+
radSmartDiffDefault.Checked = true;
34+
txtSmartDiffCustom.Text = "\"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\diffmerge.exe\" ? ? /ignoreeol /ignorespace";
35+
}
36+
else
37+
{
38+
radSmartDiffCustom.Checked = true;
39+
txtSmartDiffCustom.Text = SmartDiffPlugin.CustomDiffViewer;
40+
}
3941

40-
FixSmartDiffCustomEnabled();
42+
FixSmartDiffCustomEnabled();
4143

42-
// Expression & Configuration highlighter
43-
btnExpressionColor.BackColor = ExpressionHighlighterPlugin.ExpressionColor;
44-
btnConfigurationColor.BackColor = ExpressionHighlighterPlugin.ConfigurationColor;
44+
if (BIDSHelperPackage.SSISExtensionVersion != null)
45+
{
46+
// Expression & Configuration highlighter
47+
btnExpressionColor.BackColor = ExpressionHighlighterPlugin.ExpressionColor;
48+
btnConfigurationColor.BackColor = ExpressionHighlighterPlugin.ConfigurationColor;
49+
50+
// Expression editor, font and colours
51+
buttonExpressionFontSample.Font = ExpressionListPlugin.ExpressionFont;
52+
buttonExpressionFontSample.ForeColor = ExpressionListPlugin.ExpressionColor;
53+
buttonResultFontSample.Font = ExpressionListPlugin.ResultFont;
54+
buttonResultFontSample.ForeColor = ExpressionListPlugin.ResultColor;
55+
}
56+
else
57+
{
58+
btnExpressionColor.Enabled = false;
59+
btnConfigurationColor.Enabled = false;
60+
buttonExpressionFontSample.Enabled = false;
61+
buttonResultFontSample.Enabled = false;
62+
linkResetExpressionColors.Enabled = false;
63+
}
4564

46-
// Measure group free space
47-
txtFreeSpaceFactor.Text = MeasureGroupHealthCheckPlugin.FreeSpaceFactor.ToString();
65+
// Measure group free space
66+
if (BIDSHelperPackage.SSASExtensionVersion != null)
67+
txtFreeSpaceFactor.Text = MeasureGroupHealthCheckPlugin.FreeSpaceFactor.ToString();
68+
else
69+
txtFreeSpaceFactor.Enabled = false;
4870

49-
// Expression editor, font and colours
50-
buttonExpressionFontSample.Font = ExpressionListPlugin.ExpressionFont;
51-
buttonExpressionFontSample.ForeColor = ExpressionListPlugin.ExpressionColor;
52-
buttonResultFontSample.Font = ExpressionListPlugin.ResultFont;
53-
buttonResultFontSample.ForeColor = ExpressionListPlugin.ResultColor;
71+
}
72+
catch (Exception ex)
73+
{
74+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
75+
}
5476
}
5577

5678
public void Apply()
@@ -68,21 +90,25 @@ public void Apply()
6890
}
6991

7092
// Expression & Configuration highlighter
71-
ExpressionHighlighterPlugin.ExpressionColor = btnExpressionColor.BackColor;
72-
ExpressionHighlighterPlugin.ConfigurationColor = btnConfigurationColor.BackColor;
93+
if (BIDSHelperPackage.SSISExtensionVersion != null)
94+
{
95+
ExpressionHighlighterPlugin.ExpressionColor = btnExpressionColor.BackColor;
96+
ExpressionHighlighterPlugin.ConfigurationColor = btnConfigurationColor.BackColor;
97+
98+
// Expression editor, font and colours
99+
ExpressionListPlugin.ExpressionFont = buttonExpressionFontSample.Font;
100+
ExpressionListPlugin.ExpressionColor = buttonExpressionFontSample.ForeColor;
101+
ExpressionListPlugin.ResultFont = buttonResultFontSample.Font;
102+
ExpressionListPlugin.ResultColor = buttonResultFontSample.ForeColor;
103+
}
73104

74105
// Measure group free space
75106
int iFreeSpaceFactor;
76-
if (int.TryParse(txtFreeSpaceFactor.Text, out iFreeSpaceFactor))
107+
if (txtFreeSpaceFactor.Enabled && int.TryParse(txtFreeSpaceFactor.Text, out iFreeSpaceFactor))
77108
{
78109
MeasureGroupHealthCheckPlugin.FreeSpaceFactor = iFreeSpaceFactor;
79110
}
80111

81-
// Expression editor, font and colours
82-
ExpressionListPlugin.ExpressionFont = buttonExpressionFontSample.Font;
83-
ExpressionListPlugin.ExpressionColor = buttonExpressionFontSample.ForeColor;
84-
ExpressionListPlugin.ResultFont = buttonResultFontSample.Font;
85-
ExpressionListPlugin.ResultColor = buttonResultFontSample.ForeColor;
86112
}
87113
catch (Exception ex)
88114
{
@@ -92,7 +118,14 @@ public void Apply()
92118

93119
private void radSmartDiffDefault_CheckedChanged(object sender, EventArgs e)
94120
{
95-
FixSmartDiffCustomEnabled();
121+
try
122+
{
123+
FixSmartDiffCustomEnabled();
124+
}
125+
catch (Exception ex)
126+
{
127+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
128+
}
96129
}
97130

98131
private void FixSmartDiffCustomEnabled()
@@ -102,64 +135,112 @@ private void FixSmartDiffCustomEnabled()
102135

103136
private void radSmartDiffCustom_CheckedChanged(object sender, EventArgs e)
104137
{
105-
FixSmartDiffCustomEnabled();
138+
try
139+
{
140+
FixSmartDiffCustomEnabled();
141+
}
142+
catch (Exception ex)
143+
{
144+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
145+
}
106146
}
107147

108148
private void btnExpressionColor_Click(object sender, EventArgs e)
109149
{
110-
colorDialog.Color = btnExpressionColor.BackColor;
111-
if (colorDialog.ShowDialog() == DialogResult.OK)
150+
try
112151
{
113-
btnExpressionColor.BackColor = colorDialog.Color;
152+
colorDialog.Color = btnExpressionColor.BackColor;
153+
if (colorDialog.ShowDialog() == DialogResult.OK)
154+
{
155+
btnExpressionColor.BackColor = colorDialog.Color;
156+
}
157+
}
158+
catch (Exception ex)
159+
{
160+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
114161
}
115162
}
116163

117164
private void btnConfigurationColor_Click(object sender, EventArgs e)
118165
{
119-
colorDialog.Color = btnConfigurationColor.BackColor;
120-
if (colorDialog.ShowDialog() == DialogResult.OK)
166+
try
121167
{
122-
btnConfigurationColor.BackColor = colorDialog.Color;
168+
colorDialog.Color = btnConfigurationColor.BackColor;
169+
if (colorDialog.ShowDialog() == DialogResult.OK)
170+
{
171+
btnConfigurationColor.BackColor = colorDialog.Color;
172+
}
173+
}
174+
catch (Exception ex)
175+
{
176+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
123177
}
124178
}
125179

126180
private void linkResetExpressionColors_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
127181
{
128-
ExpressionHighlighterPlugin.ExpressionColor = ExpressionHighlighterPlugin.ExpressionColorDefault;
129-
btnExpressionColor.BackColor = ExpressionHighlighterPlugin.ExpressionColorDefault;
182+
try
183+
{
184+
ExpressionHighlighterPlugin.ExpressionColor = ExpressionHighlighterPlugin.ExpressionColorDefault;
185+
btnExpressionColor.BackColor = ExpressionHighlighterPlugin.ExpressionColorDefault;
130186

131-
ExpressionHighlighterPlugin.ConfigurationColor = ExpressionHighlighterPlugin.ConfigurationColorDefault;
132-
btnConfigurationColor.BackColor = ExpressionHighlighterPlugin.ConfigurationColorDefault;
187+
ExpressionHighlighterPlugin.ConfigurationColor = ExpressionHighlighterPlugin.ConfigurationColorDefault;
188+
btnConfigurationColor.BackColor = ExpressionHighlighterPlugin.ConfigurationColorDefault;
189+
}
190+
catch (Exception ex)
191+
{
192+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
193+
}
133194
}
134195

135196
private void txtFreeSpaceFactor_Leave(object sender, EventArgs e)
136197
{
137-
int i;
138-
if (!int.TryParse(txtFreeSpaceFactor.Text, out i))
139-
txtFreeSpaceFactor.Text = MeasureGroupHealthCheckPlugin.FreeSpaceFactor.ToString();
198+
try
199+
{
200+
int i;
201+
if (!int.TryParse(txtFreeSpaceFactor.Text, out i))
202+
txtFreeSpaceFactor.Text = MeasureGroupHealthCheckPlugin.FreeSpaceFactor.ToString();
203+
}
204+
catch (Exception ex)
205+
{
206+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
207+
}
140208
}
141209

142210
private void buttonExpressionFont_Click(object sender, EventArgs e)
143211
{
144-
fontDialog.Font = buttonExpressionFontSample.Font;
145-
fontDialog.Color = buttonExpressionFontSample.ForeColor;
146-
if (fontDialog.ShowDialog() == DialogResult.OK)
212+
try
213+
{
214+
fontDialog.Font = buttonExpressionFontSample.Font;
215+
fontDialog.Color = buttonExpressionFontSample.ForeColor;
216+
if (fontDialog.ShowDialog() == DialogResult.OK)
217+
{
218+
buttonExpressionFontSample.Font = fontDialog.Font;
219+
buttonExpressionFontSample.ForeColor = fontDialog.Color;
220+
}
221+
}
222+
catch (Exception ex)
147223
{
148-
buttonExpressionFontSample.Font = fontDialog.Font;
149-
buttonExpressionFontSample.ForeColor = fontDialog.Color;
224+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
150225
}
151226
}
152227

153228
private void buttonResultFont_Click(object sender, EventArgs e)
154229
{
155-
fontDialog.Font = buttonResultFontSample.Font;
156-
fontDialog.Color = buttonResultFontSample.ForeColor;
157-
if (fontDialog.ShowDialog() == DialogResult.OK)
230+
try
231+
{
232+
fontDialog.Font = buttonResultFontSample.Font;
233+
fontDialog.Color = buttonResultFontSample.ForeColor;
234+
if (fontDialog.ShowDialog() == DialogResult.OK)
235+
{
236+
buttonResultFontSample.Font = fontDialog.Font;
237+
buttonResultFontSample.ForeColor = fontDialog.Color;
238+
}
239+
}
240+
catch (Exception ex)
158241
{
159-
buttonResultFontSample.Font = fontDialog.Font;
160-
buttonResultFontSample.ForeColor = fontDialog.Color;
242+
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
161243
}
162-
163244
}
164245
}
165246

Core/VersionInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class VersionInfo
99
{
1010
// BIDS Helper Assembly & VSIX Version
1111
// N.B. Manually update the manifest file, if you change this - See source.extension.vsixmanifest
12-
public const string Version = "2.3.0";
12+
public const string Version = "2.3.1";
1313

1414
private static readonly object lockResource = new object();
1515
private static Version visualStudioVersion;
Binary file not shown.
0 Bytes
Binary file not shown.
-216 Bytes
Binary file not shown.
-216 Bytes
Binary file not shown.
1 KB
Binary file not shown.

0 commit comments

Comments
 (0)