[Monodevelop-patches-list] r1788 - in trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn: . Gui Gui/Panels
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Jun 20 13:35:28 EDT 2004
Author: jluke
Date: 2004-06-20 13:35:28 -0400 (Sun, 20 Jun 2004)
New Revision: 1788
Modified:
trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/AssemblyAnalyserControl.cs
trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/AssemblyAnalyserView.cs
trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/AssemblyRuleViewControl.cs
trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/AssemblyTreeControl.cs
trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/ResultDetailsView.cs
trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/ResultListControl.cs
trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Makefile
Log:
port some stuff, you can view a blank frame if you want
Modified: trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/AssemblyAnalyserControl.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/AssemblyAnalyserControl.cs 2004-06-20 02:34:29 UTC (rev 1787)
+++ trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/AssemblyAnalyserControl.cs 2004-06-20 17:35:28 UTC (rev 1788)
@@ -13,18 +13,16 @@
namespace MonoDevelop.AssemblyAnalyser
{
- /// <summary>
- /// Description of AssemblyAnalyserControl.
- /// </summary>
public class AssemblyAnalyserControl : Frame
{
- //VPanel splitter2;
Notebook tabControl;
+ NotebookPage assembliesTabPage;
+
+ VSeparator splitter;
+ VSeparator splitter2;
+
MonoDevelop.AssemblyAnalyser.ResultListControl resultListControl;
- //VPane splitter;
MonoDevelop.AssemblyAnalyser.AssemblyTreeControl assemblyTreeControl;
- Frame panel;
- //NotebookPage assembliesTabPage;
MonoDevelop.AssemblyAnalyser.ResultDetailsView resultDetailsView;
public AssemblyAnalyserControl()
@@ -53,102 +51,25 @@
assemblyTreeControl.PrintAllResolutions();
}
- #region Windows Forms Designer generated code
- /// <summary>
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- /// </summary>
private void InitializeComponent() {
+ this.Label = "Assembly Analyser Control";
+ VBox vbox = new VBox ();
+
this.resultDetailsView = new MonoDevelop.AssemblyAnalyser.ResultDetailsView();
- //this.assembliesTabPage = new NotebookPage();
- this.panel = new Frame ();
this.assemblyTreeControl = new MonoDevelop.AssemblyAnalyser.AssemblyTreeControl();
- //this.splitter = new VPane ();
this.resultListControl = new MonoDevelop.AssemblyAnalyser.ResultListControl();
+ vbox.PackStart (this.resultDetailsView);
+ vbox.PackStart (this.assemblyTreeControl);
+ vbox.PackStart (this.resultListControl);
+
+ //this.assembliesTabPage = new NotebookPage();
+ this.splitter = new VSeparator ();
this.tabControl = new Notebook();
- //this.splitter2 = new VPane();
+ this.splitter2 = new VSeparator ();
/*
- this.resultDetailsView.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.resultDetailsView.Location = new System.Drawing.Point(0, 304);
- this.resultDetailsView.Name = "resultDetailsView";
- this.resultDetailsView.Size = new System.Drawing.Size(544, 200);
- this.resultDetailsView.TabIndex = 1;
- //
- // assembliesTabPage
- //
- this.assembliesTabPage.Controls.Add(this.assemblyTreeControl);
- this.assembliesTabPage.Location = new System.Drawing.Point(4, 22);
- this.assembliesTabPage.Name = "assembliesTabPage";
- this.assembliesTabPage.Size = new System.Drawing.Size(192, 478);
- this.assembliesTabPage.TabIndex = 0;
- this.assembliesTabPage.Text = "Assemblies";
- //
- // panel
- //
- this.panel.Controls.Add(this.resultListControl);
- this.panel.Controls.Add(this.splitter2);
- this.panel.Controls.Add(this.resultDetailsView);
- this.panel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel.Location = new System.Drawing.Point(204, 0);
- this.panel.Name = "panel";
- this.panel.Size = new System.Drawing.Size(544, 504);
- this.panel.TabIndex = 2;
- //
- // assemblyTreeControl
- //
- this.assemblyTreeControl.Dock = System.Windows.Forms.DockStyle.Fill;
- this.assemblyTreeControl.Location = new System.Drawing.Point(0, 0);
- this.assemblyTreeControl.Name = "assemblyTreeControl";
- this.assemblyTreeControl.Size = new System.Drawing.Size(192, 478);
- this.assemblyTreeControl.TabIndex = 0;
- //
- // splitter
- //
- this.splitter.Location = new System.Drawing.Point(200, 0);
- this.splitter.Name = "splitter";
- this.splitter.Size = new System.Drawing.Size(4, 504);
- this.splitter.TabIndex = 1;
- this.splitter.TabStop = false;
- //
- // resultListControl
- //
- this.resultListControl.Dock = System.Windows.Forms.DockStyle.Fill;
- this.resultListControl.Location = new System.Drawing.Point(0, 0);
- this.resultListControl.Name = "resultListControl";
- this.resultListControl.Size = new System.Drawing.Size(544, 300);
- this.resultListControl.TabIndex = 3;
this.resultListControl.Load += new System.EventHandler(this.ResultListControlLoad);
- //
- // tabControl
- //
- this.tabControl.Controls.Add(this.assembliesTabPage);
- this.tabControl.Dock = System.Windows.Forms.DockStyle.Left;
- this.tabControl.Location = new System.Drawing.Point(0, 0);
- this.tabControl.Name = "tabControl";
- this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new System.Drawing.Size(200, 504);
- this.tabControl.TabIndex = 0;
- //
- // splitter2
- //
- this.splitter2.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.splitter2.Location = new System.Drawing.Point(0, 300);
- this.splitter2.Name = "splitter2";
- this.splitter2.Size = new System.Drawing.Size(544, 4);
- this.splitter2.TabIndex = 2;
- this.splitter2.TabStop = false;
- //
- // AssemblyAnalyserControl
- //
- this.Controls.Add(this.panel);
- this.Controls.Add(this.splitter);
- this.Controls.Add(this.tabControl);
- this.Name = "AssemblyAnalyserControl";
- this.Size = new System.Drawing.Size(748, 504);
*/
}
- #endregion
void ResultListControlLoad(object sender, System.EventArgs e)
{
Modified: trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/AssemblyAnalyserView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/AssemblyAnalyserView.cs 2004-06-20 02:34:29 UTC (rev 1787)
+++ trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/AssemblyAnalyserView.cs 2004-06-20 17:35:28 UTC (rev 1788)
@@ -32,11 +32,21 @@
AppDomain analyserDomain = null;
AssemblyAnalyser currentAnalyser = null;
+
+ public override string TabPageLabel {
+ get { return GettextCatalog.GetString ("Assembly Analyzer"); }
+ }
+
+ public override string ContentName {
+ get { return GettextCatalog.GetString ("Assembly Analyzer"); }
+ }
+
public override Widget Control {
get {
return assemblyAnalyserControl;
}
}
+
public override bool IsViewOnly {
get {
return true;
@@ -48,8 +58,8 @@
return false;
}
}
-
- public AssemblyAnalyserView() //: base("Assembly Analyser")
+
+ public AssemblyAnalyserView()
{
AssemblyAnalyserViewInstance = this;
assemblyAnalyserControl = new AssemblyAnalyserControl();
@@ -64,13 +74,16 @@
if (currentAnalyser == null) {
currentAnalyser = CreateRemoteAnalyser();
}
+
IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
ArrayList projectCombineEntries = Combine.GetAllProjects(projectService.CurrentOpenCombine);
assemblyAnalyserControl.ClearContents();
+
foreach (ProjectCombineEntry projectEntry in projectCombineEntries) {
string outputAssembly = projectService.GetOutputAssemblyName(projectEntry.Project);
assemblyAnalyserControl.AnalyzeAssembly(currentAnalyser, outputAssembly);
}
+
assemblyAnalyserControl.PrintAllResolutions();
}
@@ -88,7 +101,7 @@
IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IStatusBarService));
- statusBarService.SetMessage("${res:MainWindow.StatusBar.ReadyMessage}");
+ statusBarService.SetMessage(GettextCatalog.GetString ("Ready"));
AssemblyAnalyserViewInstance = null;
}
Modified: trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/AssemblyRuleViewControl.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/AssemblyRuleViewControl.cs 2004-06-20 02:34:29 UTC (rev 1787)
+++ trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/AssemblyRuleViewControl.cs 2004-06-20 17:35:28 UTC (rev 1788)
@@ -10,44 +10,12 @@
namespace MonoDevelop.AssemblyAnalyser
{
- /// <summary>
- /// Description of AssemblyRuleViewControl.
- /// </summary>
+ // seems to be a plain TreeView
public class AssemblyRuleViewControl : TreeView
{
- TreeView ruleTreeView;
public AssemblyRuleViewControl()
{
- //
- // The InitializeComponent() call is required for Windows Forms designer support.
- //
- InitializeComponent();
-
+ Console.WriteLine ("new assembly rule view tree");
}
-
- #region Windows Forms Designer generated code
- /// <summary>
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- /// </summary>
- private void InitializeComponent() {
- this.ruleTreeView = new TreeView ();
-/*
- this.ruleTreeView.ImageIndex = -1;
- this.ruleTreeView.Location = new System.Drawing.Point(0, 0);
- this.ruleTreeView.Name = "ruleTreeView";
- this.ruleTreeView.SelectedImageIndex = -1;
- this.ruleTreeView.Size = new System.Drawing.Size(292, 266);
- this.ruleTreeView.TabIndex = 0;
- //
- // AssemblyRuleViewControl
- //
- this.Controls.Add(this.ruleTreeView);
- this.Name = "AssemblyRuleViewControl";
- this.Size = new System.Drawing.Size(292, 266);
-*/
- }
- #endregion
}
}
Modified: trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/AssemblyTreeControl.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/AssemblyTreeControl.cs 2004-06-20 02:34:29 UTC (rev 1787)
+++ trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/AssemblyTreeControl.cs 2004-06-20 17:35:28 UTC (rev 1788)
@@ -13,14 +13,12 @@
using MonoDevelop.Core.Services;
using MonoDevelop.Services;
+
namespace MonoDevelop.AssemblyAnalyser
{
- /// <summary>
- /// Description of AssemblyTreeControl.
- /// </summary>
public class AssemblyTreeControl : TreeView
{
- TreeView assemblyTreeView;
+ TreeStore assembliesStore;
TreeNode assembliesNode;
ResultListControl resultListControl;
@@ -35,9 +33,9 @@
public AssemblyTreeControl()
{
- InitializeComponent();
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
ClassBrowserIconsService classBrowserIconService = (ClassBrowserIconsService)ServiceManager.Services.GetService(typeof(ClassBrowserIconsService));
+ assembliesStore = new TreeStore (typeof (string));
//assemblyTreeView.ImageList = classBrowserIconService.ImageList;
//assembliesNode = new TreeNode(stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.AssemblyTreeControl.AssembliesNode}"));
@@ -46,6 +44,7 @@
//assemblyTreeView.AfterCollapse += new TreeViewEventHandler(AssemblyTreeViewAfterCollapse);
//assemblyTreeView.AfterExpand += new TreeViewEventHandler(AssemblyTreeViewAfterExpand);
//assemblyTreeView.AfterSelect += new TreeViewEventHandler(AssemblyTreeViewAfterSelect);
+ this.Selection.Changed += AssemblyTreeViewSelectionChanged;
}
/*
@@ -62,65 +61,43 @@
assembliesNode.ImageIndex = assembliesNode.SelectedImageIndex = 1;
}
}
+*/
- void AssemblyTreeViewAfterSelect(object sender, TreeViewEventArgs e)
+ void AssemblyTreeViewSelectionChanged (object sender, EventArgs e)
{
- if (e.Node.Tag == null) {
- PrintAllResolutions();
- } else {
- this.resultListControl.PrintReport((ArrayList)e.Node.Tag);
+ TreeIter iter;
+ TreeModel model;
+
+ if (this.Selection.GetSelected (out model, out iter))
+ {
+ this.resultListControl.PrintReport ((ArrayList) model.GetValue (iter, 1));
}
+ else
+ {
+ PrintAllResolutions ();
+ }
}
-*/
- public void PrintAllResolutions()
+ public void PrintAllResolutions ()
{
- ArrayList allResolutions = new ArrayList();
+ ArrayList allResolutions = new ArrayList ();
//foreach (TreeNode node in assembliesNode.Nodes) {
// allResolutions.AddRange((ArrayList)node.Tag);
//}
- this.resultListControl.PrintReport(allResolutions);
+ this.resultListControl.PrintReport (allResolutions);
}
public void ClearContents()
{
- Console.WriteLine("CLEAR CONTENTS");
- //assembliesNode.Nodes.Clear();
+ //Console.WriteLine("CLEAR CONTENTS");
+ assembliesStore.Clear ();
}
- public void AddAssembly(string assemblyFileName, ArrayList resolutions)
+ public void AddAssembly (string assemblyFileName, ArrayList resolutions)
{
- //TreeNode newNode = new TreeNode(Path.GetFileName(assemblyFileName));
- //newNode.Tag = resolutions;
+ assembliesStore.AppendValues (System.IO.Path.GetFileName (assemblyFileName), resolutions);
//newNode.ImageIndex = newNode.SelectedImageIndex = 2;
- //assembliesNode.Nodes.Add(newNode);
//assembliesNode.Expand();
}
-
- #region Windows Forms Designer generated code
- /// <summary>
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- /// </summary>
- private void InitializeComponent() {
- this.assemblyTreeView = new TreeView ();
-/*
- this.assemblyTreeView.HideSelection = false;
- this.assemblyTreeView.ImageIndex = -1;
- this.assemblyTreeView.Location = new System.Drawing.Point(0, 0);
- this.assemblyTreeView.Name = "assemblyTreeView";
- this.assemblyTreeView.SelectedImageIndex = -1;
- this.assemblyTreeView.Size = new System.Drawing.Size(292, 266);
- this.assemblyTreeView.TabIndex = 0;
- //
- // AssemblyTreeControl
- //
- this.Controls.Add(this.assemblyTreeView);
- this.Name = "AssemblyTreeControl";
- this.Size = new System.Drawing.Size(292, 266);
-*/
- }
- #endregion
}
}
Modified: trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/ResultDetailsView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/ResultDetailsView.cs 2004-06-20 02:34:29 UTC (rev 1787)
+++ trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/ResultDetailsView.cs 2004-06-20 17:35:28 UTC (rev 1788)
@@ -22,22 +22,14 @@
namespace MonoDevelop.AssemblyAnalyser
{
- /// <summary>
- /// Description of ResultDetailsView.
- /// </summary>
+ // it might be better to display with some simple
+ // labels, or even a DrawingArea
public class ResultDetailsView : MozillaControl
{
- MozillaControl htmlControl;
Resolution currentResolution;
+
public ResultDetailsView()
{
- //
- // The InitializeComponent() call is required for Windows Forms designer support.
- //
- InitializeComponent();
-
- htmlControl = new MozillaControl ();
- //htmlControl.Dock = DockStyle.Fill;
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
//htmlControl.CascadingStyleSheet = propertyService.DataDirectory + Path.DirectorySeparatorChar +
// "resources" + Path.DirectorySeparatorChar +
@@ -45,8 +37,7 @@
// "MsdnHelp.css";
ClearContents();
- htmlControl.OpenUri += new OpenUriHandler (HtmlControlBeforeNavigate);
- this.Add (htmlControl);
+ this.OpenUri += new OpenUriHandler (HtmlControlBeforeNavigate);
}
void HtmlControlBeforeNavigate(object sender, OpenUriArgs e)
@@ -64,7 +55,7 @@
public void ClearContents()
{
- htmlControl.Html = "<HTML><BODY></BODY></HTML>";
+ this.Html = "<HTML><BODY></BODY></HTML>";
}
void GotoCurrentCause()
@@ -91,7 +82,7 @@
this.currentResolution = resolution;
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
- htmlControl.Html = @"<HTML><BODY ID='bodyID' CLASS='dtBODY'>
+ this.Html = @"<HTML><BODY ID='bodyID' CLASS='dtBODY'>
<DIV ID='nstext'>
<DL>" + stringParserService.Parse(resolution.FailedRule.Description) + @"</DL>
<H4 CLASS='dtH4'>" + stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultDetailsView.DescriptionLabel}") + @"</H4>
@@ -101,20 +92,5 @@
" + (CanGoto(resolution) ? stringParserService.Parse("<A HREF=\"help://gotocause\">${res:MonoDevelop.AssemblyAnalyser.ResultDetailsView.JumpToSourceCodeLink}</A>") : "") + @"
</DIV></BODY></HTML>";
}
-
- #region Windows Forms Designer generated code
- /// <summary>
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- /// </summary>
- private void InitializeComponent() {
- //
- // ResultDetailsView
- //
- this.Name = "ResultDetailsView";
- //this.SetDefaultSize (292, 266);
- }
- #endregion
}
}
Modified: trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/ResultListControl.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/ResultListControl.cs 2004-06-20 02:34:29 UTC (rev 1787)
+++ trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Gui/Panels/ResultListControl.cs 2004-06-20 17:35:28 UTC (rev 1788)
@@ -16,18 +16,9 @@
namespace MonoDevelop.AssemblyAnalyser
{
- /// <summary>
- /// Description of ResultListControl.
- /// </summary>
public class ResultListControl : TreeView
{
- TreeView listView;
- //private System.Windows.Forms.ColumnHeader criticalHeader;
- //private System.Windows.Forms.ColumnHeader itemHeader;
- //private System.Windows.Forms.ColumnHeader ruleHeader;
- //private System.Windows.Forms.ColumnHeader certaintyHeader;
- //private System.Windows.Forms.ColumnHeader levelHeader;
-
+ ListStore store;
ResultDetailsView resultDetailsView = null;
public ResultDetailsView ResultDetailsView {
@@ -41,29 +32,25 @@
public ResultListControl()
{
- //
- // The InitializeComponent() call is required for Windows Forms designer support.
- //
- InitializeComponent();
-
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
- //levelHeader.Text = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.LevelHeader}");
- //certaintyHeader.Text = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.CertaintyHeader}");
- //ruleHeader.Text = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.RuleHeader}");
- //itemHeader.Text = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.ItemHeader}");
+ store = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (Resolution));
+ this.AppendColumn ("Level", new CellRendererText (), "text", 0);
+ this.AppendColumn ("Certainty", new CellRendererText (), "text", 1);
+ this.AppendColumn ("Rule", new CellRendererText (), "text", 2);
+ this.AppendColumn ("Item", new CellRendererText (), "text", 3);
+ this.Model = store;
+ this.HeadersVisible = true;
}
public void ClearContents()
{
- //this.listView.SelectedIndexChanged -= new System.EventHandler(this.ListViewSelectedIndexChanged);
- //listView.Items.Clear();
- //this.listView.SelectedIndexChanged += new System.EventHandler(this.ListViewSelectedIndexChanged);
+ store.Clear ();
}
public void PrintReport(ArrayList resolutions)
{
try {
- //listView.Items.Clear();
+ store.Clear();
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
int cerr = 0, err = 0, cwar = 0, war = 0, inf = 0;
foreach (Resolution resolution in resolutions) {
@@ -74,115 +61,64 @@
switch (resolution.FailedRule.PriorityLevel) {
case PriorityLevel.CriticalError:
critical = "!";
- type = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.ErrorType}");
+ type = "ErrorType";
foreColor = Color.Red;
++cerr;
break;
case PriorityLevel.Error:
- type = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.ErrorType}");
+ type = "ErrorType";
foreColor = Color.DarkRed;
++err;
break;
case PriorityLevel.CriticalWarning:
critical = "!";
- type = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.WarningType}");
+ type = "WarningType";
foreColor = Color.Blue;
++cwar;
break;
case PriorityLevel.Warning:
- type = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.WarningType}");
+ type = "WarningType";
foreColor = Color.DarkBlue;
++war;
break;
case PriorityLevel.Information:
- type = stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.InformationType}");
+ type = "InformationType";
++inf;
break;
}
+
string certainity = resolution.FailedRule.Certainty.ToString() + "%";
string text = stringParserService.Parse(resolution.FailedRule.Description);
string item = stringParserService.Parse(resolution.Item);
- //ListViewItem listViewItem = new ListViewItem(new string[] {critical, type, certainity, text, item});
- //listViewItem.Font = new Font("Arial", 9, FontStyle.Bold);
- //listViewItem.ForeColor = foreColor;
- //listViewItem.Tag = resolution;
- //listView.Items.Add(listViewItem);
+ store.AppendValues (critical, type, certainity, text, item, resolution);
}
+
IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IStatusBarService));
if (resolutions.Count == 0) {
- statusBarService.SetMessage("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.NoDefectsFoundStatusBarMessage}");
+ statusBarService.SetMessage (GettextCatalog.GetString ("No defects found."));
} else {
- statusBarService.SetMessage(stringParserService.Parse("${res:MonoDevelop.AssemblyAnalyser.ResultListControl.TotalDefectsStatusBarMessage}",
- new string[,] {
- {"TotalDefects", resolutions.Count.ToString()},
- {"CriticalErrors", cerr.ToString()},
- {"Errors",err.ToString()},
- {"CriticalWarnings", cwar.ToString()},
- {"Warnings", war.ToString()},
- {"Informations", inf.ToString()}
- }));
+ statusBarService.SetMessage (String.Format (GettextCatalog.GetString ("Total:{0} Critical:{1} Errors:{2} Warnings:{3} Info:{4}"), resolutions.Count.ToString (), cerr.ToString (), err.ToString (), cwar.ToString (), war.ToString (), inf.ToString ()));
}
} catch (Exception e) {
Console.WriteLine("Got exception : " + e.ToString());
}
}
- #region Windows Forms Designer generated code
- /// <summary>
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- /// </summary>
- private void InitializeComponent() {
- //this.levelHeader = new System.Windows.Forms.ColumnHeader();
- //this.certaintyHeader = new System.Windows.Forms.ColumnHeader();
- //this.ruleHeader = new System.Windows.Forms.ColumnHeader();
- //this.itemHeader = new System.Windows.Forms.ColumnHeader();
- //this.criticalHeader = new System.Windows.Forms.ColumnHeader();
-
- this.listView = new TreeView ();
-/*
- this.levelHeader.Text = "Level";
- this.certaintyHeader.Text = "Certainty";
- this.ruleHeader.Text = "Rule";
- this.itemHeader.Text = "Item";
- this.criticalHeader.Text = "!";
- this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.criticalHeader,
- this.levelHeader,
- this.certaintyHeader,
- this.ruleHeader,
- this.itemHeader});
- this.listView.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listView.FullRowSelect = true;
- this.listView.HideSelection = false;
- this.listView.Location = new System.Drawing.Point(0, 0);
- this.listView.MultiSelect = false;
- this.listView.Name = "listView";
- this.listView.Size = new System.Drawing.Size(572, 396);
- this.listView.TabIndex = 3;
- this.listView.View = System.Windows.Forms.View.Details;
- this.listView.ItemActivate += new System.EventHandler(this.ListViewItemActivate);
- this.listView.SelectedIndexChanged += new System.EventHandler(this.ListViewSelectedIndexChanged);
- //
- // ResultListControl
- //
- this.Controls.Add(this.listView);
- this.Name = "ResultListControl";
- this.Size = new System.Drawing.Size(572, 396);
-*/
- }
- #endregion
- void ListViewSelectedIndexChanged(object sender, System.EventArgs e)
+ void ListViewSelectionChanged (object sender, EventArgs e)
{
- /* if (resultDetailsView != null && listView.SelectedItems.Count > 0) {
- resultDetailsView.ViewResolution((Resolution)listView.SelectedItems[0].Tag);
+ TreeIter iter;
+ TreeModel model;
+
+ if (this.Selection.GetSelected (out model, out iter))
+ {
+ resultDetailsView.ViewResolution ((Resolution) model.GetValue (iter, 5));
}
- listView.Focus();
- */
+
+ //this.GrabFocus ();
}
- void ListViewItemActivate(object sender, System.EventArgs e)
+
+ void ListViewItemActivated (object sender, RowActivatedArgs e)
{
// ListViewItem item = listView.SelectedItems[0];
// if (item != null && item.Tag != null) {
@@ -197,6 +133,5 @@
// }
// }
}
-
}
}
Modified: trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Makefile
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Makefile 2004-06-20 02:34:29 UTC (rev 1787)
+++ trunk/MonoDevelop/src/AddIns/Misc/AssemblyAnalyser/ICSharpCode.AssemblyAnalyzer.AddIn/Makefile 2004-06-20 17:35:28 UTC (rev 1788)
@@ -7,7 +7,7 @@
-pkg:gtk-sharp \
-pkg:gecko-sharp \
/r:System.Drawing.dll \
- /r:../../../../../build/bin/ICSharpCode.AssemblyAnalyser.dll \
+ /r:../../../../../build/AddIns/ICSharpCode.AssemblyAnalyser.dll \
/r:../../../../../build/bin/MonoDevelop.Core.dll \
/r:../../../../../build/bin/MonoDevelop.Base.dll
More information about the Monodevelop-patches-list
mailing list