예제 #1
0
		void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
		{
			target.VariableUpdate -= new VariableUpdateEventHandler(Target_VariableUpdate);
			target.StateUpdate -= new StateUpdateEventHandler(Target_StateUpdate);

			Clear();
		}
예제 #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();
		}
예제 #3
0
		public TargetConnectionDialog(DebugManager debugger)
		{
			mDebugger = debugger;
			mSelection = null;

			InitializeComponent();
		}
예제 #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;
		}
예제 #5
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
			target.VariableUpdate += new VariableUpdateEventHandler(target_VariableUpdate);

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

			callstackListView.Items.Clear();
		}
예제 #7
0
		public AutocompletePopup(DebugManager debugger, IWin32Window owner)
		{
			InitializeComponent();

			m_debugger = debugger;
			m_owner = owner;
			m_options = new List<ListViewItem>();
		}
예제 #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);
		}
예제 #9
0
		public void Initialise(IManager manager)
		{
			mManager = manager;

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

			mDebugger = new DebugManager(manager);
		}
예제 #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);
		}
예제 #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;
			}
		}
예제 #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);
		}
예제 #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;
		}
예제 #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();
		}
예제 #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);
		}
예제 #16
0
파일: Target.cs 프로젝트: zcnet4/lua-tilde
		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();
		}
예제 #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();
        }
예제 #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);
        }
예제 #19
0
 void Debugger_DebuggerDisconnected(DebugManager sender)
 {
     SetWaitingForResult(false);
 }
예제 #20
0
 void Debugger_DebuggerDisconnected(DebugManager sender)
 {
     m_manager.FileWatcher.FileModified -= new FileModifiedEventHandler(FileWatcher_FileModified);
     pendingFileListView.Enabled         = false;
     pendingFileListView.Items.Clear();
 }
예제 #21
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     SetWaitingForResult(false);
     target.SnippetResult       += new SnippetResultEventHandler(target_SnippetResult);
     target.AutocompleteOptions += new AutocompleteOptionsEventHandler(target_AutocompleteOptions);
 }
예제 #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);
		}
예제 #23
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     pendingFileListView.Items.Clear();
     pendingFileListView.Enabled         = true;
     m_manager.FileWatcher.FileModified += new FileModifiedEventHandler(FileWatcher_FileModified);
 }
예제 #24
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
			target.ExMessage += new ExMessageEventHandler(target_ExCommandResult);
			UpdateMenuStatus();
		}
예제 #25
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
     target.ExMessage   += new ExMessageEventHandler(target_ExCommandResult);
     UpdateMenuStatus();
 }
예제 #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);
		}
예제 #27
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
		}
예제 #28
0
		void Debugger_DebuggerDisconnected(DebugManager sender)
		{
			SetWaitingForResult(false);
		}
예제 #29
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			SetWaitingForResult(false);
			target.SnippetResult += new SnippetResultEventHandler(target_SnippetResult);
			target.AutocompleteOptions += new AutocompleteOptionsEventHandler(target_AutocompleteOptions);
		}
예제 #30
0
		void Debugger_DebuggerDisconnected(DebugManager sender)
		{
			m_manager.FileWatcher.FileModified -= new FileModifiedEventHandler(FileWatcher_FileModified);
			pendingFileListView.Enabled = false;
			pendingFileListView.Items.Clear();
		}
예제 #31
0
 void Debugger_DebuggerConnecting(DebugManager sender, Target target)
 {
     UpdateMenuStatus();
 }
예제 #32
0
 void Debugger_DebuggerDisconnected(DebugManager sender)
 {
     UpdateMenuStatus();
 }
예제 #33
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     target.StateUpdate    += new StateUpdateEventHandler(Target_StateUpdate);
     target.VariableUpdate += new VariableUpdateEventHandler(Target_VariableUpdate);
 }
예제 #34
0
		void Debugger_BreakpointChanged(DebugManager sender, BreakpointDetails bkpt, bool valid)
		{
			if (PathUtils.Compare(Document.FileName, bkpt.FileName) == 0)
			{
				SetBreakpoint(bkpt.Line, valid);
			}
		}
예제 #35
0
		void Debugger_DebuggerConnecting(DebugManager sender, Target target)
		{
			UpdateMenuStatus();
		}
예제 #36
0
 void Debugger_CurrentStackFrameChanged(DebugManager sender, LuaStackFrame frame)
 {
     variablesListView.Enabled = frame != null;
 }
예제 #37
0
		void Debugger_DebuggerDisconnected(DebugManager sender)
		{
			UpdateMenuStatus();
		}
예제 #38
0
 void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
 {
     target.StateUpdate -= new StateUpdateEventHandler(target_StateUpdate);
     UpdateMenuStatus();
 }
예제 #39
0
		void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
		{
			target.StateUpdate -= new StateUpdateEventHandler(target_StateUpdate);
		}
예제 #40
0
		void Debugger_DebuggerDisconnecting(DebugManager sender, Target target)
		{
			threadListView.Items.Clear();

			target.ThreadUpdate -= new ThreadUpdateEventHandler(target_ThreadUpdate);
			target.StateUpdate -= new StateUpdateEventHandler(target_StateUpdate);
		}
예제 #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;
			}
		}
예제 #42
0
		void Debugger_DebuggerConnected(DebugManager sender, Target target)
		{
			target.StateUpdate += new StateUpdateEventHandler(target_StateUpdate);
			target.ThreadUpdate += new ThreadUpdateEventHandler(target_ThreadUpdate);
		}
예제 #43
0
 void Debugger_DebuggerConnected(DebugManager sender, Target target)
 {
     target.StateUpdate     += new StateUpdateEventHandler(target_StateUpdate);
     target.CallstackUpdate += new CallstackUpdateEventHandler(target_CallstackUpdate);
 }
예제 #44
0
		void Debugger_CurrentStackFrameChanged(DebugManager sender, LuaStackFrame frame)
		{
			variablesListView.Enabled = frame != null;
		}