Changeset 11933 for trunk/sources/HeuristicLab.CodeEditor
- Timestamp:
- 02/06/15 10:34:31 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.CodeEditor/3.4
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CodeEditor/3.4/CodeEditor.cs
r11836 r11933 61 61 62 62 private AssemblyLoader assemblyLoader; 63 private ILanguageFeatures languageFeatures;64 63 private TextMarkerService textMarkerService; 65 64 … … 191 190 TextEditor.TextArea.TextView.LineTransformers.Add(textMarkerService); 192 191 TextEditor.TextArea.TextView.Services.AddService(typeof(ITextMarkerService), textMarkerService); 193 194 192 #endregion 195 193 … … 441 439 switch (TextEditorSyntaxHighlighting) { 442 440 case "XML": 443 languageFeatures = new XmlLanguageFeatures(this);441 XmlLanguageFeatures.Apply(this); 444 442 break; 445 443 default: 446 languageFeatures = new CSharpLanguageFeatures(this);444 CSharpLanguageFeatures.Apply(this); 447 445 break; 448 446 } -
trunk/sources/HeuristicLab.CodeEditor/3.4/HeuristicLab.CodeEditor-3.4.csproj
r11816 r11933 158 158 <Compile Include="LanguageFeatures\Helpers\CSharpParsingHelpers.cs" /> 159 159 <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\EntityCompletionData.cs" /> 160 <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\ImportCompletionData.cs" />161 160 <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\VariableCompletionData.cs" /> 162 161 <Compile Include="LanguageFeatures\Interfaces\ICodeFoldingStrategy.cs" /> -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs
r11700 r11933 25 25 : base(codeEditor, new CSharpCodeFoldingStrategy(codeEditor), new CSharpCodeCompletionStrategy(codeEditor)) { 26 26 } 27 28 public static ILanguageFeatures Apply(CodeEditor codeEditor) { 29 return new CSharpLanguageFeatures(codeEditor); 30 } 27 31 } 28 32 } -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs
r11825 r11933 105 105 106 106 public ICompletionData CreateImportCompletionData(IType type, bool useFullName, bool addForTypeCreation) { 107 var typeDef = type.GetDefinition(); 108 return new ImportCompletionData(typeDef, context.TypeResolveContextAtCaret, useFullName); 107 return null; 109 108 } 110 109 -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs
r11819 r11933 161 161 #endregion 162 162 163 164 163 public event PropertyChangedEventHandler PropertyChanged; 165 166 164 private void OnPropertyChanged(string propertyName) { 167 165 var args = new PropertyChangedEventArgs(propertyName); -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs
r11800 r11933 40 40 } 41 41 42 public virtual void RunBackgroundParser() {42 public virtual void Initialize() { 43 43 backgroundParser.Start(); 44 44 } -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs
r11722 r11933 22 22 using System.Linq; 23 23 using CSharpBinding.Parser; 24 using ICSharpCode.NRefactory.CSharp;25 using ICSharpCode.NRefactory.TypeSystem;26 24 27 25 namespace HeuristicLab.CodeEditor { 28 26 internal class CSharpCodeFoldingStrategy : CodeFoldingStrategy { 29 private IProjectContent projectContent = new CSharpProjectContent(); 30 31 public CSharpCodeFoldingStrategy(CodeEditor codeEditor) 32 : base(codeEditor) { 33 codeEditor.InternalAssembliesLoaded += (sender, args) => { 34 projectContent = projectContent.AddAssemblyReferences(args.Value); 35 }; 36 codeEditor.InternalAssembliesUnloaded += (sender, args) => { 37 projectContent = projectContent.RemoveAssemblyReferences(args.Value); 38 }; 39 } 27 public CSharpCodeFoldingStrategy(CodeEditor codeEditor) : base(codeEditor) { } 40 28 41 29 protected override CodeFoldingResult GetCodeFoldingResult(out int firstErrorOffset) { -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs
r11800 r11933 23 23 internal interface ICodeCompletionStrategy { 24 24 void DoCodeCompletion(bool controlSpace); 25 void RunBackgroundParser();25 void Initialize(); 26 26 } 27 27 } -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs
r11800 r11933 63 63 64 64 private void LoadedHandler(object sender, EventArgs e) { 65 codeCompletionStrategy. RunBackgroundParser();65 codeCompletionStrategy.Initialize(); 66 66 } 67 67 -
trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs
r11700 r11933 25 25 : base(codeEditor, new XmlCodeFoldingStrategy(codeEditor), null) { 26 26 } 27 28 public static ILanguageFeatures Apply(CodeEditor codeEditor) { 29 return new XmlLanguageFeatures(codeEditor); 30 } 27 31 } 28 32 }
Note: See TracChangeset
for help on using the changeset viewer.