示例#1
0
        private void Manager_OnMouseHover(ScintillaControl sci, Int32 position)
        {
            DebuggerManager debugManager   = PluginMain.debugManager;
            FlashInterface  flashInterface = debugManager.FlashInterface;

            if (!PluginBase.MainForm.EditorMenu.Visible && flashInterface != null &&
                flashInterface.isDebuggerStarted && flashInterface.isDebuggerSuspended)
            {
                if (debugManager.CurrentLocation != null &&
                    debugManager.CurrentLocation.File != null)
                {
                    String localPath = debugManager.GetLocalPath(debugManager.CurrentLocation.File);

                    if (localPath == null || localPath != PluginBase.MainForm.CurrentDocument.FileName)
                    {
                        return;
                    }
                }
                else
                {
                    return;
                }

                Point     dataTipPoint = Control.MousePosition;
                Rectangle rect         = new Rectangle(m_ToolTip.Location, m_ToolTip.Size);

                if (m_ToolTip.Visible && rect.Contains(dataTipPoint))
                {
                    return;
                }

                position = sci.WordEndPosition(position, true);
                String leftword = GetWordAtPosition(sci, position);
                if (leftword != String.Empty)
                {
                    try
                    {
                        ASTBuilder builder = new ASTBuilder(true);

                        ValueExp          exp     = builder.parse(new System.IO.StringReader(leftword));
                        ExpressionContext context = new ExpressionContext(flashInterface.Session);

                        context.Depth = debugManager.CurrentFrame;

                        Object obj = exp.evaluate(context);

                        Show(dataTipPoint, (Variable)obj);
                    }
                    catch (Exception e)
                    {
                    }
                }
            }
        }
示例#2
0
        void flashInterface_BreakpointEvent(object sender)
        {
            Location loc = FlashInterface.getCurrentLocation();

            if (PluginMain.breakPointManager.ShouldBreak(loc.File, loc.Line) || File.Exists(loc.File.FullPath))
            {
                UpdateUI(DebuggerState.BreakHalt);
            }
            else
            {
                FlashInterface.StepResume();
            }
        }
示例#3
0
        public DebuggerManager()
        {
            m_FlashInterface = new FlashInterface();

            m_FlashInterface.m_BreakPointManager = PluginMain.breakPointManager;

            m_FlashInterface.StartedEvent      += new DebuggerEventHandler(flashInterface_StartedEvent);
            m_FlashInterface.DisconnectedEvent += new DebuggerEventHandler(flashInterface_DisconnectedEvent);

            m_FlashInterface.BreakpointEvent   += new DebuggerEventHandler(flashInterface_BreakpointEvent);
            m_FlashInterface.FaultEvent        += new DebuggerEventHandler(flashInterface_FaultEvent);
            m_FlashInterface.PauseEvent        += new DebuggerEventHandler(flashInterface_PauseEvent);
            m_FlashInterface.StepEvent         += new DebuggerEventHandler(flashInterface_StepEvent);
            m_FlashInterface.ScriptLoadedEvent += new DebuggerEventHandler(flashInterface_ScriptLoadedEvent);
            m_FlashInterface.WatchpointEvent   += new DebuggerEventHandler(flashInterface_WatchpointEvent);
            m_FlashInterface.UnknownHaltEvent  += new DebuggerEventHandler(flashInterface_UnknownHaltEvent);

            m_FlashInterface.ProgressEvent += new DebuggerProgressEventHandler(flashInterface_ProgressEvent);
        }
示例#4
0
        void UpdateUI(DebuggerState state)
        {
            if ((PluginBase.MainForm as Form).InvokeRequired)
            {
                (PluginBase.MainForm as Form).BeginInvoke((MethodInvoker) delegate()
                {
                    UpdateUI(state);
                });
                return;
            }

            CurrentLocation = FlashInterface.getCurrentLocation();

            UpdateStackUI();
            UpdateLocalsUI();

            UpdateMenuState(state);

            (PluginBase.MainForm as Form).Activate();
        }
示例#5
0
        public DebuggerManager()
        {
			m_FlashInterface = new FlashInterface();

			m_FlashInterface.m_BreakPointManager = PluginMain.breakPointManager;

			m_FlashInterface.StartedEvent += new DebuggerEventHandler(flashInterface_StartedEvent);
			m_FlashInterface.DisconnectedEvent += new DebuggerEventHandler(flashInterface_DisconnectedEvent);

			m_FlashInterface.BreakpointEvent += new DebuggerEventHandler(flashInterface_BreakpointEvent);
			m_FlashInterface.FaultEvent += new DebuggerEventHandler(flashInterface_FaultEvent);
			m_FlashInterface.PauseEvent += new DebuggerEventHandler(flashInterface_PauseEvent);
			m_FlashInterface.StepEvent += new DebuggerEventHandler(flashInterface_StepEvent);
			m_FlashInterface.ScriptLoadedEvent += new DebuggerEventHandler(flashInterface_ScriptLoadedEvent);
			m_FlashInterface.WatchpointEvent += new DebuggerEventHandler(flashInterface_WatchpointEvent);
			m_FlashInterface.UnknownHaltEvent += new DebuggerEventHandler(flashInterface_UnknownHaltEvent);

            m_FlashInterface.ProgressEvent += new DebuggerProgressEventHandler(flashInterface_ProgressEvent);
        }