Esempio n. 1
0
        private Dictionary <object, SourceLocation> UpdateSourceLocationMappingInDebuggerService(Activity root)
        {
            var rootInstance                  = GetRootInstance();
            var sourceLocationMapping         = new Dictionary <object, SourceLocation>();
            var designerSourceLocationMapping = new Dictionary <object, SourceLocation>();

            if (rootInstance != null)
            {
                var documentRootElement = GetRootWorkflowElement(rootInstance);

                SourceLocationProvider.CollectMapping(
                    GetDebuggableActivity(root),
                    documentRootElement,
                    sourceLocationMapping,
                    WorkflowDesigner.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);

                SourceLocationProvider.CollectMapping(
                    documentRootElement,
                    documentRootElement,
                    designerSourceLocationMapping,
                    WorkflowDesigner.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);
            }

            ((DebuggerService)WorkflowDesigner.DebugManagerView).UpdateSourceLocations(designerSourceLocationMapping);

            return(sourceLocationMapping);
        }
        Dictionary <object, SourceLocation> UpdateSourceLocationMappingInDebuggerService()
        {
            object rootInstance = GetRootInstance();
            Dictionary <object, SourceLocation> sourceLocationMapping = new Dictionary <object, SourceLocation>();


            if (rootInstance != null)
            {
                Activity documentRootElement = GetRootWorkflowElement(rootInstance);

                SourceLocationProvider.CollectMapping(GetRootRuntimeWorkflowElement(), documentRootElement, sourceLocationMapping,
                                                      this.WorkflowDesigner.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);

                //Collect the mapping between the Model Item tree and its underlying source location
                SourceLocationProvider.CollectMapping(documentRootElement, documentRootElement, designerSourceLocationMapping,
                                                      this.WorkflowDesigner.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);
            }

            // Notify the DebuggerService of the new sourceLocationMapping.
            // When rootInstance == null, it'll just reset the mapping.
            //DebuggerService debuggerService = debuggerService as DebuggerService;
            if (this.DebuggerService != null)
            {
                ((DebuggerService)this.DebuggerService).UpdateSourceLocations(designerSourceLocationMapping);
            }

            return(sourceLocationMapping);
        }
        private Dictionary <object, SourceLocation> UpdateSourceLocationMappingInDebuggerService(Activity root)
        {
            object rootInstance = this.GetRootInstance();
            Dictionary <object, SourceLocation> sourceLocationMapping         = new Dictionary <object, SourceLocation>();
            Dictionary <object, SourceLocation> designerSourceLocationMapping = new Dictionary <object, SourceLocation>();

            if (rootInstance != null)
            {
                Activity documentRootElement = this.GetRootWorkflowElement(rootInstance);
                SourceLocationProvider.CollectMapping(
                    this.GetRootRuntimeWorkflowElement(root),
                    documentRootElement,
                    sourceLocationMapping,
                    this.workflowDesigner.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);
                SourceLocationProvider.CollectMapping(
                    documentRootElement,
                    documentRootElement,
                    designerSourceLocationMapping,
                    this.workflowDesigner.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);
            }

            // Notify the DebuggerService of the new sourceLocationMapping.
            // When rootInstance == null, it'll just reset the mapping.
            if (this.debuggerService != null)
            {
                ((DebuggerService)this.debuggerService).UpdateSourceLocations(designerSourceLocationMapping);
            }

            return(sourceLocationMapping);
        }
        Dictionary <object, SourceLocation> UpdateSourceLocationMappingInDebuggerService()
        {
            object rootInstance = GetRootInstance();
            Dictionary <object, SourceLocation> sourceLocationMapping         = new Dictionary <object, SourceLocation>();
            Dictionary <object, SourceLocation> designerSourceLocationMapping = new Dictionary <object, SourceLocation>();

            if (rootInstance != null)
            {
                Activity documentRootElement = GetRootWorkflowElement(rootInstance);
                SourceLocationProvider.CollectMapping(GetRootRuntimeWorkflowElement(), documentRootElement, sourceLocationMapping,
                                                      _designer.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);
                SourceLocationProvider.CollectMapping(documentRootElement, documentRootElement, designerSourceLocationMapping,
                                                      _designer.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);
            }

            // Notify the DebuggerService of the new sourceLocationMapping.
            // When rootInstance == null, it'll just reset the mapping.
            //DebuggerService debuggerService = debuggerService as DebuggerService;
            var debugService = _designer.DebugManagerView;

            if (debugService != null)
            {
                ((DebuggerService)debugService).UpdateSourceLocations(designerSourceLocationMapping);
            }

            return(sourceLocationMapping);
        }
Esempio n. 5
0
        private Dictionary <object, SourceLocation> GetSourceLocationMap()
        {
            var runtimeDebug     = new Dictionary <object, SourceLocation>();
            var debugDebug       = new Dictionary <object, SourceLocation>();
            var fileItem         = _workflowDesigner.Context.Items.GetValue(typeof(WorkflowFileItem)) as WorkflowFileItem;
            var debugActivity    = GetDebugActivity();
            var runtTimeActivity = GetRuntimeActivity();

            SourceLocationProvider.CollectMapping(runtTimeActivity, debugActivity, runtimeDebug, fileItem.LoadedFile);
            SourceLocationProvider.CollectMapping(debugActivity, debugActivity, debugDebug, fileItem.LoadedFile);
            _debuggerService.UpdateSourceLocations(debugDebug);
            return(runtimeDebug);
        }
Esempio n. 6
0
        Dictionary <object, SourceLocation> UpdateSourceLocationMappingInDebuggerService(Activity activityExecute)
        {
            object rootInstance = GetRootInstance();
            Dictionary <object, SourceLocation> sourceLocationMapping = new Dictionary <object, SourceLocation>();

            // Dictionary<object, SourceLocation> designerSourceLocationMapping = new Dictionary<object, SourceLocation>();
            designerSourceLocationMapping = new Dictionary <object, SourceLocation>();
            try
            {
                if (rootInstance != null)
                {
                    Activity documentRootElement = GetRootWorkflowElement(rootInstance);
                    SourceLocationProvider.CollectMapping(GetRootRuntimeWorkflowElement(activityExecute), documentRootElement, sourceLocationMapping,
                                                          SelectHelper._wfDesigner.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);
                    try
                    {
                        SourceLocationProvider.CollectMapping(documentRootElement, documentRootElement, designerSourceLocationMapping,
                                                              SelectHelper._wfDesigner.Context.Items.GetValue <WorkflowFileItem>().LoadedFile);
                    }
                    catch (Exception)
                    {
                    }
                }

                // Notify the DebuggerService of the new sourceLocationMapping.
                // When rootInstance == null, it'll just reset the mapping.
                //DebuggerService debuggerService = debuggerService as DebuggerService;
                if (DebuggerService == null)
                {
                    DebuggerService = SelectHelper._wfDesigner.DebugManagerView;
                }
                if (DebuggerService != null)
                {
                    ((DebuggerService)DebuggerService).UpdateSourceLocations(designerSourceLocationMapping);
                }
            }
            catch (Exception ex)
            {
                Log.Logger.LogData(ex.Message, LogLevel.Error);
            }

            //  return sourceLocationMapping;
            return(designerSourceLocationMapping);
        }