Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 5360a89

Browse files
CodeQuality/CodeQuality.csproj can run one easy report with ICSharpcode.Reporting
1 parent 3076e31 commit 5360a89

10 files changed

Lines changed: 75 additions & 132 deletions

File tree

SharpDevelop.Tests.sln

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,14 @@ Global
497497
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Debug|Any CPU.Build.0 = Debug|Any CPU
498498
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Release|Any CPU.ActiveCfg = Release|Any CPU
499499
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Release|Any CPU.Build.0 = Release|Any CPU
500+
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
501+
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.Build.0 = Debug|Any CPU
502+
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.ActiveCfg = Release|Any CPU
503+
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.Build.0 = Release|Any CPU
504+
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
505+
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
506+
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
507+
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Release|Any CPU.Build.0 = Release|Any CPU
500508
{0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
501509
{0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Any CPU.Build.0 = Debug|Any CPU
502510
{0162E499-42D0-409B-AA25-EED21F75336B}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -649,14 +657,6 @@ Global
649657
{3DF4060F-5EE0-41CF-8096-F27355FD5511}.Debug|Any CPU.Build.0 = Debug|Any CPU
650658
{3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|Any CPU.ActiveCfg = Release|Any CPU
651659
{3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|Any CPU.Build.0 = Release|Any CPU
652-
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
653-
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.Build.0 = Debug|Any CPU
654-
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.ActiveCfg = Release|Any CPU
655-
{40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.Build.0 = Release|Any CPU
656-
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
657-
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
658-
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
659-
{97CA9CE5-B966-48DF-BB59-F00FFC534B1F}.Release|Any CPU.Build.0 = Release|Any CPU
660660
EndGlobalSection
661661
GlobalSection(SolutionProperties) = preSolution
662662
HideSolutionNode = FALSE

src/AddIns/Analysis/CodeQuality/CodeQuality.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
<EmbeddedResource Include="Reporting\Overviewreport.srd">
112112
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
113113
</EmbeddedResource>
114+
<EmbeddedResource Include="Reporting\DependencyReport - Kopie.srd" />
114115
</ItemGroup>
115116
<ItemGroup>
116117
<Folder Include="Engine\Dom" />
@@ -172,10 +173,9 @@
172173
<Name>ICSharpCode.SharpDevelop.Widgets</Name>
173174
<Private>False</Private>
174175
</ProjectReference>
175-
<ProjectReference Include="..\..\Misc\Reports\ICSharpCode.Reports.Core\ICSharpCode.Reports.Core.csproj">
176-
<Project>{7C3579BC-2A64-4108-82B5-3D07ADA079E7}</Project>
177-
<Name>ICSharpCode.Reports.Core</Name>
178-
<Private>False</Private>
176+
<ProjectReference Include="..\..\Misc\Reporting\ICSharpCode.Reporting\ICSharpCode.Reporting.csproj">
177+
<Project>{40CA84D4-ACFC-4646-9CDD-B87262D34093}</Project>
178+
<Name>ICSharpCode.Reporting</Name>
179179
</ProjectReference>
180180
</ItemGroup>
181181
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />

src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
55
xmlns:gui="clr-namespace:ICSharpCode.CodeQuality.Gui"
66
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
7-
xmlns:rep="clr-namespace:ICSharpCode.Reports.Core.WpfReportViewer;assembly=ICSharpCode.Reports.Core">
8-
7+
xmlns:reporting="clr-namespace:ICSharpCode.Reporting.WpfReportViewer;assembly=ICSharpCode.Reporting">
8+
99
<DockPanel>
1010
<ToolBar DockPanel.Dock="Top">
1111
<Button Click="AddAssemblyClick">Add Assembly</Button>
1212

1313
<Menu Background="White" x:Name="printMenu" Visibility="Hidden">
1414
<MenuItem Header="Reports">
15-
<MenuItem Header="Overview" Click="OverviewReport_Click"></MenuItem>
15+
<!--<MenuItem Header="Overview" Click="OverviewReport_Click"></MenuItem>-->
1616
<MenuItem Header="Dependecies" Click=" DependecyReport_Click"></MenuItem>
1717

1818
</MenuItem>
@@ -39,8 +39,7 @@
3939
x:Name="reportTab"
4040
Visibility="Hidden">
4141
<Grid>
42-
<rep:WpfReportViewer
43-
x:Name="viewer" />
42+
<reporting:WpfReportViewer x:Name="viewer" />
4443
</Grid>
4544
</TabItem>
4645
</TabControl>

src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,13 @@
1919
using System;
2020
using System.Collections.Generic;
2121
using System.Collections.ObjectModel;
22-
using System.Text;
2322
using System.Windows;
2423
using System.Windows.Controls;
25-
using System.Windows.Data;
26-
using System.Windows.Documents;
27-
using System.Windows.Input;
28-
using System.Windows.Media;
2924

25+
using ICSharpCode.Reporting.WpfReportViewer;
3026
using ICSharpCode.CodeQuality.Engine;
3127
using ICSharpCode.CodeQuality.Engine.Dom;
3228
using ICSharpCode.CodeQuality.Reporting;
33-
using ICSharpCode.Reports.Core.WpfReportViewer;
3429
using ICSharpCode.SharpDevelop.Gui;
3530
using Microsoft.Win32;
3631

@@ -102,11 +97,13 @@ void OverviewReport_Click(object sender, RoutedEventArgs e)
10297

10398
void DependecyReport_Click(object sender, RoutedEventArgs e)
10499
{
100+
105101
var dependencyReport = new DependencyReport(fileNames);
106102
var reportCreator = dependencyReport.Run(list);
107103
var previewViewModel = new PreviewViewModel(dependencyReport.ReportSettings,reportCreator.Pages);
108104
viewer.SetBinding(previewViewModel);
109105
ActivateReportTab();
106+
110107
}
111108

112109
void ActivateReportTab()

src/AddIns/Analysis/CodeQuality/Reporting/BaseReport.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818

1919
using System;
2020
using System.Collections.Generic;
21-
using System.IO;
22-
using System.Reflection;
21+
using ICSharpCode.Reporting.Items;
2322

24-
using ICSharpCode.Reports.Core;
2523

2624
namespace ICSharpCode.CodeQuality.Reporting
2725
{

src/AddIns/Analysis/CodeQuality/Reporting/DependencyReport.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
using System.Collections.ObjectModel;
2222
using System.Reflection;
2323

24+
using ICSharpCode.Reporting;
25+
using ICSharpCode.Reporting.Interfaces;
2426
using ICSharpCode.CodeQuality.Engine.Dom;
25-
using ICSharpCode.Reports.Core;
2627

2728
namespace ICSharpCode.CodeQuality.Reporting
2829
{
@@ -38,16 +39,17 @@ public DependencyReport(List<string> fileNames):base(fileNames)
3839
}
3940

4041
public IReportCreator Run(ReadOnlyCollection<AssemblyNode> list)
41-
{
42-
System.Reflection.Assembly asm = Assembly.GetExecutingAssembly();
43-
System.IO.Stream stream = asm.GetManifestResourceStream("ICSharpCode.CodeQuality.Reporting.DependencyReport.srd");
44-
var model = ReportEngine.LoadReportModel(stream);
45-
ReportSettings = model.ReportSettings;
42+
{
4643
var newList = MakeList (list);
4744

48-
IReportCreator creator = ReportEngine.CreatePageBuilder(model,newList,null);
49-
creator.BuildExportList();
50-
return creator;
45+
Assembly asm = Assembly.GetExecutingAssembly();
46+
System.IO.Stream stream = asm.GetManifestResourceStream("ICSharpCode.CodeQuality.Reporting.DependencyReport.srd");
47+
48+
var rf = new ReportingFactory();
49+
var reportCreator = rf.ReportCreator (stream,newList);
50+
ReportSettings = rf.ReportModel.ReportSettings;
51+
reportCreator.BuildExportList();
52+
return reportCreator;
5153
}
5254

5355

src/AddIns/Analysis/CodeQuality/Reporting/DependencyReport.srd

Lines changed: 31 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<GroupColumnsCollection>
1818
<GroupColumn>
1919
<SortDirection>Ascending</SortDirection>
20+
<CaseSensitive>False</CaseSensitive>
2021
<ColumnName>Name</ColumnName>
2122
<DataTypeName>System.String</DataTypeName>
2223
</GroupColumn>
@@ -37,7 +38,6 @@
3738
<Location>50, 50</Location>
3839
<Size>727, 60</Size>
3940
<BackColor>White</BackColor>
40-
<VisibleInReport>False</VisibleInReport>
4141
<SectionOffset>0</SectionOffset>
4242
<SectionMargin>0</SectionMargin>
4343
<DrawBorder>False</DrawBorder>
@@ -47,7 +47,6 @@
4747
<Location>157, 3</Location>
4848
<Size>414, 40</Size>
4949
<BackColor>White</BackColor>
50-
<VisibleInReport>True</VisibleInReport>
5150
<Font>Segoe UI, 18pt, style=Bold</Font>
5251
<StringTrimming>None</StringTrimming>
5352
<ContentAlignment>TopLeft</ContentAlignment>
@@ -68,7 +67,6 @@
6867
<Location>50, 125</Location>
6968
<Size>727, 69</Size>
7069
<BackColor>White</BackColor>
71-
<VisibleInReport>False</VisibleInReport>
7270
<SectionOffset>0</SectionOffset>
7371
<SectionMargin>0</SectionMargin>
7472
<DrawBorder>False</DrawBorder>
@@ -78,7 +76,6 @@
7876
<Location>22, 47</Location>
7977
<Size>660, 10</Size>
8078
<BackColor>White</BackColor>
81-
<VisibleInReport>True</VisibleInReport>
8279
<ForeColor>Black</ForeColor>
8380
<FromPoint>10, 5</FromPoint>
8481
<ToPoint>647, 5</ToPoint>
@@ -93,7 +90,6 @@
9390
<Location>222, 3</Location>
9491
<Size>257, 26</Size>
9592
<BackColor>White</BackColor>
96-
<VisibleInReport>True</VisibleInReport>
9793
<Font>Microsoft Sans Serif, 15.75pt</Font>
9894
<StringTrimming>None</StringTrimming>
9995
<ContentAlignment>TopLeft</ContentAlignment>
@@ -111,7 +107,6 @@
111107
<Location>563, 3</Location>
112108
<Size>100, 26</Size>
113109
<BackColor>White</BackColor>
114-
<VisibleInReport>True</VisibleInReport>
115110
<Font>Segoe UI, 15.75pt</Font>
116111
<StringTrimming>None</StringTrimming>
117112
<ContentAlignment>TopLeft</ContentAlignment>
@@ -132,67 +127,49 @@
132127
<Location>50, 209</Location>
133128
<Size>727, 115</Size>
134129
<BackColor>White</BackColor>
135-
<VisibleInReport>False</VisibleInReport>
136130
<SectionOffset>0</SectionOffset>
137131
<SectionMargin>0</SectionMargin>
138132
<DrawBorder>False</DrawBorder>
139133
<PageBreakAfter>False</PageBreakAfter>
140134
<Items>
141-
<BaseRowItem>
142-
<Location>31, 72</Location>
143-
<Size>641, 30</Size>
135+
<BaseDataItem>
136+
<Location>445, 72</Location>
137+
<Size>71, 20</Size>
144138
<BackColor>White</BackColor>
145-
<VisibleInReport>True</VisibleInReport>
139+
<Font>Segoe UI, 9pt</Font>
140+
<StringTrimming>None</StringTrimming>
141+
<ContentAlignment>MiddleRight</ContentAlignment>
142+
<CanGrow>False</CanGrow>
143+
<CanShrink>False</CanShrink>
144+
<RTL>No</RTL>
145+
<Text>BaseDataItem2147483646</Text>
146146
<DrawBorder>False</DrawBorder>
147+
<FrameColor>Black</FrameColor>
147148
<ForeColor>Black</ForeColor>
149+
<ColumnName>ReferenceCount</ColumnName>
150+
<Name>BaseDataItem2147483646</Name>
151+
</BaseDataItem>
152+
<BaseDataItem>
153+
<Location>256, 72</Location>
154+
<Size>156, 20</Size>
155+
<BackColor>White</BackColor>
156+
<Font>Microsoft Sans Serif, 10pt</Font>
157+
<StringTrimming>None</StringTrimming>
158+
<ContentAlignment>TopLeft</ContentAlignment>
159+
<CanGrow>False</CanGrow>
160+
<CanShrink>False</CanShrink>
161+
<RTL>No</RTL>
162+
<Text>References</Text>
163+
<DrawBorder>False</DrawBorder>
148164
<FrameColor>Black</FrameColor>
149-
<Items>
150-
<BaseDataItem>
151-
<Location>443, 4</Location>
152-
<Size>71, 20</Size>
153-
<BackColor>White</BackColor>
154-
<VisibleInReport>True</VisibleInReport>
155-
<Font>Segoe UI, 9pt</Font>
156-
<StringTrimming>None</StringTrimming>
157-
<ContentAlignment>MiddleRight</ContentAlignment>
158-
<CanGrow>False</CanGrow>
159-
<CanShrink>False</CanShrink>
160-
<RTL>No</RTL>
161-
<Text>BaseDataItem2147483646</Text>
162-
<DrawBorder>False</DrawBorder>
163-
<FrameColor>Black</FrameColor>
164-
<ForeColor>Black</ForeColor>
165-
<ColumnName>ReferenceCount</ColumnName>
166-
<Name>BaseDataItem2147483646</Name>
167-
</BaseDataItem>
168-
<BaseDataItem>
169-
<Location>254, 4</Location>
170-
<Size>156, 20</Size>
171-
<BackColor>White</BackColor>
172-
<VisibleInReport>True</VisibleInReport>
173-
<Font>Microsoft Sans Serif, 10pt</Font>
174-
<StringTrimming>None</StringTrimming>
175-
<ContentAlignment>TopLeft</ContentAlignment>
176-
<CanGrow>False</CanGrow>
177-
<CanShrink>False</CanShrink>
178-
<RTL>No</RTL>
179-
<Text>References</Text>
180-
<DrawBorder>False</DrawBorder>
181-
<FrameColor>Black</FrameColor>
182-
<ForeColor>Black</ForeColor>
183-
<ColumnName>References</ColumnName>
184-
<Name>BaseDataItem2</Name>
185-
</BaseDataItem>
186-
</Items>
187-
<AlternateBackColor />
188-
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
189-
<Name>BaseRowItem1</Name>
190-
</BaseRowItem>
165+
<ForeColor>Black</ForeColor>
166+
<ColumnName>References</ColumnName>
167+
<Name>BaseDataItem2</Name>
168+
</BaseDataItem>
191169
<GroupHeader>
192170
<Location>31, 22</Location>
193171
<Size>641, 30</Size>
194172
<BackColor>LightGray</BackColor>
195-
<VisibleInReport>True</VisibleInReport>
196173
<DrawBorder>False</DrawBorder>
197174
<ForeColor>Black</ForeColor>
198175
<FrameColor>Black</FrameColor>
@@ -201,7 +178,6 @@
201178
<Location>414, 7</Location>
202179
<Size>100, 20</Size>
203180
<BackColor>White</BackColor>
204-
<VisibleInReport>True</VisibleInReport>
205181
<Font>Segoe UI, 9.75pt</Font>
206182
<StringTrimming>None</StringTrimming>
207183
<ContentAlignment>MiddleRight</ContentAlignment>
@@ -218,7 +194,6 @@
218194
<Location>254, 2</Location>
219195
<Size>100, 20</Size>
220196
<BackColor>White</BackColor>
221-
<VisibleInReport>True</VisibleInReport>
222197
<Font>Microsoft Sans Serif, 10pt</Font>
223198
<StringTrimming>None</StringTrimming>
224199
<ContentAlignment>TopLeft</ContentAlignment>
@@ -235,7 +210,6 @@
235210
<Location>12, 3</Location>
236211
<Size>211, 20</Size>
237212
<BackColor>White</BackColor>
238-
<VisibleInReport>True</VisibleInReport>
239213
<Font>Microsoft Sans Serif, 10pt</Font>
240214
<StringTrimming>None</StringTrimming>
241215
<ContentAlignment>TopLeft</ContentAlignment>
@@ -263,7 +237,6 @@
263237
<Location>50, 339</Location>
264238
<Size>727, 36</Size>
265239
<BackColor>White</BackColor>
266-
<VisibleInReport>False</VisibleInReport>
267240
<SectionOffset>0</SectionOffset>
268241
<SectionMargin>0</SectionMargin>
269242
<DrawBorder>False</DrawBorder>
@@ -273,7 +246,6 @@
273246
<Location>31, 5</Location>
274247
<Size>555, 20</Size>
275248
<BackColor>White</BackColor>
276-
<VisibleInReport>True</VisibleInReport>
277249
<Font>Segoe UI, 9.75pt</Font>
278250
<StringTrimming>None</StringTrimming>
279251
<ContentAlignment>TopLeft</ContentAlignment>
@@ -290,7 +262,6 @@
290262
<Location>624, 5</Location>
291263
<Size>100, 20</Size>
292264
<BackColor>White</BackColor>
293-
<VisibleInReport>True</VisibleInReport>
294265
<Font>Microsoft Sans Serif, 10pt</Font>
295266
<StringTrimming>None</StringTrimming>
296267
<ContentAlignment>TopLeft</ContentAlignment>
@@ -312,7 +283,6 @@
312283
<Location>50, 390</Location>
313284
<Size>727, 60</Size>
314285
<BackColor>White</BackColor>
315-
<VisibleInReport>False</VisibleInReport>
316286
<SectionOffset>0</SectionOffset>
317287
<SectionMargin>0</SectionMargin>
318288
<DrawBorder>False</DrawBorder>

0 commit comments

Comments
 (0)