Changeset 11816
- Timestamp:
- 01/21/15 18:59:34 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.CodeEditor/3.4
- Files:
-
- 1 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CodeEditor/3.4/HeuristicLab.CodeEditor-3.4.csproj
r11804 r11816 156 156 <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpCodeCompletionContext.cs" /> 157 157 <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpCodeCompletionDataFactory.cs" /> 158 <Compile Include="LanguageFeatures\ CodeCompletion\CSharp\CSharpCodeCompletionHelpers.cs" />158 <Compile Include="LanguageFeatures\Helpers\CSharpParsingHelpers.cs" /> 159 159 <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\EntityCompletionData.cs" /> 160 160 <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\ImportCompletionData.cs" /> -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs
r11800 r11816 46 46 this.offset = offset; 47 47 48 var unresolvedFile = CSharp CodeCompletionHelpers.CreateCSharpUnresolvedFile(this.document);48 var unresolvedFile = CSharpParsingHelpers.CreateCSharpUnresolvedFile(this.document); 49 49 this.projectContent = projectContent.AddOrUpdateFiles(unresolvedFile); 50 50 -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs
r11802 r11816 56 56 completionContext.ProjectContent, 57 57 completionContext.TypeResolveContextAtCaret 58 ) { EolMarker = Environment.NewLine };58 ); 59 59 60 60 char completionChar = completionContext.Document.GetCharAt(completionContext.Offset - 1); … … 119 119 ); 120 120 121 var unresolvedFile = CSharp CodeCompletionHelpers.CreateCSharpUnresolvedFile(document);121 var unresolvedFile = CSharpParsingHelpers.CreateCSharpUnresolvedFile(document); 122 122 projectContent = projectContent.AddOrUpdateFiles(unresolvedFile); 123 123 } -
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 } -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Helpers/CSharpParsingHelpers.cs
r11813 r11816 25 25 26 26 namespace HeuristicLab.CodeEditor { 27 internal class CSharp CodeCompletionHelpers {28 public static CSharpUnresolvedFile CreateCSharpUnresolvedFile(IDocument document) {27 internal class CSharpParsingHelpers { 28 public static SyntaxTree CreateSyntaxTree(IDocument document) { 29 29 var parser = new CSharpParser(); 30 30 var syntaxTree = parser.Parse(document, document.FileName); 31 return syntaxTree; 32 } 33 34 public static CSharpUnresolvedFile CreateCSharpUnresolvedFile(IDocument document) { 35 var syntaxTree = CreateSyntaxTree(document); 31 36 syntaxTree.Freeze(); 32 return syntaxTree.ToTypeSystem(); 37 var unresolvedFile = syntaxTree.ToTypeSystem(); 38 return unresolvedFile; 33 39 } 34 40 }
Note: See TracChangeset
for help on using the changeset viewer.