Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11937 for stable


Ignore:
Timestamp:
02/06/15 12:44:09 (10 years ago)
Author:
jkarder
Message:

#2077: merged r11807:11811, r11816, r11819, r11822, r11825, r11834, r11835, r11836, r11933 and r11936 into stable

Location:
stable
Files:
4 deleted
29 edited
5 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab 3.3.sln

    r11919 r11937  
    2020    {DBFD7205-61AF-40EF-8776-3052DEF91CF3} = {DBFD7205-61AF-40EF-8776-3052DEF91CF3}
    2121    {315BDA09-3F4F-49B3-9790-B37CFC1C5750} = {315BDA09-3F4F-49B3-9790-B37CFC1C5750}
    22     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD} = {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}
    2322    {72104A0B-90E7-42F3-9ABE-9BBBADD4B943} = {72104A0B-90E7-42F3-9ABE-9BBBADD4B943}
    2423    {3081630C-9521-47D7-8075-1777C12F212C} = {3081630C-9521-47D7-8075-1777C12F212C}
     
    108107    {5211F1AD-BBA2-4C62-8749-DCA0A25CF5D8} = {5211F1AD-BBA2-4C62-8749-DCA0A25CF5D8}
    109108    {847A8DAE-DB95-4CEE-B48B-EFEE4531D611} = {847A8DAE-DB95-4CEE-B48B-EFEE4531D611}
     109    {C38691AE-ECB4-489A-A05D-B035554E0168} = {C38691AE-ECB4-489A-A05D-B035554E0168}
    110110    {A2330DB0-413D-4424-B4E6-591118E2B9F8} = {A2330DB0-413D-4424-B4E6-591118E2B9F8}
    111111    {DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA} = {DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}
     
    183183Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Operators.Views.GraphVisualization-3.3", "HeuristicLab.Operators.Views.GraphVisualization\3.3\HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj", "{57F38579-409D-4DD8-AB19-3F2C4A665126}"
    184184EndProject
    185 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.CodeEditor-3.3", "HeuristicLab.CodeEditor\3.3\HeuristicLab.CodeEditor-3.3.csproj", "{489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}"
    186 EndProject
    187185Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Optimization-3.3", "HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj", "{14AB8D24-25BC-400C-A846-4627AA945192}"
    188186EndProject
     
    407405EndProject
    408406Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Analysis.Statistics.Views-3.3", "HeuristicLab.Analysis.Statistics.Views\3.3\HeuristicLab.Analysis.Statistics.Views-3.3.csproj", "{052881B5-4D5D-41C5-9555-FECA01E0BAC8}"
     407EndProject
     408Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.CodeEditor-3.4", "HeuristicLab.CodeEditor\3.4\HeuristicLab.CodeEditor-3.4.csproj", "{C38691AE-ECB4-489A-A05D-B035554E0168}"
    409409EndProject
    410410Global
     
    658658    {57F38579-409D-4DD8-AB19-3F2C4A665126}.Release|x86.ActiveCfg = Release|x86
    659659    {57F38579-409D-4DD8-AB19-3F2C4A665126}.Release|x86.Build.0 = Release|x86
    660     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    661     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
    662     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|x64.ActiveCfg = Debug|x64
    663     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|x64.Build.0 = Debug|x64
    664     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|x86.ActiveCfg = Debug|x86
    665     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|x86.Build.0 = Debug|x86
    666     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
    667     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|Any CPU.Build.0 = Release|Any CPU
    668     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|x64.ActiveCfg = Release|x64
    669     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|x64.Build.0 = Release|x64
    670     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|x86.ActiveCfg = Release|x86
    671     {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|x86.Build.0 = Release|x86
    672660    {14AB8D24-25BC-400C-A846-4627AA945192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    673661    {14AB8D24-25BC-400C-A846-4627AA945192}.Debug|Any CPU.Build.0 = Debug|Any CPU
     
    19741962    {052881B5-4D5D-41C5-9555-FECA01E0BAC8}.Release|x86.ActiveCfg = Release|x86
    19751963    {052881B5-4D5D-41C5-9555-FECA01E0BAC8}.Release|x86.Build.0 = Release|x86
     1964    {C38691AE-ECB4-489A-A05D-B035554E0168}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     1965    {C38691AE-ECB4-489A-A05D-B035554E0168}.Debug|Any CPU.Build.0 = Debug|Any CPU
     1966    {C38691AE-ECB4-489A-A05D-B035554E0168}.Debug|x64.ActiveCfg = Debug|x64
     1967    {C38691AE-ECB4-489A-A05D-B035554E0168}.Debug|x64.Build.0 = Debug|x64
     1968    {C38691AE-ECB4-489A-A05D-B035554E0168}.Debug|x86.ActiveCfg = Debug|x86
     1969    {C38691AE-ECB4-489A-A05D-B035554E0168}.Debug|x86.Build.0 = Debug|x86
     1970    {C38691AE-ECB4-489A-A05D-B035554E0168}.Release|Any CPU.ActiveCfg = Release|Any CPU
     1971    {C38691AE-ECB4-489A-A05D-B035554E0168}.Release|Any CPU.Build.0 = Release|Any CPU
     1972    {C38691AE-ECB4-489A-A05D-B035554E0168}.Release|x64.ActiveCfg = Release|x64
     1973    {C38691AE-ECB4-489A-A05D-B035554E0168}.Release|x64.Build.0 = Release|x64
     1974    {C38691AE-ECB4-489A-A05D-B035554E0168}.Release|x86.ActiveCfg = Release|x86
     1975    {C38691AE-ECB4-489A-A05D-B035554E0168}.Release|x86.Build.0 = Release|x86
    19761976  EndGlobalSection
    19771977  GlobalSection(SolutionProperties) = preSolution
  • stable/HeuristicLab.CodeEditor/3.4/AssemblyLoader.cs

    r11700 r11937  
    7878    private IUnresolvedAssembly Load(Assembly assembly) {
    7979      var loader = new CecilLoader {
    80         IncludeInternalMembers = true,
    8180        DocumentationProvider = GetXmlDocumentation(assembly.Location)
    8281      };
  • stable/HeuristicLab.CodeEditor/3.4/CodeEditor.cs

    r11804 r11937  
    6161
    6262    private AssemblyLoader assemblyLoader;
    63     private ILanguageFeatures languageFeatures;
    6463    private TextMarkerService textMarkerService;
    6564
     
    7978        if (value == null) value = string.Empty;
    8079        if (prefix == value) return;
    81         if (prefixMarker != null) textMarkerService.Remove(prefixMarker);
     80        if (prefixMarker != null) prefixMarker.Delete();
    8281        Doc.Remove(0, prefix.Length);
    8382        prefix = value;
     
    9796        if (value == null) value = string.Empty;
    9897        if (suffix == value) return;
    99         if (suffixMarker != null) textMarkerService.Remove(suffixMarker);
     98        if (suffixMarker != null) suffixMarker.Delete();
    10099        Doc.Remove(Doc.TextLength - suffix.Length, suffix.Length);
    101100        suffix = value;
     
    191190      TextEditor.TextArea.TextView.LineTransformers.Add(textMarkerService);
    192191      TextEditor.TextArea.TextView.Services.AddService(typeof(ITextMarkerService), textMarkerService);
    193 
    194192      #endregion
    195193
     
    244242
    245243      TextEditor.TextChanged += (sender, args) => {
    246         textMarkerService.RemoveAll(x => x != prefixMarker && x != suffixMarker);
     244        foreach (var marker in textMarkerService.TextMarkers) {
     245          if (marker == prefixMarker || marker == suffixMarker) continue;
     246          if (marker.Length != (int)marker.Tag)
     247            marker.Delete();
     248          else {
     249            int caretOffset = TextEditor.CaretOffset;
     250            var line = Doc.GetLineByOffset(marker.StartOffset);
     251            int lineEndOffset = line.EndOffset;
     252            if (caretOffset == lineEndOffset) // special case for markers beyond line length
     253              marker.Delete();
     254          }
     255        }
    247256        OnTextEditorTextChanged();
    248257      };
     
    383392          int offset = line.Offset;
    384393          if (TextUtilities.GetLeadingWhitespace(Doc, line).Length > 0)
    385             offset = TextUtilities.GetNextCaretPosition(Doc, offset, LogicalDirection.Forward, CaretPositioningMode.WordStart);
     394            offset = TextUtilities.GetNextCaretPosition(Doc, offset, LogicalDirection.Forward, CaretPositioningMode.WordBorder);
    386395          TextEditor.CaretOffset = offset;
    387396        }
     
    408417      marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline;
    409418      marker.MarkerColor = error.IsWarning ? WarningColor : ErrorColor;
     419      marker.Tag = segment.Length;
    410420    }
    411421
     
    429439      switch (TextEditorSyntaxHighlighting) {
    430440        case "XML":
    431           languageFeatures = new XmlLanguageFeatures(this);
     441          XmlLanguageFeatures.Apply(this);
    432442          break;
    433443        default:
    434           languageFeatures = new CSharpLanguageFeatures(this);
     444          CSharpLanguageFeatures.Apply(this);
    435445          break;
    436446      }
  • stable/HeuristicLab.CodeEditor/3.4/HeuristicLab.CodeEditor-3.4.csproj

    r11804 r11937  
    156156    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpCodeCompletionContext.cs" />
    157157    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpCodeCompletionDataFactory.cs" />
    158     <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpCodeCompletionHelpers.cs" />
     158    <Compile Include="LanguageFeatures\Helpers\CSharpParsingHelpers.cs" />
    159159    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\EntityCompletionData.cs" />
    160     <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\ImportCompletionData.cs" />
    161160    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\VariableCompletionData.cs" />
    162161    <Compile Include="LanguageFeatures\Interfaces\ICodeFoldingStrategy.cs" />
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs

    r11700 r11937  
    2525      : base(codeEditor, new CSharpCodeFoldingStrategy(codeEditor), new CSharpCodeCompletionStrategy(codeEditor)) {
    2626    }
     27
     28    public static ILanguageFeatures Apply(CodeEditor codeEditor) {
     29      return new CSharpLanguageFeatures(codeEditor);
     30    }
    2731  }
    2832}
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs

    r11800 r11937  
    4646      this.offset = offset;
    4747
    48       var unresolvedFile = CSharpCodeCompletionHelpers.CreateCSharpUnresolvedFile(this.document);
     48      var unresolvedFile = CSharpParsingHelpers.CreateCSharpUnresolvedFile(this.document);
    4949      this.projectContent = projectContent.AddOrUpdateFiles(unresolvedFile);
    5050
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs

    r11722 r11937  
    2525using ICSharpCode.AvalonEdit.CodeCompletion;
    2626using ICSharpCode.NRefactory.Completion;
     27using ICSharpCode.NRefactory.CSharp;
    2728using ICSharpCode.NRefactory.CSharp.Completion;
     29using ICSharpCode.NRefactory.CSharp.Resolver;
    2830using ICSharpCode.NRefactory.TypeSystem;
    2931using ICompletionData = ICSharpCode.NRefactory.Completion.ICompletionData;
     
    103105
    104106    public ICompletionData CreateImportCompletionData(IType type, bool useFullName, bool addForTypeCreation) {
    105       var typeDef = type.GetDefinition();
    106       return new ImportCompletionData(typeDef, context.TypeResolveContextAtCaret, useFullName);
     107      return null;
    107108    }
    108109
     
    121122
    122123    #region IParameterCompletionDataFactory Members
    123     public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type, ICSharpCode.NRefactory.CSharp.AstNode thisInitializer) {
    124       return CreateMethodDataProvider(startOffset, type.GetConstructors());
     124    public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type, AstNode thisInitializer) {
     125      return CreateConstructorProvider(startOffset, type);
    125126    }
    126127
    127128    public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type) {
    128       return CreateMethodDataProvider(startOffset, type.GetConstructors());
     129      var constructors = FilterMethodsForAccessibility(type, type.GetConstructors());
     130      return CreateMethodDataProvider(startOffset, constructors);
    129131    }
    130132
    131133    public IParameterDataProvider CreateDelegateDataProvider(int startOffset, IType type) {
    132       return CreateMethodDataProvider(startOffset, new[] { type.GetDelegateInvokeMethod() });
     134      var delegates = FilterMethodsForAccessibility(type, new[] { type.GetDelegateInvokeMethod() });
     135      return CreateMethodDataProvider(startOffset, delegates);
    133136    }
    134137
     
    138141
    139142    public IParameterDataProvider CreateMethodDataProvider(int startOffset, IEnumerable<IMethod> methods) {
    140       return new CSharpOverloadProvider(context, startOffset, from m in methods where m != null select new CSharpInsightItem(m));
     143      return new CSharpOverloadProvider(context, startOffset, methods.Where(x => x != null).Select(x => new CSharpInsightItem(x)));
    141144    }
    142145
     
    149152    }
    150153    #endregion
     154
     155    private IEnumerable<IMethod> FilterMethodsForAccessibility(IType type, IEnumerable<IMethod> methods) {
     156      var typeResolveContext = context.TypeResolveContextAtCaret;
     157      var lookup = new MemberLookup(typeResolveContext.CurrentTypeDefinition, typeResolveContext.Compilation.MainAssembly);
     158      bool protectedAccessAllowed = lookup.IsProtectedAccessAllowed(type);
     159      return protectedAccessAllowed ? methods : methods.Where(x => !x.IsProtected);
     160    }
    151161  }
    152162}
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs

    r11802 r11937  
    5656        completionContext.ProjectContent,
    5757        completionContext.TypeResolveContextAtCaret
    58       ) { EolMarker = Environment.NewLine };
     58        );
    5959
    6060      char completionChar = completionContext.Document.GetCharAt(completionContext.Offset - 1);
     
    119119      );
    120120
    121       var unresolvedFile = CSharpCodeCompletionHelpers.CreateCSharpUnresolvedFile(document);
     121      var unresolvedFile = CSharpParsingHelpers.CreateCSharpUnresolvedFile(document);
    122122      projectContent = projectContent.AddOrUpdateFiles(unresolvedFile);
    123123    }
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs

    r11700 r11937  
    115115
    116116      int parameterIndex = pce.GetCurrentParameterIndex(startOffset, completionContext.Offset);
    117       if (parameterIndex < 0) {
     117      if (parameterIndex < 0 || !items.Any()) {
    118118        RequestClose = true;
    119119        return;
     
    161161    #endregion
    162162
    163 
    164163    public event PropertyChangedEventHandler PropertyChanged;
    165 
    166164    private void OnPropertyChanged(string propertyName) {
    167165      var args = new PropertyChangedEventArgs(propertyName);
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs

    r11800 r11937  
    4040    }
    4141
    42     public virtual void RunBackgroundParser() {
    43       backgroundParser.Start();
     42    public virtual void Initialize() {
     43      if (backgroundParser.Status == TaskStatus.Created)
     44        backgroundParser.Start();
    4445    }
    4546
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs

    r11700 r11937  
    2525namespace HeuristicLab.CodeEditor {
    2626  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; } }
    2932
    3033    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);
    3836    }
    3937  }
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs

    r11722 r11937  
    2222using System.Linq;
    2323using CSharpBinding.Parser;
    24 using ICSharpCode.NRefactory.CSharp;
    25 using ICSharpCode.NRefactory.TypeSystem;
    2624
    2725namespace HeuristicLab.CodeEditor {
    2826  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) { }
    4028
    4129    protected override CodeFoldingResult GetCodeFoldingResult(out int firstErrorOffset) {
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs

    r11800 r11937  
    2323  internal interface ICodeCompletionStrategy {
    2424    void DoCodeCompletion(bool controlSpace);
    25     void RunBackgroundParser();
     25    void Initialize();
    2626  }
    2727}
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs

    r11800 r11937  
    6363
    6464    private void LoadedHandler(object sender, EventArgs e) {
    65       codeCompletionStrategy.RunBackgroundParser();
     65      codeCompletionStrategy.Initialize();
    6666    }
    6767
  • stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs

    r11700 r11937  
    2525      : base(codeEditor, new XmlCodeFoldingStrategy(codeEditor), null) {
    2626    }
     27
     28    public static ILanguageFeatures Apply(CodeEditor codeEditor) {
     29      return new XmlLanguageFeatures(codeEditor);
     30    }
    2731  }
    2832}
  • stable/HeuristicLab.ExtLibs

  • stable/HeuristicLab.ExtLibs.sln

    r11336 r11937  
    11
    22Microsoft Visual Studio Solution File, Format Version 12.00
    3 # Visual Studio 2012
     3# Visual Studio 2013
     4VisualStudioVersion = 12.0.21005.1
     5MinimumVisualStudioVersion = 10.0.40219.1
    46Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.DayView-1.0", "HeuristicLab.ExtLibs\HeuristicLab.DayView\1.0\HeuristicLab.DayView-1.0.csproj", "{02766ECC-D0F5-4115-9ECA-47409167B638}"
    57EndProject
     
    3537Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoDiff-1.0", "HeuristicLab.ExtLibs\HeuristicLab.AutoDiff\1.0\AutoDiff-1.0\AutoDiff-1.0.csproj", "{62551FD3-C21F-4E16-A7FC-6A017508809C}"
    3638EndProject
    37 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SharpDevelop-3.2.1", "HeuristicLab.ExtLibs\HeuristicLab.SharpDevelop\3.2.1\HeuristicLab.SharpDevelop-3.2.1.csproj", "{8AF3BD99-3C84-4166-9EEA-B1403E20D926}"
    38 EndProject
    3939Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ALGLIB-3.7.0", "HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.7.0\ALGLIB-3.7.0\ALGLIB-3.7.0.csproj", "{AE723DEF-1A44-4F9C-8670-DBCAB79626A2}"
    4040EndProject
     
    5050EndProject
    5151Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.MatlabConnector-1.0", "HeuristicLab.ExtLibs\HeuristicLab.MatlabConnector\1.0\HeuristicLab.MatlabConnector-1.0\HeuristicLab.MatlabConnector-1.0.csproj", "{52C66DEA-0250-477B-97F8-5CD2CD4B7332}"
     52EndProject
     53Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit-5.0.1", "HeuristicLab.ExtLibs\HeuristicLab.AvalonEdit\5.0.1\AvalonEdit-5.0.1\ICSharpCode.AvalonEdit-5.0.1.csproj", "{255C7DEB-3C98-4BC2-92D4-B683F82A7E52}"
     54EndProject
     55Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.AvalonEdit-5.0.1", "HeuristicLab.ExtLibs\HeuristicLab.AvalonEdit\5.0.1\HeuristicLab.AvalonEdit-5.0.1\HeuristicLab.AvalonEdit-5.0.1.csproj", "{644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}"
     56EndProject
     57Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory-5.5.0", "HeuristicLab.ExtLibs\HeuristicLab.NRefactory\5.5.0\NRefactory-5.5.0\ICSharpCode.NRefactory-5.5.0.csproj", "{1022483B-7CF4-4162-827F-984B64EAF8B3}"
     58EndProject
     59Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.NRefactory-5.5.0", "HeuristicLab.ExtLibs\HeuristicLab.NRefactory\5.5.0\HeuristicLab.NRefactory-5.5.0\HeuristicLab.NRefactory-5.5.0.csproj", "{168B628A-3815-4567-8ACF-2878AE92891A}"
     60EndProject
     61Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.Cecil-5.5.0", "HeuristicLab.ExtLibs\HeuristicLab.NRefactory\5.5.0\NRefactory.Cecil-5.5.0\ICSharpCode.NRefactory.Cecil-5.5.0.csproj", "{6661EE06-91D3-489B-AE80-BC951EA65E9A}"
     62EndProject
     63Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.CSharp-5.5.0", "HeuristicLab.ExtLibs\HeuristicLab.NRefactory\5.5.0\NRefactory.CSharp-5.5.0\ICSharpCode.NRefactory.CSharp-5.5.0.csproj", "{C06A9187-4E8E-4129-BDA3-91D2297682D2}"
     64EndProject
     65Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil-0.9.5", "HeuristicLab.ExtLibs\HeuristicLab.Cecil\0.9.5\Mono.Cecil-0.9.5\Mono.Cecil-0.9.5.csproj", "{CCF26BBC-5555-46EC-81F9-5B253CD24170}"
     66EndProject
     67Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Cecil-0.9.5", "HeuristicLab.ExtLibs\HeuristicLab.Cecil\0.9.5\HeuristicLab.Cecil-0.9.5\HeuristicLab.Cecil-0.9.5.csproj", "{03026CEF-4529-4F91-A8A3-761652CE14AD}"
     68EndProject
     69Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.Xml-5.5.0", "HeuristicLab.ExtLibs\HeuristicLab.NRefactory\5.5.0\NRefactory.Xml-5.5.0\ICSharpCode.NRefactory.Xml-5.5.0.csproj", "{C5AE5D30-AE8C-4017-B741-99E084281000}"
    5270EndProject
    5371Global
     
    229247    {62551FD3-C21F-4E16-A7FC-6A017508809C}.Release|x86.ActiveCfg = Release|x86
    230248    {62551FD3-C21F-4E16-A7FC-6A017508809C}.Release|x86.Build.0 = Release|x86
    231     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    232     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|Any CPU.Build.0 = Debug|Any CPU
    233     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|x64.ActiveCfg = Debug|x64
    234     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|x64.Build.0 = Debug|x64
    235     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|x86.ActiveCfg = Debug|x86
    236     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|x86.Build.0 = Debug|x86
    237     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|Any CPU.ActiveCfg = Release|Any CPU
    238     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|Any CPU.Build.0 = Release|Any CPU
    239     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|x64.ActiveCfg = Release|x64
    240     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|x64.Build.0 = Release|x64
    241     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|x86.ActiveCfg = Release|x86
    242     {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|x86.Build.0 = Release|x86
    243249    {AE723DEF-1A44-4F9C-8670-DBCAB79626A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    244250    {AE723DEF-1A44-4F9C-8670-DBCAB79626A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
     
    325331    {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x86.ActiveCfg = Release|x86
    326332    {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x86.Build.0 = Release|x86
     333    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     334    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Debug|Any CPU.Build.0 = Debug|Any CPU
     335    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Debug|x64.ActiveCfg = Debug|x64
     336    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Debug|x64.Build.0 = Debug|x64
     337    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Debug|x86.ActiveCfg = Debug|x86
     338    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Debug|x86.Build.0 = Debug|x86
     339    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Release|Any CPU.ActiveCfg = Release|Any CPU
     340    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Release|Any CPU.Build.0 = Release|Any CPU
     341    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Release|x64.ActiveCfg = Release|x64
     342    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Release|x64.Build.0 = Release|x64
     343    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Release|x86.ActiveCfg = Release|x86
     344    {255C7DEB-3C98-4BC2-92D4-B683F82A7E52}.Release|x86.Build.0 = Release|x86
     345    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     346    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Debug|Any CPU.Build.0 = Debug|Any CPU
     347    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Debug|x64.ActiveCfg = Debug|x64
     348    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Debug|x64.Build.0 = Debug|x64
     349    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Debug|x86.ActiveCfg = Debug|x86
     350    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Debug|x86.Build.0 = Debug|x86
     351    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Release|Any CPU.ActiveCfg = Release|Any CPU
     352    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Release|Any CPU.Build.0 = Release|Any CPU
     353    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Release|x64.ActiveCfg = Release|x64
     354    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Release|x64.Build.0 = Release|x64
     355    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Release|x86.ActiveCfg = Release|x86
     356    {644B1CCE-1B2A-4C61-B0E3-A2EDB89DF872}.Release|x86.Build.0 = Release|x86
     357    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     358    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
     359    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Debug|x64.ActiveCfg = Debug|x64
     360    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Debug|x64.Build.0 = Debug|x64
     361    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Debug|x86.ActiveCfg = Debug|x86
     362    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Debug|x86.Build.0 = Debug|x86
     363    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
     364    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Release|Any CPU.Build.0 = Release|Any CPU
     365    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Release|x64.ActiveCfg = Release|x64
     366    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Release|x64.Build.0 = Release|x64
     367    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Release|x86.ActiveCfg = Release|x86
     368    {1022483B-7CF4-4162-827F-984B64EAF8B3}.Release|x86.Build.0 = Release|x86
     369    {168B628A-3815-4567-8ACF-2878AE92891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     370    {168B628A-3815-4567-8ACF-2878AE92891A}.Debug|Any CPU.Build.0 = Debug|Any CPU
     371    {168B628A-3815-4567-8ACF-2878AE92891A}.Debug|x64.ActiveCfg = Debug|x64
     372    {168B628A-3815-4567-8ACF-2878AE92891A}.Debug|x64.Build.0 = Debug|x64
     373    {168B628A-3815-4567-8ACF-2878AE92891A}.Debug|x86.ActiveCfg = Debug|x86
     374    {168B628A-3815-4567-8ACF-2878AE92891A}.Debug|x86.Build.0 = Debug|x86
     375    {168B628A-3815-4567-8ACF-2878AE92891A}.Release|Any CPU.ActiveCfg = Release|Any CPU
     376    {168B628A-3815-4567-8ACF-2878AE92891A}.Release|Any CPU.Build.0 = Release|Any CPU
     377    {168B628A-3815-4567-8ACF-2878AE92891A}.Release|x64.ActiveCfg = Release|x64
     378    {168B628A-3815-4567-8ACF-2878AE92891A}.Release|x64.Build.0 = Release|x64
     379    {168B628A-3815-4567-8ACF-2878AE92891A}.Release|x86.ActiveCfg = Release|x86
     380    {168B628A-3815-4567-8ACF-2878AE92891A}.Release|x86.Build.0 = Release|x86
     381    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     382    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
     383    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Debug|x64.ActiveCfg = Debug|x64
     384    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Debug|x64.Build.0 = Debug|x64
     385    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Debug|x86.ActiveCfg = Debug|x86
     386    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Debug|x86.Build.0 = Debug|x86
     387    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
     388    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Release|Any CPU.Build.0 = Release|Any CPU
     389    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Release|x64.ActiveCfg = Release|x64
     390    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Release|x64.Build.0 = Release|x64
     391    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Release|x86.ActiveCfg = Release|x86
     392    {6661EE06-91D3-489B-AE80-BC951EA65E9A}.Release|x86.Build.0 = Release|x86
     393    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     394    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
     395    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Debug|x64.ActiveCfg = Debug|x64
     396    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Debug|x64.Build.0 = Debug|x64
     397    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Debug|x86.ActiveCfg = Debug|x86
     398    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Debug|x86.Build.0 = Debug|x86
     399    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
     400    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Release|Any CPU.Build.0 = Release|Any CPU
     401    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Release|x64.ActiveCfg = Release|x64
     402    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Release|x64.Build.0 = Release|x64
     403    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Release|x86.ActiveCfg = Release|x86
     404    {C06A9187-4E8E-4129-BDA3-91D2297682D2}.Release|x86.Build.0 = Release|x86
     405    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     406    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Debug|Any CPU.Build.0 = Debug|Any CPU
     407    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Debug|x64.ActiveCfg = Debug|x64
     408    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Debug|x64.Build.0 = Debug|x64
     409    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Debug|x86.ActiveCfg = Debug|x86
     410    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Debug|x86.Build.0 = Debug|x86
     411    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Release|Any CPU.ActiveCfg = Release|Any CPU
     412    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Release|Any CPU.Build.0 = Release|Any CPU
     413    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Release|x64.ActiveCfg = Release|x64
     414    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Release|x64.Build.0 = Release|x64
     415    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Release|x86.ActiveCfg = Release|x86
     416    {CCF26BBC-5555-46EC-81F9-5B253CD24170}.Release|x86.Build.0 = Release|x86
     417    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     418    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
     419    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Debug|x64.ActiveCfg = Debug|x64
     420    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Debug|x64.Build.0 = Debug|x64
     421    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Debug|x86.ActiveCfg = Debug|x86
     422    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Debug|x86.Build.0 = Debug|x86
     423    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
     424    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Release|Any CPU.Build.0 = Release|Any CPU
     425    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Release|x64.ActiveCfg = Release|x64
     426    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Release|x64.Build.0 = Release|x64
     427    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Release|x86.ActiveCfg = Release|x86
     428    {03026CEF-4529-4F91-A8A3-761652CE14AD}.Release|x86.Build.0 = Release|x86
     429    {C5AE5D30-AE8C-4017-B741-99E084281000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     430    {C5AE5D30-AE8C-4017-B741-99E084281000}.Debug|Any CPU.Build.0 = Debug|Any CPU
     431    {C5AE5D30-AE8C-4017-B741-99E084281000}.Debug|x64.ActiveCfg = Debug|x64
     432    {C5AE5D30-AE8C-4017-B741-99E084281000}.Debug|x64.Build.0 = Debug|x64
     433    {C5AE5D30-AE8C-4017-B741-99E084281000}.Debug|x86.ActiveCfg = Debug|x86
     434    {C5AE5D30-AE8C-4017-B741-99E084281000}.Debug|x86.Build.0 = Debug|x86
     435    {C5AE5D30-AE8C-4017-B741-99E084281000}.Release|Any CPU.ActiveCfg = Release|Any CPU
     436    {C5AE5D30-AE8C-4017-B741-99E084281000}.Release|Any CPU.Build.0 = Release|Any CPU
     437    {C5AE5D30-AE8C-4017-B741-99E084281000}.Release|x64.ActiveCfg = Release|x64
     438    {C5AE5D30-AE8C-4017-B741-99E084281000}.Release|x64.Build.0 = Release|x64
     439    {C5AE5D30-AE8C-4017-B741-99E084281000}.Release|x86.ActiveCfg = Release|x86
     440    {C5AE5D30-AE8C-4017-B741-99E084281000}.Release|x86.Build.0 = Release|x86
    327441  EndGlobalSection
    328442  GlobalSection(SolutionProperties) = preSolution
  • stable/HeuristicLab.Operators.Programmable.Views/3.3/HeuristicLab.Operators.Programmable.Views-3.3.csproj

    r11920 r11937  
    128128  </ItemGroup>
    129129  <ItemGroup>
    130     <ProjectReference Include="..\..\HeuristicLab.CodeEditor\3.3\HeuristicLab.CodeEditor-3.3.csproj">
    131       <Project>{489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}</Project>
    132       <Name>HeuristicLab.CodeEditor-3.3</Name>
     130    <ProjectReference Include="..\..\HeuristicLab.CodeEditor\3.4\HeuristicLab.CodeEditor-3.4.csproj">
     131      <Project>{C38691AE-ECB4-489A-A05D-B035554E0168}</Project>
     132      <Name>HeuristicLab.CodeEditor-3.4</Name>
    133133      <Private>False</Private>
    134134    </ProjectReference>
  • stable/HeuristicLab.Operators.Programmable.Views/3.3/Plugin.cs.frame

    r11173 r11937  
    2828  [Plugin("HeuristicLab.Operators.Programmable.Views", "3.3.10.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Operators.Programmable.Views-3.3.dll", PluginFileType.Assembly)]
    30   [PluginDependency("HeuristicLab.CodeEditor", "3.3")]
     30  [PluginDependency("HeuristicLab.CodeEditor", "3.4")]
    3131  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    3232  [PluginDependency("HeuristicLab.Core", "3.3")]
  • stable/HeuristicLab.Operators.Programmable.Views/3.3/ProgrammableOperatorView.cs

    r11170 r11937  
    8282      base.OnContentChanged();
    8383      if (ProgrammableOperator == null) {
    84         codeEditor.UserCode = "";
     84        codeEditor.UserCode = string.Empty;
    8585        assembliesTreeView.Nodes.Clear();
    8686        parameterCollectionView.Content = null;
    8787      } else {
    8888        codeEditor.Prefix = GetGeneratedPrefix();
    89         codeEditor.Suffix = String.Format("    {0}\n  }}\n}}", ProgrammableOperator.MethodSuffix);
     89        codeEditor.Suffix = String.Format("    {0}{1}  }}{1}}}", ProgrammableOperator.MethodSuffix, Environment.NewLine);
    9090        codeEditor.UserCode = ProgrammableOperator.Code;
    91         if (codeEditor.UserCode == "")
    92           codeEditor.UserCode = "    \n    \n    \n    \n";
     91        if (codeEditor.UserCode == string.Empty)
     92          codeEditor.UserCode = string.Format("    {0}", Environment.NewLine);
    9393        InitializeAssemblyList();
    9494        InitializeNamespacesList();
    95         foreach (var a in ProgrammableOperator.SelectedAssemblies) {
    96           codeEditor.AddAssembly(a);
    97         }
     95        codeEditor.AddAssemblies(ProgrammableOperator.SelectedAssemblies);
    9896        codeEditor.ScrollAfterPrefix();
    99         codeEditor.ShowCompileErrors(ProgrammableOperator.CompileErrors, "ProgrammableOperator");
    100         showCodeButton.Enabled =
    101           ProgrammableOperator.CompilationUnitCode != null &&
    102           ProgrammableOperator.CompilationUnitCode.Length > 0;
     97        codeEditor.ShowCompileErrors(ProgrammableOperator.CompileErrors);
     98        showCodeButton.Enabled = !string.IsNullOrEmpty(ProgrammableOperator.CompilationUnitCode);
    10399        parameterCollectionView.Content = ProgrammableOperator.Parameters;
    104100        if (ProgrammableOperator.CompileErrors == null) {
  • stable/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs

    r11907 r11937  
    2121
    2222using System;
     23using System.Drawing;
     24using System.Threading;
    2325using System.Windows.Forms;
    2426using HeuristicLab.Common;
     
    3133  [Content(typeof(CSharpScript), true)]
    3234  public partial class CSharpScriptView : ScriptView {
     35    private const string ScriptExecutionStartedMessage = "Script execution started";
     36    private const string ScriptExecutionCanceledMessage = "Script execution canceled";
     37    private const string ScriptExecutionSuccessfulMessage = "Script execution successful";
     38    private const string ScriptExecutionFailedMessage = "Script execution failed";
     39
    3340    protected bool Running { get; set; }
    3441
     
    6572        startStopButton.Image = VSImageLibrary.Stop;
    6673        toolTip.SetToolTip(startStopButton, "Stop (Shift+F5)");
     74        UpdateInfoTextLabel(ScriptExecutionStartedMessage, SystemColors.ControlText);
    6775        infoTabControl.SelectedTab = outputTabPage;
    6876      }
     
    7684        startStopButton.Image = VSImageLibrary.Play;
    7785        toolTip.SetToolTip(startStopButton, "Run (F5)");
     86
     87        var ex = e.Value;
     88        if (ex == null) {
     89          UpdateInfoTextLabel(ScriptExecutionSuccessfulMessage, Color.DarkGreen);
     90        } else if (ex is ThreadAbortException) {
     91          // the execution was canceled by the user
     92          UpdateInfoTextLabel(ScriptExecutionCanceledMessage, Color.DarkOrange);
     93        } else {
     94          UpdateInfoTextLabel(ScriptExecutionFailedMessage, Color.DarkRed);
     95          PluginInfrastructure.ErrorHandling.ShowErrorDialog(this, ex);
     96        }
     97
    7898        Running = false;
    79         var ex = e.Value;
    80         if (ex != null)
    81           PluginInfrastructure.ErrorHandling.ShowErrorDialog(this, ex);
    8299      }
    83100    }
     
    111128        if (Compile()) {
    112129          outputTextBox.Clear();
     130          Running = true;
    113131          Content.ExecuteAsync();
    114           Running = true;
    115132        }
    116133    }
  • stable/HeuristicLab.Scripting.Views/3.3/HeuristicLab.Scripting.Views-3.3.csproj

    r11920 r11937  
    118118  </ItemGroup>
    119119  <ItemGroup>
    120     <ProjectReference Include="..\..\HeuristicLab.CodeEditor\3.3\HeuristicLab.CodeEditor-3.3.csproj">
    121       <Project>{489cfe09-fdf7-4c89-bab5-bd09cadd61ad}</Project>
    122       <Name>HeuristicLab.CodeEditor-3.3</Name>
    123       <Private>False</Private>
     120    <ProjectReference Include="..\..\HeuristicLab.CodeEditor\3.4\HeuristicLab.CodeEditor-3.4.csproj">
     121      <Project>{c38691ae-ecb4-489a-a05d-b035554e0168}</Project>
     122      <Name>HeuristicLab.CodeEditor-3.4</Name>
    124123    </ProjectReference>
    125124    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
  • stable/HeuristicLab.Scripting.Views/3.3/Plugin.cs.frame

    r11173 r11937  
    2525  [Plugin("HeuristicLab.Scripting.Views", "3.3.10.$WCREV$")]
    2626  [PluginFile("HeuristicLab.Scripting.Views-3.3.dll", PluginFileType.Assembly)]
    27   [PluginDependency("HeuristicLab.CodeEditor", "3.3")]
     27  [PluginDependency("HeuristicLab.CodeEditor", "3.4")]
    2828  [PluginDependency("HeuristicLab.Collections", "3.3")]
    2929  [PluginDependency("HeuristicLab.Common", "3.3")]
  • stable/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs

    r11907 r11937  
    1919 */
    2020#endregion
     21
     22using System.Collections.Generic;
     23using System.Reflection;
     24using HeuristicLab.Common;
    2125
    2226namespace HeuristicLab.Scripting.Views {
     
    4650    private void InitializeComponent() {
    4751      this.components = new System.ComponentModel.Container();
    48       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScriptView));
    49       this.compilationLabel = new System.Windows.Forms.Label();
     52      this.infoTextLabel = new System.Windows.Forms.Label();
    5053      this.imageList = new System.Windows.Forms.ImageList(this.components);
    5154      this.compileButton = new System.Windows.Forms.Button();
     
    8487      this.infoLabel.Location = new System.Drawing.Point(816, 4);
    8588      //
    86       // compilationLabel
    87       //
    88       this.compilationLabel.AutoSize = true;
    89       this.compilationLabel.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
    90       this.compilationLabel.Location = new System.Drawing.Point(66, 32);
    91       this.compilationLabel.Name = "compilationLabel";
    92       this.compilationLabel.Size = new System.Drawing.Size(69, 13);
    93       this.compilationLabel.TabIndex = 3;
    94       this.compilationLabel.Text = "Not compiled";
     89      // infoTextLabel
     90      //
     91      this.infoTextLabel.AutoSize = true;
     92      this.infoTextLabel.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
     93      this.infoTextLabel.Location = new System.Drawing.Point(66, 32);
     94      this.infoTextLabel.Name = "infoTextLabel";
     95      this.infoTextLabel.Size = new System.Drawing.Size(69, 13);
     96      this.infoTextLabel.TabIndex = 3;
     97      this.infoTextLabel.Text = "Not compiled";
    9598      //
    9699      // imageList
     
    215218      this.codeEditor.UserCode = "";
    216219      this.codeEditor.TextEditorTextChanged += new System.EventHandler(this.codeEditor_TextEditorTextChanged);
     220      this.codeEditor.AssembliesLoading += new System.EventHandler<HeuristicLab.Common.EventArgs<System.Collections.Generic.IEnumerable<System.Reflection.Assembly>>>(this.codeEditor_AssembliesLoading);
     221      this.codeEditor.AssembliesLoaded += new System.EventHandler<HeuristicLab.Common.EventArgs<System.Collections.Generic.IEnumerable<System.Reflection.Assembly>>>(this.codeEditor_AssembliesLoaded);
     222      this.codeEditor.AssembliesUnloading += new System.EventHandler<HeuristicLab.Common.EventArgs<System.Collections.Generic.IEnumerable<System.Reflection.Assembly>>>(this.codeEditor_AssembliesUnloading);
     223      this.codeEditor.AssembliesUnloaded += new System.EventHandler<HeuristicLab.Common.EventArgs<System.Collections.Generic.IEnumerable<System.Reflection.Assembly>>>(this.codeEditor_AssembliesUnloaded);
    217224      //
    218225      // splitContainer1
     
    241248      this.Controls.Add(this.splitContainer1);
    242249      this.Controls.Add(this.compileButton);
    243       this.Controls.Add(this.compilationLabel);
     250      this.Controls.Add(this.infoTextLabel);
    244251      this.Name = "ScriptView";
    245252      this.Size = new System.Drawing.Size(835, 602);
    246       this.Controls.SetChildIndex(this.compilationLabel, 0);
     253      this.Controls.SetChildIndex(this.infoTextLabel, 0);
    247254      this.Controls.SetChildIndex(this.compileButton, 0);
    248255      this.Controls.SetChildIndex(this.splitContainer1, 0);
     
    266273    #endregion
    267274
    268     protected System.Windows.Forms.Label compilationLabel;
     275    protected System.Windows.Forms.Label infoTextLabel;
    269276    protected System.Windows.Forms.Button compileButton;
    270277    protected System.Windows.Forms.ImageList imageList;
  • stable/HeuristicLab.Scripting.Views/3.3/ScriptView.cs

    r11908 r11937  
    2222using System;
    2323using System.CodeDom.Compiler;
     24using System.Collections.Generic;
    2425using System.Drawing;
    2526using System.Globalization;
    2627using System.Linq;
     28using System.Reflection;
    2729using System.Windows.Forms;
     30using HeuristicLab.Common;
    2831using HeuristicLab.Common.Resources;
    2932using HeuristicLab.Core.Views;
     
    3538  [Content(typeof(Script), true)]
    3639  public partial class ScriptView : NamedItemView {
     40    private const string NotCompiledMessage = "Not compiled";
     41    private const string CompilationSucceededMessage = "Compilation succeeded";
     42    private const string CompilationFailedMessage = "Compilation failed";
     43    private const string AssembliesLoadingMessage = "Loading Assemblies";
     44    private const string AssembliesUnloadingMessage = "Unloading Assemblies";
     45    private const int SilentAssemblyLoadingOperationLimit = 10;
     46
    3747    #region Properties
    3848    public new Script Content {
     
    7383        codeEditor.UserCode = string.Empty;
    7484      } else {
    75         if (codeEditor.UserCode != Content.Code)
    76           codeEditor.UserCode = Content.Code;
    77         foreach (var asm in Content.GetAssemblies())
    78           codeEditor.AddAssembly(asm);
     85        codeEditor.UserCode = Content.Code;
     86        codeEditor.AddAssembliesAsync(Content.GetAssemblies());
    7987        if (Content.CompileErrors == null) {
    80           compilationLabel.ForeColor = SystemColors.ControlDarkDark;
    81           compilationLabel.Text = "Not compiled";
    82         } else if (Content.CompileErrors.HasErrors) {
    83           compilationLabel.ForeColor = Color.DarkRed;
    84           compilationLabel.Text = "Compilation failed";
    85         } else {
    86           compilationLabel.ForeColor = Color.DarkGreen;
    87           compilationLabel.Text = "Compilation successful";
     88          UpdateInfoTextLabel(NotCompiledMessage, SystemColors.ControlText);
    8889        }
    8990      }
     
    114115      try {
    115116        Content.Compile();
    116         outputTextBox.AppendText("Compilation succeeded.");
     117        outputTextBox.AppendText(CompilationSucceededMessage);
     118        UpdateInfoTextLabel(CompilationSucceededMessage, Color.DarkGreen);
    117119        return true;
    118120      } catch (CompilationException) {
    119121        if (Content.CompileErrors.HasErrors) {
    120           outputTextBox.AppendText("Compilation failed.");
     122          outputTextBox.AppendText(CompilationFailedMessage);
     123          UpdateInfoTextLabel(CompilationFailedMessage, Color.DarkRed);
    121124          return false;
    122125        } else {
    123           outputTextBox.AppendText("Compilation succeeded.");
     126          outputTextBox.AppendText(CompilationSucceededMessage);
     127          UpdateInfoTextLabel(CompilationSucceededMessage, Color.DarkGreen);
    124128          return true;
    125129        }
     
    131135        Locked = false;
    132136        codeEditor.Focus();
    133         OnContentChanged();
    134137      }
    135138    }
     
    137140    #region Helpers
    138141    protected virtual void ShowCompilationResults() {
    139       if (Content.CompileErrors.Count == 0) return;
    140 
    141142      var messages = Content.CompileErrors.OfType<CompilerError>()
    142143                                      .OrderBy(x => x.IsWarning)
     
    157158      }
    158159
    159       codeEditor.ShowCompileErrors(Content.CompileErrors, ".cs");
     160      codeEditor.ShowCompileErrors(Content.CompileErrors);
    160161
    161162      AdjustErrorListViewColumnSizes();
     163    }
     164
     165    protected virtual void UpdateInfoTextLabel(string message, Color color) {
     166      infoTextLabel.Text = message;
     167      infoTextLabel.ForeColor = color;
    162168    }
    163169
     
    167173        ch.Width = -2;
    168174    }
     175
     176    #region ProgressView
     177    private bool progressViewCreated;
     178
     179    private void AddProgressView(string progressMessage) {
     180      var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>();
     181      mainForm.AddOperationProgressToView(this, progressMessage);
     182      progressViewCreated = true;
     183    }
     184
     185    private void RemoveProgressView() {
     186      if (!progressViewCreated) return;
     187      var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>();
     188      mainForm.RemoveOperationProgressFromView(this);
     189      progressViewCreated = false;
     190    }
     191    #endregion
    169192    #endregion
    170193
    171194    #region Event Handlers
    172195    private void Content_CodeChanged(object sender, EventArgs e) {
    173       if (InvokeRequired)
    174         Invoke(new EventHandler(Content_CodeChanged), sender, e);
     196      if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_CodeChanged, sender, e);
    175197      else {
    176198        codeEditor.UserCode = Content.Code;
     
    196218    }
    197219    #endregion
     220
     221    private void codeEditor_AssembliesLoading(object sender, EventArgs<IEnumerable<Assembly>> e) {
     222      if (InvokeRequired) Invoke((Action<object, EventArgs<IEnumerable<Assembly>>>)codeEditor_AssembliesLoading, sender, e);
     223      else {
     224        int nrOfAssemblies = e.Value.Count();
     225        if (nrOfAssemblies > SilentAssemblyLoadingOperationLimit)
     226          AddProgressView(AssembliesLoadingMessage);
     227      }
     228    }
     229
     230    private void codeEditor_AssembliesLoaded(object sender, EventArgs<IEnumerable<Assembly>> e) {
     231      if (InvokeRequired) Invoke((Action<object, EventArgs<IEnumerable<Assembly>>>)codeEditor_AssembliesLoaded, sender, e);
     232      else {
     233        RemoveProgressView();
     234      }
     235    }
     236
     237    private void codeEditor_AssembliesUnloading(object sender, EventArgs<IEnumerable<Assembly>> e) {
     238      if (InvokeRequired) Invoke((Action<object, EventArgs<IEnumerable<Assembly>>>)codeEditor_AssembliesUnloading, sender, e);
     239      else {
     240        int nrOfAssemblies = e.Value.Count();
     241        if (nrOfAssemblies > SilentAssemblyLoadingOperationLimit)
     242          AddProgressView(AssembliesUnloadingMessage);
     243      }
     244    }
     245
     246    private void codeEditor_AssembliesUnloaded(object sender, EventArgs<IEnumerable<Assembly>> e) {
     247      if (InvokeRequired) Invoke((Action<object, EventArgs<IEnumerable<Assembly>>>)codeEditor_AssembliesUnloaded, sender, e);
     248      else {
     249        RemoveProgressView();
     250      }
     251    }
    198252  }
    199253}
  • stable/HeuristicLab.Scripting/3.3/Scripts/CSharp/CSharpScript.cs

    r11787 r11937  
    102102          OnScriptExecutionStarted();
    103103          compiledScript.Execute(VariableStore);
    104         } catch (ThreadAbortException) {
    105           // the execution was cancelled by the user
    106104        } catch (Exception e) {
    107105          ex = e;
    108106        } finally {
     107          scriptThread = null;
    109108          OnScriptExecutionFinished(ex);
    110109        }
     
    115114
    116115    public virtual void Kill() {
    117       if (scriptThread.IsAlive)
    118         scriptThread.Abort();
     116      if (scriptThread == null) return;
     117      scriptThread.Abort();
    119118    }
    120119
  • stable/HeuristicLab.Scripting/3.3/Scripts/Templates/CSharpScriptTemplate.cs

    r11787 r11937  
    11// use 'vars' to access variables in the script's variable store (e.g. vars.x = 5)
    2 // use 'vars[string]' to access variables via runtime strings (e.g. vars[""x""] = 5)
     2// use 'vars[string]' to access variables via runtime strings (e.g. vars["x"] = 5)
    33// use 'vars.Contains(string)' to check if a variable exists
    44// use 'vars.Clear()' to remove all variables
  • stable/HeuristicLab.Scripting/3.3/Variables.cs

    r11154 r11937  
    66  public class Variables : DynamicObject, IEnumerable<KeyValuePair<string, object>> {
    77    private readonly VariableStore variableStore;
     8
     9    public IEnumerable<string> Keys {
     10      get { return variableStore.Keys; }
     11    }
     12
     13    public IEnumerable<object> Values {
     14      get { return variableStore.Values; }
     15    }
    816
    917    public Variables(VariableStore variableStore) {
Note: See TracChangeset for help on using the changeset viewer.