6 changed files with 128 additions and 62 deletions
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Peter Forstmeier |
||||
* Date: 02.01.2012 |
||||
* Time: 20:26 |
||||
* |
||||
* To change this template use Tools | Options | Coding | Edit Standard Headers. |
||||
*/ |
||||
using System; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.CodeQualityAnalysis.Utility.Queries |
||||
{ |
||||
/// <summary>
|
||||
/// Description of BaseQuery.
|
||||
/// </summary>
|
||||
public class BaseQuery |
||||
{ |
||||
public BaseQuery(Module mainModule) |
||||
{ |
||||
MainModule = mainModule; |
||||
} |
||||
|
||||
public Module MainModule {get; private set;} |
||||
|
||||
public virtual List<ItemWithAction> GetQueryList () |
||||
{ |
||||
throw new InvalidOperationException("Must override"); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,62 @@
@@ -0,0 +1,62 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Peter Forstmeier |
||||
* Date: 02.01.2012 |
||||
* Time: 20:11 |
||||
* |
||||
* To change this template use Tools | Options | Coding | Edit Standard Headers. |
||||
*/ |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using ICSharpCode.Core; |
||||
|
||||
namespace ICSharpCode.CodeQualityAnalysis.Utility.Queries |
||||
{ |
||||
/// <summary>
|
||||
/// Description of QueryNameSpace.
|
||||
/// </summary>
|
||||
public class QueryNameSpace:BaseQuery |
||||
{ |
||||
public QueryNameSpace(Module mainModule):base (mainModule) |
||||
{ |
||||
} |
||||
|
||||
|
||||
public override List<ItemWithAction> GetQueryList() |
||||
{ |
||||
List<ItemWithAction> items = new List<ItemWithAction>(); |
||||
items.Add(new ItemWithAction() |
||||
{ |
||||
Description = "# of Methods", |
||||
Metrics = Metrics.CyclomaticComplexity.ToString(), |
||||
Action = ExecuteNotImplemented |
||||
}); |
||||
items.Add(new ItemWithAction() |
||||
{ |
||||
Description = "# of Fields", |
||||
Metrics = Metrics.Variables.ToString(), |
||||
Action = ExecuteNotImplemented |
||||
}); |
||||
items.Add(new ItemWithAction() |
||||
{ |
||||
Description = "# of Types", |
||||
Metrics = Metrics.Variables.ToString(), |
||||
Action = ExecuteNotImplemented |
||||
}); |
||||
|
||||
items.Add(new ItemWithAction() |
||||
{ |
||||
Description = "# of Namespaces", |
||||
Metrics = Metrics.Variables.ToString(), |
||||
Action = ExecuteNotImplemented |
||||
}); |
||||
return items; |
||||
} |
||||
|
||||
private List<INode> ExecuteNotImplemented() |
||||
{ |
||||
MessageService.ShowMessage("Not Implemented yet","CodeQualityAnalysis"); |
||||
return null; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue