Ejemplo n.º 1
0
        private void DebugServiceBreakpointHit(object sender, SledDebugServiceBreakpointEventArgs e)
        {
            if (string.IsNullOrEmpty(e.Breakpoint.File))
            {
                // TODO: open a faux document saying something about unknown file?
                return;
            }

            // Get absolute path to file
            var szAbsPath = SledUtil.GetAbsolutePath(e.Breakpoint.File, m_projectService.AssetDirectory);

            if (!string.IsNullOrEmpty(szAbsPath) && File.Exists(szAbsPath))
            {
                ISledDocument sd;
                var           uri = new Uri(szAbsPath);

                // If already open jump to line otherwise open the file
                if (m_documentService.IsOpen(uri, out sd))
                {
                    m_gotoService.Get.GotoLine(sd, m_curBreakpoint.Line, true);
                }
                else
                {
                    m_documentService.Open(uri, out sd);
                }
            }

            MarkProjectDocsReadOnly(false);
        }
        protected virtual void OnDebugServiceUpdateSync(object sender, SledDebugServiceBreakpointEventArgs e)
        {
            if (Collection.Count <= 0)
            {
                return;
            }

            // See if any variables need to be looked up
            foreach (var state in Collection[0].ExpandedStates)
            {
                foreach (var node in state.GetFlattenedHierarchy())
                {
                    if (node.LookUp == null)
                    {
                        continue;
                    }

                    // Already looking up this item
                    if (ListNameInsert.Contains(node.Variable.Name))
                    {
                        continue;
                    }

                    // Keep track of items getting looked up
                    ListNameInsert.Add(node.Variable.Name);
                    ListNameInsertDict.Add(node.Variable.Name, new Pair <string, IList <SledLuaVarNameTypePairType> >(node.Variable.DisplayName, node.Variable.TargetHierarchy));

                    //SledOutDevice.OutLine(SledMessageType.Error, "[Variable Lookup] {0}", node.LookUp);

                    DebugService.SendScmp(new Scmp.LuaVarLookUp(LuaLanguagePlugin.LanguageId, node.LookUp));
                }
            }
        }
Ejemplo n.º 3
0
        private void DebugServiceBreakpointHitting(object sender, SledDebugServiceBreakpointEventArgs e)
        {
            m_curBreakpoint = e.Breakpoint.Clone() as SledNetworkBreakpoint;

            if (m_curBreakpoint.IsUnknownFile())
            {
                return;
            }

            // Get absolute path to file
            var szAbsPath = SledUtil.GetAbsolutePath(e.Breakpoint.File, m_projectService.AssetDirectory);

            if (string.IsNullOrEmpty(szAbsPath) || !File.Exists(szAbsPath))
            {
                return;
            }

            // Check if file is in the project
            var projFile = m_projectFileFinderService.Get.Find(szAbsPath);

            // Try and add file to project
            if (projFile == null)
            {
                m_projectService.AddFile(szAbsPath, out projFile);
            }
        }
        protected virtual void OnDebugServiceUpdateEnd(object sender, SledDebugServiceBreakpointEventArgs e)
        {
            foreach (var collection in Collection)
            {
                collection.ValidationEnded();
            }

            Editor.RestoreState();
        }
        private void DebugServiceBreakpointHit(object sender, SledDebugServiceBreakpointEventArgs e)
        {
            try
            {
                var hwnd = SledUser32.GetForegroundWindow();
                if (hwnd == m_mainForm.Handle)
                {
                    return;
                }

                SledUser32.FlashWindow(m_mainForm.Handle);
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        protected virtual void OnDebugServiceUpdateBegin(object sender, SledDebugServiceBreakpointEventArgs e)
        {
            if (Collection.Count > 0)
            {
                Collection[0].ValidationBeginning();
            }

            // Save while items still in collection & on GUI
            if (Collection.Count > 0)
            {
                Collection[0].SaveExpandedStates();
            }

            Editor.SaveState();

            // Clear GUI
            Editor.View = null;

            // Clear out all items
            for (var i = 0; i < Collection.Count; i++)
            {
                Collection[i].Variables.Clear();

                if (i > 0)
                {
                    Collection[i].ResetExpandedStates();
                }
            }

            if (Collection.Count > 0)
            {
                Editor.View = Collection[0];
            }

            // Reset
            ListInsert.Clear();
            ListNameInsert.Clear();
            ListNameInsertDict.Clear();
        }
Ejemplo n.º 7
0
 private void DebugServiceUpdateEnd(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     m_callStackEditor.View = m_callStackCollection;
     m_callStackCollection.ValidationEnded();
 }
Ejemplo n.º 8
0
 private void DebugServiceUpdateBegin(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     //SendLiveConnectCallStackClear(m_liveConnectService);
 }
Ejemplo n.º 9
0
 private void DebugServiceUpdateEnd(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     m_editor.View          = m_collection;
     m_funcCallsEditor.View = m_funcCallsCollection;
 }
Ejemplo n.º 10
0
        private void DebugServiceBreakpointContinue(object sender, SledDebugServiceBreakpointEventArgs e)
        {
            m_curBreakpoint = e.Breakpoint.Clone() as SledNetworkBreakpoint;

            RemoveCurrentStatementIndicators();
        }
Ejemplo n.º 11
0
 private void DebugServiceUpdateEnd(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     InputEnabled = true;
     Flush();
 }
Ejemplo n.º 12
0
 private void DebugServiceBreakpointContinue(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     InputEnabled = false;
 }
Ejemplo n.º 13
0
 private void DebugServiceUpdateEnd(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     SledOutDevice.OutLine(SledMessageType.Info, "DebugService.UpdateEnd");
 }
Ejemplo n.º 14
0
 private void DebugServiceBreakpointContinue(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     SledOutDevice.OutLine(SledMessageType.Info, "DebugService.BreakpointContinue");
 }
Ejemplo n.º 15
0
 private void DebugServiceUpdateEnd(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     m_editor.TreeListViewAdapter.VirtualListSize = m_trace.Count;
 }
Ejemplo n.º 16
0
 private void DebugServiceUpdateEnd(object sender, SledDebugServiceBreakpointEventArgs e)
 {
     OnDebugServiceUpdateEnd(sender, e);
 }