~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.CodeMetrics/MonoDevelop.CodeMetrics/InterfaceProperties.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-09-10 16:54:48 UTC
  • mfrom: (19.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100910165448-0rybfk25zd4o9431
Tags: 2.4+dfsg-2
* debian/patches/inject_Mono.Debugger.Soft_source.patch,
  debian/patches/use_system_Mono.Debugger.Soft.patch,
  debian/control:
  + Build against system Soft Debugger, since we now have a new
    enough Mono to match MonoDevelop's required API

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// 
 
2
// InterfaceProperties.cs
 
3
//  
 
4
// Author:
 
5
//       Nikhil Sarda <diff.operator@gmail.com>
 
6
// 
 
7
// Copyright (c) 2009 Nikhil Sarda
 
8
// 
 
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
 
10
// of this software and associated documentation files (the "Software"), to deal
 
11
// in the Software without restriction, including without limitation the rights
 
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
13
// copies of the Software, and to permit persons to whom the Software is
 
14
// furnished to do so, subject to the following conditions:
 
15
// 
 
16
// The above copyright notice and this permission notice shall be included in
 
17
// all copies or substantial portions of the Software.
 
18
// 
 
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 
25
// THE SOFTWARE.
 
26
 
 
27
using System;
 
28
using System.Collections;
 
29
using System.Collections.Generic;
 
30
using System.Text;
 
31
 
 
32
 
 
33
using Gtk;
 
34
 
 
35
using MonoDevelop.Core;
 
36
 
 
37
using MonoDevelop.Ide.Gui;
 
38
using MonoDevelop.Projects;
 
39
using MonoDevelop.Projects.Dom;
 
40
using MonoDevelop.Projects.Dom.Parser;
 
41
using MonoDevelop.Projects.Dom.Output;
 
42
using Mono.TextEditor;
 
43
 
 
44
using ICSharpCode.NRefactory.Ast;
 
45
using ICSharpCode.NRefactory.AstBuilder;
 
46
 
 
47
namespace MonoDevelop.CodeMetrics
 
48
{
 
49
        public class InterfaceProperties : IProperties
 
50
        {
 
51
                IType interfce;
 
52
                
 
53
                //TODO Implement method properties for Interfaces
 
54
                Dictionary<string, MethodProperties> Methods;
 
55
                Dictionary<string, FieldProperties> Fields;
 
56
                
 
57
                public IType Interface {
 
58
                        get {
 
59
                                return interfce;
 
60
                        }
 
61
                }
 
62
                
 
63
                public string FullName {
 
64
                        get; internal set;
 
65
                }
 
66
                
 
67
                public int CyclometricComplexity {
 
68
                        get {
 
69
                                return 0;
 
70
                        }
 
71
                }
 
72
                
 
73
                public int ClassCoupling {
 
74
                        get; internal set;
 
75
                }
 
76
                
 
77
                public int StartLine {
 
78
                        get; private set;
 
79
                }
 
80
                
 
81
                public int EndLine {
 
82
                        get; private set;
 
83
                }
 
84
                
 
85
                public ulong LOCReal {
 
86
                        get; internal set;
 
87
                }
 
88
                
 
89
                public ulong LOCComments {
 
90
                        get;internal set;
 
91
                }
 
92
                
 
93
                public string FilePath { 
 
94
                        get; set;
 
95
                }
 
96
                
 
97
                public InterfaceProperties (IType i)
 
98
                {
 
99
                        interfce = i;
 
100
                        FullName = Interface.FullName;
 
101
                        StartLine = Interface.BodyRegion.Start.Line;
 
102
                        EndLine = Interface.BodyRegion.End.Line;
 
103
                        FilePath="";
 
104
                }
 
105
        
 
106
        }
 
107
}