public void SetTemporaryBreakPoint(string filefullpath, int line)
        {
            ClearTemporaryBreakPoint();

            m_TemporaryBreakPointInfo = new BreakPointInfo(filefullpath, line, string.Empty, false, true);

            List <BreakPointInfo> bpList = new List <BreakPointInfo>(new BreakPointInfo[] { m_TemporaryBreakPointInfo });

            PluginMain.debugManager.FlashInterface.UpdateBreakpoints(bpList);
        }
        public void ClearTemporaryBreakPoint()
        {
            if (m_TemporaryBreakPointInfo != null)
            {
                if (m_TemporaryBreakPointInfo.Location != null)
                {
                    m_TemporaryBreakPointInfo.IsDeleted = true;

                    List <BreakPointInfo> bpList = new List <BreakPointInfo>(new BreakPointInfo[] { m_TemporaryBreakPointInfo });

                    PluginMain.debugManager.FlashInterface.UpdateBreakpoints(bpList);
                }

                m_TemporaryBreakPointInfo = null;
            }
        }
		public void SetTemporaryBreakPoint(string filefullpath, int line)
		{
			ClearTemporaryBreakPoint();

			m_TemporaryBreakPointInfo = new BreakPointInfo(filefullpath, line, string.Empty, false, true);

			List<BreakPointInfo> bpList = new List<BreakPointInfo>(new BreakPointInfo[] { m_TemporaryBreakPointInfo });

			PluginMain.debugManager.FlashInterface.UpdateBreakpoints(bpList);
		}
		public void ClearTemporaryBreakPoint()
		{
			if (m_TemporaryBreakPointInfo != null)
			{
				if (m_TemporaryBreakPointInfo.Location != null)
				{
					m_TemporaryBreakPointInfo.IsDeleted = true;

					List<BreakPointInfo> bpList = new List<BreakPointInfo>(new BreakPointInfo[] { m_TemporaryBreakPointInfo });

					PluginMain.debugManager.FlashInterface.UpdateBreakpoints(bpList);
				}

				m_TemporaryBreakPointInfo = null;
			}
		}
		public Boolean ShouldBreak(SourceFile file, int line)
		{
			String localPath = PluginMain.debugManager.GetLocalPath(file);

			if (localPath == null)
			{
				return false;
			}

			if (m_TemporaryBreakPointInfo != null)
			{
				if (m_TemporaryBreakPointInfo.FileFullPath == localPath &&
					m_TemporaryBreakPointInfo.Line == (line - 1))
				{
					m_TemporaryBreakPointInfo.IsDeleted = true;

					List<BreakPointInfo> bpList = new List<BreakPointInfo>();
					bpList.Add(m_TemporaryBreakPointInfo);

					PluginMain.debugManager.FlashInterface.UpdateBreakpoints(bpList);

					m_TemporaryBreakPointInfo = null;

					return true;
				}
			}

			int index = GetBreakPointIndex(localPath, line - 1);

			if (index >= 0)
			{
				BreakPointInfo bpInfo = m_BreakPointList[index];

				if (bpInfo.ParsedExpression != null)
				{
					ExpressionContext context = new ExpressionContext(PluginMain.debugManager.FlashInterface.Session);

					try
					{
						object val = bpInfo.ParsedExpression.evaluate(context);

						if (val is Boolean)
						{
							return (Boolean)val;
						}
						else if (val is Int32)
						{
							return (Int32)val != 0;
						}
					}
					catch (ExpressionException e)
					{
						MessageBox.Show(e.getLocalizedMessage(), PluginCore.Localization.TextHelper.GetString("FlashDevelop.Title.ErrorDialog"));
						return true;
					}
				}
				else
				{
					return true;
				}
			}

			return false;
		}
        public Boolean ShouldBreak(SourceFile file, int line)
        {
            String localPath = PluginMain.debugManager.GetLocalPath(file);

            if (localPath == null)
            {
                return(false);
            }

            if (m_TemporaryBreakPointInfo != null)
            {
                if (m_TemporaryBreakPointInfo.FileFullPath == localPath &&
                    m_TemporaryBreakPointInfo.Line == (line - 1))
                {
                    m_TemporaryBreakPointInfo.IsDeleted = true;

                    List <BreakPointInfo> bpList = new List <BreakPointInfo>();
                    bpList.Add(m_TemporaryBreakPointInfo);

                    PluginMain.debugManager.FlashInterface.UpdateBreakpoints(bpList);

                    m_TemporaryBreakPointInfo = null;

                    return(true);
                }
            }

            int index = GetBreakPointIndex(localPath, line - 1);

            if (index >= 0)
            {
                BreakPointInfo bpInfo = m_BreakPointList[index];

                if (bpInfo.ParsedExpression != null)
                {
                    ExpressionContext context = new ExpressionContext(PluginMain.debugManager.FlashInterface.Session);

                    try
                    {
                        object val = bpInfo.ParsedExpression.evaluate(context);

                        if (val is Boolean)
                        {
                            return((Boolean)val);
                        }
                        else if (val is Int32)
                        {
                            return((Int32)val != 0);
                        }
                    }
                    catch (ExpressionException e)
                    {
                        MessageBox.Show(e.getLocalizedMessage(), PluginCore.Localization.TextHelper.GetString("FlashDevelop.Title.ErrorDialog"));
                        return(true);
                    }
                }
                else
                {
                    return(true);
                }
            }

            return(false);
        }