~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ExpandedPaths/ExpandedExpressions.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the BSD license (for details please see \src\AddIns\Debugger\Debugger.AddIn\license.txt)
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
using System.Linq;
 
7
using Debugger.AddIn.Visualizers.Graph.Layout;
 
8
using ICSharpCode.NRefactory.Ast;
 
9
 
 
10
 
 
11
namespace Debugger.AddIn.Visualizers.Graph
 
12
{
 
13
        /// <summary>
 
14
        /// Remembers which properties the user has expanded in the <see cref="PositionedGraph">.
 
15
        /// </summary>
 
16
        public class ExpandedExpressions
 
17
        {
 
18
                private ExpandedPaths expanded = new ExpandedPaths();
 
19
                
 
20
                public ExpandedExpressions()
 
21
                {
 
22
                }
 
23
                
 
24
                public bool IsExpanded(Expression expression)
 
25
                {
 
26
                        return expanded.IsExpanded(expression.PrettyPrint());
 
27
                }
 
28
                
 
29
                public void SetExpanded(Expression expression)
 
30
                {
 
31
                        expanded.SetExpanded(expression.PrettyPrint());
 
32
                }
 
33
                
 
34
                public void SetCollapsed(Expression expression)
 
35
                {
 
36
                        expanded.SetCollapsed(expression.PrettyPrint());
 
37
                }
 
38
        }
 
39
}