- Timestamp:
- 02/06/15 12:44:09 (10 years ago)
- Location:
- stable
- Files:
-
- 4 deleted
- 29 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
-
stable/HeuristicLab 3.3.sln
r11919 r11937 20 20 {DBFD7205-61AF-40EF-8776-3052DEF91CF3} = {DBFD7205-61AF-40EF-8776-3052DEF91CF3} 21 21 {315BDA09-3F4F-49B3-9790-B37CFC1C5750} = {315BDA09-3F4F-49B3-9790-B37CFC1C5750} 22 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD} = {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}23 22 {72104A0B-90E7-42F3-9ABE-9BBBADD4B943} = {72104A0B-90E7-42F3-9ABE-9BBBADD4B943} 24 23 {3081630C-9521-47D7-8075-1777C12F212C} = {3081630C-9521-47D7-8075-1777C12F212C} … … 108 107 {5211F1AD-BBA2-4C62-8749-DCA0A25CF5D8} = {5211F1AD-BBA2-4C62-8749-DCA0A25CF5D8} 109 108 {847A8DAE-DB95-4CEE-B48B-EFEE4531D611} = {847A8DAE-DB95-4CEE-B48B-EFEE4531D611} 109 {C38691AE-ECB4-489A-A05D-B035554E0168} = {C38691AE-ECB4-489A-A05D-B035554E0168} 110 110 {A2330DB0-413D-4424-B4E6-591118E2B9F8} = {A2330DB0-413D-4424-B4E6-591118E2B9F8} 111 111 {DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA} = {DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA} … … 183 183 Project("{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}" 184 184 EndProject 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 EndProject187 185 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Optimization-3.3", "HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj", "{14AB8D24-25BC-400C-A846-4627AA945192}" 188 186 EndProject … … 407 405 EndProject 408 406 Project("{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}" 407 EndProject 408 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.CodeEditor-3.4", "HeuristicLab.CodeEditor\3.4\HeuristicLab.CodeEditor-3.4.csproj", "{C38691AE-ECB4-489A-A05D-B035554E0168}" 409 409 EndProject 410 410 Global … … 658 658 {57F38579-409D-4DD8-AB19-3F2C4A665126}.Release|x86.ActiveCfg = Release|x86 659 659 {57F38579-409D-4DD8-AB19-3F2C4A665126}.Release|x86.Build.0 = Release|x86 660 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU661 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|Any CPU.Build.0 = Debug|Any CPU662 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|x64.ActiveCfg = Debug|x64663 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|x64.Build.0 = Debug|x64664 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|x86.ActiveCfg = Debug|x86665 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Debug|x86.Build.0 = Debug|x86666 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|Any CPU.ActiveCfg = Release|Any CPU667 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|Any CPU.Build.0 = Release|Any CPU668 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|x64.ActiveCfg = Release|x64669 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|x64.Build.0 = Release|x64670 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|x86.ActiveCfg = Release|x86671 {489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}.Release|x86.Build.0 = Release|x86672 660 {14AB8D24-25BC-400C-A846-4627AA945192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 673 661 {14AB8D24-25BC-400C-A846-4627AA945192}.Debug|Any CPU.Build.0 = Debug|Any CPU … … 1974 1962 {052881B5-4D5D-41C5-9555-FECA01E0BAC8}.Release|x86.ActiveCfg = Release|x86 1975 1963 {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 1976 1976 EndGlobalSection 1977 1977 GlobalSection(SolutionProperties) = preSolution -
stable/HeuristicLab.CodeEditor/3.4/AssemblyLoader.cs
r11700 r11937 78 78 private IUnresolvedAssembly Load(Assembly assembly) { 79 79 var loader = new CecilLoader { 80 IncludeInternalMembers = true,81 80 DocumentationProvider = GetXmlDocumentation(assembly.Location) 82 81 }; -
stable/HeuristicLab.CodeEditor/3.4/CodeEditor.cs
r11804 r11937 61 61 62 62 private AssemblyLoader assemblyLoader; 63 private ILanguageFeatures languageFeatures;64 63 private TextMarkerService textMarkerService; 65 64 … … 79 78 if (value == null) value = string.Empty; 80 79 if (prefix == value) return; 81 if (prefixMarker != null) textMarkerService.Remove(prefixMarker);80 if (prefixMarker != null) prefixMarker.Delete(); 82 81 Doc.Remove(0, prefix.Length); 83 82 prefix = value; … … 97 96 if (value == null) value = string.Empty; 98 97 if (suffix == value) return; 99 if (suffixMarker != null) textMarkerService.Remove(suffixMarker);98 if (suffixMarker != null) suffixMarker.Delete(); 100 99 Doc.Remove(Doc.TextLength - suffix.Length, suffix.Length); 101 100 suffix = value; … … 191 190 TextEditor.TextArea.TextView.LineTransformers.Add(textMarkerService); 192 191 TextEditor.TextArea.TextView.Services.AddService(typeof(ITextMarkerService), textMarkerService); 193 194 192 #endregion 195 193 … … 244 242 245 243 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 } 247 256 OnTextEditorTextChanged(); 248 257 }; … … 383 392 int offset = line.Offset; 384 393 if (TextUtilities.GetLeadingWhitespace(Doc, line).Length > 0) 385 offset = TextUtilities.GetNextCaretPosition(Doc, offset, LogicalDirection.Forward, CaretPositioningMode.Word Start);394 offset = TextUtilities.GetNextCaretPosition(Doc, offset, LogicalDirection.Forward, CaretPositioningMode.WordBorder); 386 395 TextEditor.CaretOffset = offset; 387 396 } … … 408 417 marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline; 409 418 marker.MarkerColor = error.IsWarning ? WarningColor : ErrorColor; 419 marker.Tag = segment.Length; 410 420 } 411 421 … … 429 439 switch (TextEditorSyntaxHighlighting) { 430 440 case "XML": 431 languageFeatures = new XmlLanguageFeatures(this);441 XmlLanguageFeatures.Apply(this); 432 442 break; 433 443 default: 434 languageFeatures = new CSharpLanguageFeatures(this);444 CSharpLanguageFeatures.Apply(this); 435 445 break; 436 446 } -
stable/HeuristicLab.CodeEditor/3.4/HeuristicLab.CodeEditor-3.4.csproj
r11804 r11937 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 <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" /> -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs
r11700 r11937 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 } -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs
r11800 r11937 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 -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs
r11722 r11937 25 25 using ICSharpCode.AvalonEdit.CodeCompletion; 26 26 using ICSharpCode.NRefactory.Completion; 27 using ICSharpCode.NRefactory.CSharp; 27 28 using ICSharpCode.NRefactory.CSharp.Completion; 29 using ICSharpCode.NRefactory.CSharp.Resolver; 28 30 using ICSharpCode.NRefactory.TypeSystem; 29 31 using ICompletionData = ICSharpCode.NRefactory.Completion.ICompletionData; … … 103 105 104 106 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; 107 108 } 108 109 … … 121 122 122 123 #region IParameterCompletionDataFactory Members 123 public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type, ICSharpCode.NRefactory.CSharp.AstNode thisInitializer) {124 return Create MethodDataProvider(startOffset, type.GetConstructors());124 public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type, AstNode thisInitializer) { 125 return CreateConstructorProvider(startOffset, type); 125 126 } 126 127 127 128 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); 129 131 } 130 132 131 133 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); 133 136 } 134 137 … … 138 141 139 142 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))); 141 144 } 142 145 … … 149 152 } 150 153 #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 } 151 161 } 152 162 } -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs
r11802 r11937 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 } -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs
r11700 r11937 115 115 116 116 int parameterIndex = pce.GetCurrentParameterIndex(startOffset, completionContext.Offset); 117 if (parameterIndex < 0 ) {117 if (parameterIndex < 0 || !items.Any()) { 118 118 RequestClose = true; 119 119 return; … … 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); -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs
r11800 r11937 40 40 } 41 41 42 public virtual void RunBackgroundParser() { 43 backgroundParser.Start(); 42 public virtual void Initialize() { 43 if (backgroundParser.Status == TaskStatus.Created) 44 backgroundParser.Start(); 44 45 } 45 46 -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs
r11700 r11937 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 } -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs
r11722 r11937 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) { -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs
r11800 r11937 23 23 internal interface ICodeCompletionStrategy { 24 24 void DoCodeCompletion(bool controlSpace); 25 void RunBackgroundParser();25 void Initialize(); 26 26 } 27 27 } -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs
r11800 r11937 63 63 64 64 private void LoadedHandler(object sender, EventArgs e) { 65 codeCompletionStrategy. RunBackgroundParser();65 codeCompletionStrategy.Initialize(); 66 66 } 67 67 -
stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs
r11700 r11937 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 } -
stable/HeuristicLab.ExtLibs
- Property svn:mergeinfo changed
/branches/CodeEditor/HeuristicLab.ExtLibs (added) merged: 11700,11707,11743,11804 /trunk/sources/HeuristicLab.ExtLibs merged: 11807,11810-11811
- Property svn:mergeinfo changed
-
stable/HeuristicLab.ExtLibs.sln
r11336 r11937 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 12.00 3 # Visual Studio 2012 3 # Visual Studio 2013 4 VisualStudioVersion = 12.0.21005.1 5 MinimumVisualStudioVersion = 10.0.40219.1 4 6 Project("{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}" 5 7 EndProject … … 35 37 Project("{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}" 36 38 EndProject 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 EndProject39 39 Project("{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}" 40 40 EndProject … … 50 50 EndProject 51 51 Project("{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}" 52 EndProject 53 Project("{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}" 54 EndProject 55 Project("{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}" 56 EndProject 57 Project("{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}" 58 EndProject 59 Project("{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}" 60 EndProject 61 Project("{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}" 62 EndProject 63 Project("{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}" 64 EndProject 65 Project("{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}" 66 EndProject 67 Project("{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}" 68 EndProject 69 Project("{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}" 52 70 EndProject 53 71 Global … … 229 247 {62551FD3-C21F-4E16-A7FC-6A017508809C}.Release|x86.ActiveCfg = Release|x86 230 248 {62551FD3-C21F-4E16-A7FC-6A017508809C}.Release|x86.Build.0 = Release|x86 231 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU232 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|Any CPU.Build.0 = Debug|Any CPU233 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|x64.ActiveCfg = Debug|x64234 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|x64.Build.0 = Debug|x64235 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|x86.ActiveCfg = Debug|x86236 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Debug|x86.Build.0 = Debug|x86237 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|Any CPU.ActiveCfg = Release|Any CPU238 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|Any CPU.Build.0 = Release|Any CPU239 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|x64.ActiveCfg = Release|x64240 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|x64.Build.0 = Release|x64241 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|x86.ActiveCfg = Release|x86242 {8AF3BD99-3C84-4166-9EEA-B1403E20D926}.Release|x86.Build.0 = Release|x86243 249 {AE723DEF-1A44-4F9C-8670-DBCAB79626A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 244 250 {AE723DEF-1A44-4F9C-8670-DBCAB79626A2}.Debug|Any CPU.Build.0 = Debug|Any CPU … … 325 331 {52C66DEA-0250-477B-97F8-5CD2CD4B7332}.Release|x86.ActiveCfg = Release|x86 326 332 {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 327 441 EndGlobalSection 328 442 GlobalSection(SolutionProperties) = preSolution -
stable/HeuristicLab.Operators.Programmable.Views/3.3/HeuristicLab.Operators.Programmable.Views-3.3.csproj
r11920 r11937 128 128 </ItemGroup> 129 129 <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> 133 133 <Private>False</Private> 134 134 </ProjectReference> -
stable/HeuristicLab.Operators.Programmable.Views/3.3/Plugin.cs.frame
r11173 r11937 28 28 [Plugin("HeuristicLab.Operators.Programmable.Views", "3.3.10.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Operators.Programmable.Views-3.3.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.CodeEditor", "3. 3")]30 [PluginDependency("HeuristicLab.CodeEditor", "3.4")] 31 31 [PluginDependency("HeuristicLab.Common.Resources", "3.3")] 32 32 [PluginDependency("HeuristicLab.Core", "3.3")] -
stable/HeuristicLab.Operators.Programmable.Views/3.3/ProgrammableOperatorView.cs
r11170 r11937 82 82 base.OnContentChanged(); 83 83 if (ProgrammableOperator == null) { 84 codeEditor.UserCode = "";84 codeEditor.UserCode = string.Empty; 85 85 assembliesTreeView.Nodes.Clear(); 86 86 parameterCollectionView.Content = null; 87 87 } else { 88 88 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); 90 90 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); 93 93 InitializeAssemblyList(); 94 94 InitializeNamespacesList(); 95 foreach (var a in ProgrammableOperator.SelectedAssemblies) { 96 codeEditor.AddAssembly(a); 97 } 95 codeEditor.AddAssemblies(ProgrammableOperator.SelectedAssemblies); 98 96 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); 103 99 parameterCollectionView.Content = ProgrammableOperator.Parameters; 104 100 if (ProgrammableOperator.CompileErrors == null) { -
stable/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs
r11907 r11937 21 21 22 22 using System; 23 using System.Drawing; 24 using System.Threading; 23 25 using System.Windows.Forms; 24 26 using HeuristicLab.Common; … … 31 33 [Content(typeof(CSharpScript), true)] 32 34 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 33 40 protected bool Running { get; set; } 34 41 … … 65 72 startStopButton.Image = VSImageLibrary.Stop; 66 73 toolTip.SetToolTip(startStopButton, "Stop (Shift+F5)"); 74 UpdateInfoTextLabel(ScriptExecutionStartedMessage, SystemColors.ControlText); 67 75 infoTabControl.SelectedTab = outputTabPage; 68 76 } … … 76 84 startStopButton.Image = VSImageLibrary.Play; 77 85 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 78 98 Running = false; 79 var ex = e.Value;80 if (ex != null)81 PluginInfrastructure.ErrorHandling.ShowErrorDialog(this, ex);82 99 } 83 100 } … … 111 128 if (Compile()) { 112 129 outputTextBox.Clear(); 130 Running = true; 113 131 Content.ExecuteAsync(); 114 Running = true;115 132 } 116 133 } -
stable/HeuristicLab.Scripting.Views/3.3/HeuristicLab.Scripting.Views-3.3.csproj
r11920 r11937 118 118 </ItemGroup> 119 119 <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> 124 123 </ProjectReference> 125 124 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> -
stable/HeuristicLab.Scripting.Views/3.3/Plugin.cs.frame
r11173 r11937 25 25 [Plugin("HeuristicLab.Scripting.Views", "3.3.10.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Scripting.Views-3.3.dll", PluginFileType.Assembly)] 27 [PluginDependency("HeuristicLab.CodeEditor", "3. 3")]27 [PluginDependency("HeuristicLab.CodeEditor", "3.4")] 28 28 [PluginDependency("HeuristicLab.Collections", "3.3")] 29 29 [PluginDependency("HeuristicLab.Common", "3.3")] -
stable/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs
r11907 r11937 19 19 */ 20 20 #endregion 21 22 using System.Collections.Generic; 23 using System.Reflection; 24 using HeuristicLab.Common; 21 25 22 26 namespace HeuristicLab.Scripting.Views { … … 46 50 private void InitializeComponent() { 47 51 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(); 50 53 this.imageList = new System.Windows.Forms.ImageList(this.components); 51 54 this.compileButton = new System.Windows.Forms.Button(); … … 84 87 this.infoLabel.Location = new System.Drawing.Point(816, 4); 85 88 // 86 // compilationLabel87 // 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"; 95 98 // 96 99 // imageList … … 215 218 this.codeEditor.UserCode = ""; 216 219 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); 217 224 // 218 225 // splitContainer1 … … 241 248 this.Controls.Add(this.splitContainer1); 242 249 this.Controls.Add(this.compileButton); 243 this.Controls.Add(this. compilationLabel);250 this.Controls.Add(this.infoTextLabel); 244 251 this.Name = "ScriptView"; 245 252 this.Size = new System.Drawing.Size(835, 602); 246 this.Controls.SetChildIndex(this. compilationLabel, 0);253 this.Controls.SetChildIndex(this.infoTextLabel, 0); 247 254 this.Controls.SetChildIndex(this.compileButton, 0); 248 255 this.Controls.SetChildIndex(this.splitContainer1, 0); … … 266 273 #endregion 267 274 268 protected System.Windows.Forms.Label compilationLabel;275 protected System.Windows.Forms.Label infoTextLabel; 269 276 protected System.Windows.Forms.Button compileButton; 270 277 protected System.Windows.Forms.ImageList imageList; -
stable/HeuristicLab.Scripting.Views/3.3/ScriptView.cs
r11908 r11937 22 22 using System; 23 23 using System.CodeDom.Compiler; 24 using System.Collections.Generic; 24 25 using System.Drawing; 25 26 using System.Globalization; 26 27 using System.Linq; 28 using System.Reflection; 27 29 using System.Windows.Forms; 30 using HeuristicLab.Common; 28 31 using HeuristicLab.Common.Resources; 29 32 using HeuristicLab.Core.Views; … … 35 38 [Content(typeof(Script), true)] 36 39 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 37 47 #region Properties 38 48 public new Script Content { … … 73 83 codeEditor.UserCode = string.Empty; 74 84 } 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()); 79 87 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); 88 89 } 89 90 } … … 114 115 try { 115 116 Content.Compile(); 116 outputTextBox.AppendText("Compilation succeeded."); 117 outputTextBox.AppendText(CompilationSucceededMessage); 118 UpdateInfoTextLabel(CompilationSucceededMessage, Color.DarkGreen); 117 119 return true; 118 120 } catch (CompilationException) { 119 121 if (Content.CompileErrors.HasErrors) { 120 outputTextBox.AppendText("Compilation failed."); 122 outputTextBox.AppendText(CompilationFailedMessage); 123 UpdateInfoTextLabel(CompilationFailedMessage, Color.DarkRed); 121 124 return false; 122 125 } else { 123 outputTextBox.AppendText("Compilation succeeded."); 126 outputTextBox.AppendText(CompilationSucceededMessage); 127 UpdateInfoTextLabel(CompilationSucceededMessage, Color.DarkGreen); 124 128 return true; 125 129 } … … 131 135 Locked = false; 132 136 codeEditor.Focus(); 133 OnContentChanged();134 137 } 135 138 } … … 137 140 #region Helpers 138 141 protected virtual void ShowCompilationResults() { 139 if (Content.CompileErrors.Count == 0) return;140 141 142 var messages = Content.CompileErrors.OfType<CompilerError>() 142 143 .OrderBy(x => x.IsWarning) … … 157 158 } 158 159 159 codeEditor.ShowCompileErrors(Content.CompileErrors , ".cs");160 codeEditor.ShowCompileErrors(Content.CompileErrors); 160 161 161 162 AdjustErrorListViewColumnSizes(); 163 } 164 165 protected virtual void UpdateInfoTextLabel(string message, Color color) { 166 infoTextLabel.Text = message; 167 infoTextLabel.ForeColor = color; 162 168 } 163 169 … … 167 173 ch.Width = -2; 168 174 } 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 169 192 #endregion 170 193 171 194 #region Event Handlers 172 195 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); 175 197 else { 176 198 codeEditor.UserCode = Content.Code; … … 196 218 } 197 219 #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 } 198 252 } 199 253 } -
stable/HeuristicLab.Scripting/3.3/Scripts/CSharp/CSharpScript.cs
r11787 r11937 102 102 OnScriptExecutionStarted(); 103 103 compiledScript.Execute(VariableStore); 104 } catch (ThreadAbortException) {105 // the execution was cancelled by the user106 104 } catch (Exception e) { 107 105 ex = e; 108 106 } finally { 107 scriptThread = null; 109 108 OnScriptExecutionFinished(ex); 110 109 } … … 115 114 116 115 public virtual void Kill() { 117 if (scriptThread .IsAlive)118 116 if (scriptThread == null) return; 117 scriptThread.Abort(); 119 118 } 120 119 -
stable/HeuristicLab.Scripting/3.3/Scripts/Templates/CSharpScriptTemplate.cs
r11787 r11937 1 1 // 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) 3 3 // use 'vars.Contains(string)' to check if a variable exists 4 4 // use 'vars.Clear()' to remove all variables -
stable/HeuristicLab.Scripting/3.3/Variables.cs
r11154 r11937 6 6 public class Variables : DynamicObject, IEnumerable<KeyValuePair<string, object>> { 7 7 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 } 8 16 9 17 public Variables(VariableStore variableStore) {
Note: See TracChangeset
for help on using the changeset viewer.