- Timestamp:
- 01/21/15 18:59:34 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs
r11700 r11816 25 25 namespace HeuristicLab.CodeEditor { 26 26 internal class CSharpCodeFoldingContext { 27 public readonly IDocument Document; 28 public readonly SyntaxTree SyntaxTree; 27 private readonly IDocument document; 28 public IDocument Document { get { return document; } } 29 30 private readonly SyntaxTree syntaxTree; 31 public SyntaxTree SyntaxTree { get { return syntaxTree; } } 29 32 30 33 public CSharpCodeFoldingContext(IDocument document) { 31 Document = new ReadOnlyDocument(document, document.FileName); 32 33 var parser = new CSharpParser(); 34 var syntaxTree = parser.Parse(document, document.FileName); 35 syntaxTree.Freeze(); 36 37 SyntaxTree = syntaxTree; 34 this.document = new ReadOnlyDocument(document, document.FileName); 35 syntaxTree = CSharpParsingHelpers.CreateSyntaxTree(this.document); 38 36 } 39 37 }
Note: See TracChangeset
for help on using the changeset viewer.