Ejemplo n.º 1
0
		void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
		{
			target.VariableUpdate -= new VariableUpdateEventHandler(Target_VariableUpdate);
			target.StateUpdate -= new StateUpdateEventHandler(Target_StateUpdate);

			Clear();
		}
Ejemplo n.º 2
0
		public ConsoleWindow(IManager manager)
		{
			InitializeComponent();

			m_manager = manager;
			m_plugin = (LuaPlugin)m_manager.GetPlugin(typeof(LuaPlugin));
			m_debugger = m_plugin.Debugger;

			m_manager.ProjectOpened += new ProjectOpenedEventHandler(Manager_ProjectOpened);
			m_manager.ProjectClosing += new ProjectClosingEventHandler(Manager_ProjectClosing);

			m_debugger.DebuggerConnected += new DebuggerConnectedEventHandler(Debugger_DebuggerConnected);
			m_debugger.DebuggerDisconnected += new DebuggerDisconnectedEventHandler(Debugger_DebuggerDisconnected);

			m_plugin.Options.OptionsChanged += new OptionsChangedDelegate(Options_OptionsChanged);

			m_autocompletePopup = new AutocompletePopup(m_debugger, this);
			m_autocompletePopup.Selection += new AutocompleteSelectionEventHandler(m_autocompletePopup_Selection);

			SetWaitingForResult(false);

			ConfigureScintillaControl(inputBox);

			ClearBrowser();
		}
Ejemplo n.º 3
0
		public TargetConnectionDialog(DebugManager debugger)
		{
			mDebugger = debugger;
			mSelection = null;

			InitializeComponent();
		}
Ejemplo n.º 4
0
		void Debugger_BreakpointChanged(DebugManager sender, BreakpointDetails bkpt, bool valid)
		{
			ListViewItem item = FindBreakpoint(bkpt.FileName, bkpt.Line);

			mUpdating = true;
			if(item == null && valid)
			{
				item = new ListViewItem(bkpt.FileName);
				item.SubItems.Add(bkpt.Line.ToString());
				item.SubItems.Add(bkpt.TargetState.ToString());
				item.ImageIndex = 0;
				item.Checked = bkpt.Enabled;
				item.Tag = bkpt;
				breakpointListView.Items.Add(item);
			}
			else if(item != null && valid)
			{
				item.Checked = bkpt.Enabled;
				item.SubItems[2].Text = bkpt.TargetState.ToString();
			}
			else if(item != null && !valid)
			{
				breakpointListView.Items.Remove(item);
			}
			mUpdating = false;
		}
Ejemplo n.º 5
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
			target.VariableUpdate += new VariableUpdateEventHandler(target_VariableUpdate);

			UpdateConnectionState(true);
		}
Ejemplo n.º 6
0
		void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
		{
			target.CallstackUpdate -= new CallstackUpdateEventHandler(target_CallstackUpdate);
			target.StateUpdate -= new StateUpdateEventHandler(target_StateUpdate);

			callstackListView.Items.Clear();
		}
Ejemplo n.º 7
0
		public AutocompletePopup(DebugManager debugger, IWin32Window owner)
		{
			InitializeComponent();

			m_debugger = debugger;
			m_owner = owner;
			m_options = new List<ListViewItem>();
		}
Ejemplo n.º 8
0
		public SocketTransport(DebugManager manager)
		{
			mDebugger = manager;
			mDebugger.Manager.ProjectOpened += new ProjectOpenedEventHandler(Manager_ProjectOpened);
			mDebugger.Manager.ProjectClosed += new ProjectClosedEventHandler(Manager_ProjectClosed);
			mDebugger.MainWindow.FormClosed += new FormClosedEventHandler(MainWindow_FormClosed);

			mDebugger.Options.OptionsChanged += new OptionsChangedDelegate(Options_OptionsChanged);
		}
Ejemplo n.º 9
0
		public void Initialise(IManager manager)
		{
			mManager = manager;

			mOptions = new DebuggerOptions();
			manager.OptionsManager.Options.Add(mOptions);

			mDebugger = new DebugManager(manager);
		}
Ejemplo n.º 10
0
		public CallstackWindow(IManager manager)
		{
			InitializeComponent();

			mDebugger = ((LuaPlugin) manager.GetPlugin(typeof(LuaPlugin))).Debugger;

			mDebugger.DebuggerConnected += new DebuggerConnectedEventHandler(Debugger_DebuggerConnected);
			mDebugger.DebuggerDisconnecting += new DebuggerDisconnectingEventHandler(Debugger_DebuggerDisconnecting);
			mDebugger.CurrentStackFrameChanged += new CurrentStackFrameChangedEventHandler(Debugger_CurrentStackFrameChanged);
		}
Ejemplo n.º 11
0
		void Debugger_CurrentStackFrameChanged(DebugManager sender, LuaStackFrame frame)
		{
			foreach(ListViewItem item in callstackListView.Items)
			{
				if ((LuaStackFrame) item.Tag == frame)
					item.StateImageIndex = 0;
				else
					item.StateImageIndex = -1;
			}
		}
Ejemplo n.º 12
0
		public BreakpointsWindow(IManager manager)
		{
			InitializeComponent();

			mDebugger = ((LuaPlugin)manager.GetPlugin(typeof(LuaPlugin))).Debugger;

			mDebugger.DebuggerDisconnecting += new DebuggerDisconnectingEventHandler(Debugger_DebuggerDisconnecting);
			mDebugger.DebuggerConnected += new DebuggerConnectedEventHandler(Debugger_DebuggerConnected);
			mDebugger.BreakpointChanged += new BreakpointChangedEventHandler(Debugger_BreakpointChanged);
		}
Ejemplo n.º 13
0
		public PendingDownloadsWindow(IManager manager)
		{
			InitializeComponent();

			m_manager = manager;
			m_debugger = ((LuaPlugin)manager.GetPlugin(typeof(LuaPlugin))).Debugger;

			m_debugger.DebuggerConnected += new DebuggerConnectedEventHandler(Debugger_DebuggerConnected);
			m_debugger.DebuggerDisconnected += new DebuggerDisconnectedEventHandler(Debugger_DebuggerDisconnected);

			pendingFileListView.Enabled = false;
		}
Ejemplo n.º 14
0
		public MainWindowComponents(DebugManager debugger)
		{
			mDebugger = debugger;

			InitializeComponent();

			mDebugger.DebuggerConnecting += new DebuggerConnectingEventHandler(Debugger_DebuggerConnecting);
			mDebugger.DebuggerConnected += new DebuggerConnectedEventHandler(Debugger_DebuggerConnected);
			mDebugger.DebuggerDisconnecting += new DebuggerDisconnectingEventHandler(Debugger_DebuggerDisconnecting);
			mDebugger.DebuggerDisconnected += new DebuggerDisconnectedEventHandler(Debugger_DebuggerDisconnected);
			mDebugger.Manager.ActiveDocumentChanged += new ActiveDocumentChangedEventHandler(Manager_ActiveDocumentChanged);

			UpdateMenuStatus();
		}
Ejemplo n.º 15
0
		void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
		{
			target.VariableUpdate -= new VariableUpdateEventHandler(target_VariableUpdate);
			target.StateUpdate -= new StateUpdateEventHandler(target_StateUpdate);

			variablesListView.BeginUpdate();
			foreach(TreeTableNode node in variablesListView.Root.Items)
			{
				node.SubItems[1].Text = "";
				node.SubItems[2].Text = "";
				node.Items.Clear();
			}
			variablesListView.EndUpdate();

			UpdateConnectionState(false);
		}
Ejemplo n.º 16
0
		public Target(DebugManager debugger, Form form, IConnection connection)
		{
			mDebugManager = debugger;
			mForm = form;
			mConnection = connection;

			mConnection.ConnectionClosed += new ConnectionClosedEventHandler(Connection_ConnectionClosed);
			mConnection.ConnectionAborted += new ConnectionAbortedEventHandler(Connection_ConnectionAborted);
			mConnection.DataReceived += new ConnectionDataReceivedEventHandler(Connection_DataReceived);

			mMessageQueue = new MessageQueue();
			mHostEvent = new AutoResetEvent(false);
			mTargetEvent = new AutoResetEvent(false);

			m_readBuffer = new ReceiveMessageBuffer(512 * 1024);
			m_writeBuffer = new SendMessageBuffer(4 * 1024);

			m_thread = new Thread(new ThreadStart(ThreadMain));
			m_thread.Name = "LuaDebuggerThread";
			m_thread.Start();
		}
Ejemplo n.º 17
0
        public Target(DebugManager debugger, Form form, IConnection connection)
        {
            mDebugManager = debugger;
            mForm         = form;
            mConnection   = connection;

            mConnection.ConnectionClosed  += new ConnectionClosedEventHandler(Connection_ConnectionClosed);
            mConnection.ConnectionAborted += new ConnectionAbortedEventHandler(Connection_ConnectionAborted);
            mConnection.DataReceived      += new ConnectionDataReceivedEventHandler(Connection_DataReceived);

            mMessageQueue = new MessageQueue();
            mHostEvent    = new AutoResetEvent(false);
            mTargetEvent  = new AutoResetEvent(false);

            m_readBuffer  = new ReceiveMessageBuffer(512 * 1024);
            m_writeBuffer = new SendMessageBuffer(4 * 1024);

            m_thread      = new Thread(new ThreadStart(ThreadMain));
            m_thread.Name = "LuaDebuggerThread";
            m_thread.Start();
        }
Ejemplo n.º 18
0
        public LuaScriptView(IManager manager, Document doc)
            : base(manager, doc)
        {
            InitializeComponent();

            scintillaControl.MarginTypeN(0, (int)Scintilla.Enums.MarginType.Number);
            scintillaControl.MarginWidthN(0, scintillaControl.TextWidth((int)Scintilla.Enums.StylesCommon.LineNumber, "_99999"));
            scintillaControl.MarginWidthN(1, 12);                               // Breakpoint
            scintillaControl.MarginWidthN(2, 12);                               // Fold
            scintillaControl.MarginWidthN(3, 0);                                // Execution point
            scintillaControl.MarginSensitiveN(0, true);
            scintillaControl.MarginSensitiveN(1, true);

            scintillaControl.MarginMaskN(1, 1 << ((int)LineMarker.Breakpoint));                                 // Show marker 0 in margin 1
            scintillaControl.MarginMaskN(3, 1 << ((int)LineMarker.Execution));                                  // Show marker 1 in margin 3

            scintillaControl.MarkerDefine((int)LineMarker.Breakpoint, Scintilla.Enums.MarkerSymbol.Circle);
            scintillaControl.MarkerSetForegroundColor((int)LineMarker.Breakpoint, 0x0000ff);
            scintillaControl.MarkerSetBackgroundColor((int)LineMarker.Breakpoint, 0x0000ff);

            scintillaControl.MarkerDefine((int)LineMarker.Execution, Scintilla.Enums.MarkerSymbol.Arrow);
            scintillaControl.MarkerSetForegroundColor((int)LineMarker.Execution, 0x00ffff);
            scintillaControl.MarkerSetBackgroundColor((int)LineMarker.Execution, 0x00ffff);

            scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderOpen, Scintilla.Enums.MarkerSymbol.CircleMinus);
            scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.Folder, Scintilla.Enums.MarkerSymbol.CirclePlus);
            scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderSub, Scintilla.Enums.MarkerSymbol.VLine);
            scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderTail, Scintilla.Enums.MarkerSymbol.LCornerCurve);
            scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderEnd, Scintilla.Enums.MarkerSymbol.CirclePlusConnected);
            scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderOpenMid, Scintilla.Enums.MarkerSymbol.CircleMinusConnected);
            scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderMidTail, Scintilla.Enums.MarkerSymbol.TCornerCurve);

            scintillaControl.MarginClick += new EventHandler <Scintilla.MarginClickEventArgs>(scintillaControl_MarginClick);
            scintillaControl.StyleNeeded += new EventHandler <Scintilla.StyleNeededEventArgs>(scintillaControl_StyleNeeded);

            mExecutionLine = 0;
            mDebugger      = (manager.GetPlugin(typeof(LuaPlugin)) as LuaPlugin).Debugger;

            MergeMenu(this.MainMenuStrip);
        }
Ejemplo n.º 19
0
 void Debugger_DebuggerDisconnected(DebugManager sender)
 {
     SetWaitingForResult(false);
 }
Ejemplo n.º 20
0
 void Debugger_DebuggerDisconnected(DebugManager sender)
 {
     m_manager.FileWatcher.FileModified -= new FileModifiedEventHandler(FileWatcher_FileModified);
     pendingFileListView.Enabled         = false;
     pendingFileListView.Items.Clear();
 }
Ejemplo n.º 21
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     SetWaitingForResult(false);
     target.SnippetResult       += new SnippetResultEventHandler(target_SnippetResult);
     target.AutocompleteOptions += new AutocompleteOptionsEventHandler(target_AutocompleteOptions);
 }
Ejemplo n.º 22
0
		public ThreadsWindow(IManager manager)
		{
			InitializeComponent();

			m_comparer = new ListViewItemComparer();

			threadListView.ListViewItemSorter = m_comparer;

			mDebugger = ((LuaPlugin)manager.GetPlugin(typeof(LuaPlugin))).Debugger;

			mDebugger.DebuggerConnected += new DebuggerConnectedEventHandler(Debugger_DebuggerConnected);
			mDebugger.DebuggerDisconnecting += new DebuggerDisconnectingEventHandler(Debugger_DebuggerDisconnecting);

			m_boldFont = new Font(threadListView.Font, FontStyle.Bold);
		}
Ejemplo n.º 23
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     pendingFileListView.Items.Clear();
     pendingFileListView.Enabled         = true;
     m_manager.FileWatcher.FileModified += new FileModifiedEventHandler(FileWatcher_FileModified);
 }
Ejemplo n.º 24
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
			target.ExMessage += new ExMessageEventHandler(target_ExCommandResult);
			UpdateMenuStatus();
		}
Ejemplo n.º 25
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
     target.ExMessage   += new ExMessageEventHandler(target_ExCommandResult);
     UpdateMenuStatus();
 }
Ejemplo n.º 26
0
		public LuaScriptView(IManager manager, Document doc)
			: base(manager, doc)
		{
			InitializeComponent();

			scintillaControl.MarginTypeN(0, (int) Scintilla.Enums.MarginType.Number);
			scintillaControl.MarginWidthN(0, scintillaControl.TextWidth((int) Scintilla.Enums.StylesCommon.LineNumber, "_99999"));
			scintillaControl.MarginWidthN(1, 12);			// Breakpoint
			scintillaControl.MarginWidthN(2, 12);			// Fold
			scintillaControl.MarginWidthN(3, 0);			// Execution point
			scintillaControl.MarginSensitiveN(0, true);
			scintillaControl.MarginSensitiveN(1, true);

			scintillaControl.MarginMaskN(1, 1 << ((int)LineMarker.Breakpoint));			// Show marker 0 in margin 1
			scintillaControl.MarginMaskN(3, 1 << ((int)LineMarker.Execution));			// Show marker 1 in margin 3

			scintillaControl.MarkerDefine((int) LineMarker.Breakpoint, Scintilla.Enums.MarkerSymbol.Circle);
			scintillaControl.MarkerSetForegroundColor((int)LineMarker.Breakpoint, 0x0000ff);
			scintillaControl.MarkerSetBackgroundColor((int)LineMarker.Breakpoint, 0x0000ff);

			scintillaControl.MarkerDefine((int)LineMarker.Execution, Scintilla.Enums.MarkerSymbol.Arrow);
			scintillaControl.MarkerSetForegroundColor((int)LineMarker.Execution, 0x00ffff);
			scintillaControl.MarkerSetBackgroundColor((int)LineMarker.Execution, 0x00ffff);

			scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderOpen, Scintilla.Enums.MarkerSymbol.CircleMinus);
			scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.Folder, Scintilla.Enums.MarkerSymbol.CirclePlus);
			scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderSub, Scintilla.Enums.MarkerSymbol.VLine);
			scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderTail, Scintilla.Enums.MarkerSymbol.LCornerCurve);
			scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderEnd, Scintilla.Enums.MarkerSymbol.CirclePlusConnected);
			scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderOpenMid, Scintilla.Enums.MarkerSymbol.CircleMinusConnected);
			scintillaControl.MarkerDefine((int)Scintilla.Enums.MarkerOutline.FolderMidTail, Scintilla.Enums.MarkerSymbol.TCornerCurve);

			scintillaControl.MarginClick += new EventHandler<Scintilla.MarginClickEventArgs>(scintillaControl_MarginClick);
			scintillaControl.StyleNeeded += new EventHandler<Scintilla.StyleNeededEventArgs>(scintillaControl_StyleNeeded);

			mExecutionLine = 0;
			mDebugger = (manager.GetPlugin(typeof(LuaPlugin)) as LuaPlugin).Debugger;

			MergeMenu(this.MainMenuStrip);
		}
Ejemplo n.º 27
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
		}
Ejemplo n.º 28
0
		void Debugger_DebuggerDisconnected(DebugManager sender)
		{
			SetWaitingForResult(false);
		}
Ejemplo n.º 29
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			SetWaitingForResult(false);
			target.SnippetResult += new SnippetResultEventHandler(target_SnippetResult);
			target.AutocompleteOptions += new AutocompleteOptionsEventHandler(target_AutocompleteOptions);
		}
Ejemplo n.º 30
0
		void Debugger_DebuggerDisconnected(DebugManager sender)
		{
			m_manager.FileWatcher.FileModified -= new FileModifiedEventHandler(FileWatcher_FileModified);
			pendingFileListView.Enabled = false;
			pendingFileListView.Items.Clear();
		}
Ejemplo n.º 31
0
 void Debugger_DebuggerConnecting(DebugManager sender, Target target)
 {
     UpdateMenuStatus();
 }
Ejemplo n.º 32
0
 void Debugger_DebuggerDisconnected(DebugManager sender)
 {
     UpdateMenuStatus();
 }
Ejemplo n.º 33
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     target.StateUpdate    += new StateUpdateEventHandler(Target_StateUpdate);
     target.VariableUpdate += new VariableUpdateEventHandler(Target_VariableUpdate);
 }
Ejemplo n.º 34
0
		void Debugger_BreakpointChanged(DebugManager sender, BreakpointDetails bkpt, bool valid)
		{
			if (PathUtils.Compare(Document.FileName, bkpt.FileName) == 0)
			{
				SetBreakpoint(bkpt.Line, valid);
			}
		}
Ejemplo n.º 35
0
		void Debugger_DebuggerConnecting(DebugManager sender, Target target)
		{
			UpdateMenuStatus();
		}
Ejemplo n.º 36
0
 void Debugger_CurrentStackFrameChanged(DebugManager sender, LuaStackFrame frame)
 {
     variablesListView.Enabled = frame != null;
 }
Ejemplo n.º 37
0
		void Debugger_DebuggerDisconnected(DebugManager sender)
		{
			UpdateMenuStatus();
		}
Ejemplo n.º 38
0
 void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
 {
     target.StateUpdate -= new StateUpdateEventHandler(target_StateUpdate);
     UpdateMenuStatus();
 }
Ejemplo n.º 39
0
		void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
		{
			target.StateUpdate -= new StateUpdateEventHandler(target_StateUpdate);
		}
Ejemplo n.º 40
0
		void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
		{
			threadListView.Items.Clear();

			target.ThreadUpdate -= new ThreadUpdateEventHandler(target_ThreadUpdate);
			target.StateUpdate -= new StateUpdateEventHandler(target_StateUpdate);
		}
Ejemplo n.º 41
0
		void Debugger_CurrentStackFrameChanged(DebugManager sender, LuaStackFrame frame)
		{
			if (frame != null && PathUtils.Compare(Document.FileName, frame.File) == 0)
			{
				ExecutionLine = frame.Line;
			}
			else
			{
				ExecutionLine = -1;
			}
		}
Ejemplo n.º 42
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
			target.ThreadUpdate += new ThreadUpdateEventHandler(target_ThreadUpdate);
		}
Ejemplo n.º 43
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     target.StateUpdate     += new StateUpdateEventHandler(target_StateUpdate);
     target.CallstackUpdate += new CallstackUpdateEventHandler(target_CallstackUpdate);
 }
Ejemplo n.º 44
0
		void Debugger_CurrentStackFrameChanged(DebugManager sender, LuaStackFrame frame)
		{
			variablesListView.Enabled = frame != null;
		}