Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11738


Ignore:
Timestamp:
01/07/15 17:20:05 (10 years ago)
Author:
jkarder
Message:

#2077:

  • set CodeEditor.AutoScaleMode to AutoScaleMode.Inherit
  • only generate overload information if completion data is available
Location:
branches/CodeEditor/HeuristicLab.CodeEditor/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/CodeEditor/HeuristicLab.CodeEditor/3.4/CodeEditor.Designer.cs

    r11700 r11738  
    3939      // CodeEditor
    4040      //
    41       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    42       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     41      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    4342      this.Controls.Add(this.elementHost);
    4443      this.Name = "CodeEditor";
  • branches/CodeEditor/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs

    r11700 r11738  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425using ICSharpCode.NRefactory.Completion;
    2526using ICSharpCode.NRefactory.CSharp;
     
    8283      result.TriggerWord = completionContext.Document.GetText(completionContext.Offset - triggerWordLength, triggerWordLength);
    8384
    84       foreach (var completion in completionData) {
    85         var cast = completion as CompletionData;
    86         if (cast != null) {
    87           cast.TriggerWord = result.TriggerWord;
    88           cast.TriggerWordLength = result.TriggerWordLength;
    89           result.CompletionData.Add(cast);
     85      if (completionData.Any()) {
     86        foreach (var completion in completionData) {
     87          var cast = completion as CompletionData;
     88          if (cast != null) {
     89            cast.TriggerWord = result.TriggerWord;
     90            cast.TriggerWordLength = result.TriggerWordLength;
     91            result.CompletionData.Add(cast);
     92          }
    9093        }
    91       }
    9294
    93       if (!controlSpace) {
    94         var pce = new CSharpParameterCompletionEngine(
    95           completionContext.Document,
    96           completionContext.CompletionContextProvider,
    97           completionFactory,
    98           completionContext.ProjectContent,
    99           completionContext.TypeResolveContextAtCaret
    100         );
     95        if (!controlSpace) {
     96          var pce = new CSharpParameterCompletionEngine(
     97            completionContext.Document,
     98            completionContext.CompletionContextProvider,
     99            completionFactory,
     100            completionContext.ProjectContent,
     101            completionContext.TypeResolveContextAtCaret
     102          );
    101103
    102         var parameterDataProvider = pce.GetParameterDataProvider(completionContext.Offset, completionChar);
    103         result.OverloadProvider = parameterDataProvider as IUpdatableOverloadProvider;
     104          var parameterDataProvider = pce.GetParameterDataProvider(completionContext.Offset, completionChar);
     105          result.OverloadProvider = parameterDataProvider as IUpdatableOverloadProvider;
     106        }
    104107      }
    105108
Note: See TracChangeset for help on using the changeset viewer.