Ejemplo n.º 1
0
        protected override void HandleTaskCompletionCore()
        {
            // Retrieve warnings in the context of ISchedulerThread.
            BuildWarnings   = engineController.GetBuildWarnings();
            RuntimeWarnings = engineController.GetRuntimeWarnings();

            // Mark all modified nodes as being updated (if the task has been
            // successfully scheduled, executed and completed, it is expected
            // for "modifiedNodes" to be both non-null and non-empty.
            //
            // In addition to marking modified nodes as being updated, their
            // warning states are cleared (which include the tool-tip). Any node
            // that has build/runtime warnings assigned to it will properly be
            // restored to warning state when task completion handler sets the
            // corresponding build/runtime warning on it.
            //
            foreach (var modifiedNode in ModifiedNodes)
            {
                modifiedNode.IsUpdated = true;
                if (modifiedNode.State == ElementState.Warning)
                {
                    modifiedNode.ClearRuntimeError();
                }
            }
        }
Ejemplo n.º 2
0
        protected override void HandleTaskCompletionCore()
        {
            // Retrieve warnings in the context of ISchedulerThread.
            BuildWarnings   = engineController.GetBuildWarnings();
            RuntimeWarnings = engineController.GetRuntimeWarnings();

            // Mark all modified nodes as being updated (if the task has been
            // successfully scheduled, executed and completed, it is expected
            // for "modifiedNodes" to be both non-null and non-empty.
            foreach (var modifiedNode in modifiedNodes)
            {
                modifiedNode.IsUpdated = true;
            }
        }
Ejemplo n.º 3
0
        protected override void HandleTaskCompletionCore()
        {
            if (engineController.IsDisposed)
            {
                BuildWarnings   = new Dictionary <Guid, List <WarningEntry> >();
                RuntimeWarnings = new Dictionary <Guid, List <ProtoCore.Runtime.WarningEntry> >();
            }
            else
            {
                // Retrieve warnings in the context of ISchedulerThread.
                BuildWarnings   = engineController.GetBuildWarnings();
                RuntimeWarnings = engineController.GetRuntimeWarnings();

                // Mark all modified nodes as being updated (if the task has been
                // successfully scheduled, executed and completed, it is expected
                // for "modifiedNodes" to be both non-null and non-empty.
                //
                // In addition to marking modified nodes as being updated, their
                // warning states are cleared (which include the tool-tip). Any node
                // that has build/runtime warnings assigned to it will properly be
                // restored to warning state when task completion handler sets the
                // corresponding build/runtime warning on it.
                //
                executedNodes = new List <NodeModel>();
                var executedNodeGuids = engineController.GetExecutedAstGuids(graphSyncData.SessionID);
                foreach (var guid in executedNodeGuids)
                {
                    var node = TargetedWorkspace.Nodes.FirstOrDefault(n => n.GUID.Equals(guid));
                    if (node != null)
                    {
                        executedNodes.Add(node);
                    }
                }
                foreach (var node in executedNodes)
                {
                    node.WasInvolvedInExecution = true;
                    node.WasRenderPackageUpdatedAfterExecution = false;
                    if (node.State == ElementState.Warning)
                    {
                        using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.ToolTipText), nameof(NodeModel.State)))
                        {
                            node.ClearErrorsAndWarnings();
                        }
                    }
                }

                engineController.RemoveRecordedAstGuidsForSession(graphSyncData.SessionID);
            }
        }