Changeset 15973 for branches/2522_RefactorPluginInfrastructure/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding
- Timestamp:
- 06/28/18 11:13:37 (6 years ago)
- Location:
- branches/2522_RefactorPluginInfrastructure
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2522_RefactorPluginInfrastructure
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2522_RefactorPluginInfrastructure/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2522_RefactorPluginInfrastructure/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 var result = new CodeFoldingResult(); 32 32 33 var foldingContext = new CSharpCodeFoldingContext(document); 34 var v = new FoldingVisitor(); 35 v.document = foldingContext.Document; 36 foldingContext.SyntaxTree.AcceptVisitor(v); 37 result.FoldingData = v.foldings.OrderBy(x => x.StartOffset).ToList(); 33 try { 34 var foldingContext = new CSharpCodeFoldingContext(document); 35 var v = new FoldingVisitor(); 36 v.document = foldingContext.Document; 37 foldingContext.SyntaxTree.AcceptVisitor(v); 38 result.FoldingData = v.foldings.OrderBy(x => x.StartOffset).ToList(); 38 39 39 var firstError = foldingContext.SyntaxTree.Errors.FirstOrDefault(); 40 firstErrorOffset = firstError != null 41 ? foldingContext.Document.GetOffset(firstError.Region.Begin) 42 : int.MaxValue; 40 var firstError = foldingContext.SyntaxTree.Errors.FirstOrDefault(); 41 firstErrorOffset = firstError != null 42 ? foldingContext.Document.GetOffset(firstError.Region.Begin) 43 : int.MaxValue; 44 } catch { 45 // ignore exceptions thrown during code folding 46 firstErrorOffset = int.MaxValue; 47 } 43 48 44 49 return result; -
branches/2522_RefactorPluginInfrastructure/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingResult.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2522_RefactorPluginInfrastructure/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingStrategy.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2522_RefactorPluginInfrastructure/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/XML/XmlCodeFoldingStrategy.cs
r12012 r15973 19 19 20 20 /* HeuristicLab 21 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)21 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 22 22 * 23 23 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.