/// <summary> /// LibraryLoaded event handler. /// </summary> private void LibraryLoaded(object sender, LibraryServices.LibraryLoadedEventArgs e) { liveRunnerServices.ReloadAllLibraries(libraryServices.ImportedLibraries); // The LiveRunner core is newly instantiated whenever a new library is imported // due to which a new instance of CodeCompletionServices needs to be created with the new Core codeCompletionServices = new CodeCompletionServices(LiveRunnerCore); }
/// <summary> /// LibraryLoaded event handler. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void LibraryLoaded(object sender, LibraryServices.LibraryLoadedEventArgs e) { string newLibrary = e.LibraryPath; // Load all functions defined in that library. dynamoModel.SearchModel.Add(libraryServices.GetFunctionGroups(newLibrary)); // Reset the VM liveRunnerServices.ReloadAllLibraries(libraryServices.Libraries.ToList()); // Mark all nodes as dirty so that AST for the whole graph will be // regenerated. foreach (var node in dynamoModel.HomeSpace.Nodes) { node.RequiresRecalc = true; } }
/// <summary> /// LibraryLoaded event handler. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void LibraryLoaded(object sender, LibraryServices.LibraryLoadedEventArgs e) { string newLibrary = e.LibraryPath; // Load all functions defined in that library. dynamoModel.SearchModel.Add(libraryServices.GetFunctionGroups(newLibrary)); // Reset the VM liveRunnerServices.ReloadAllLibraries(libraryServices.ImportedLibraries); // The LiveRunner core is newly instantiated whenever a new library is imported // due to which a new instance of CodeCompletionServices needs to be created with the new Core codeCompletionServices = new CodeCompletionServices(LiveRunnerCore); // Mark all nodes as dirty so that AST for the whole graph will be // regenerated. foreach (var node in dynamoModel.HomeSpace.Nodes) { node.RequiresRecalc = true; } }