Example #1
0
            /// <summary>
            /// Gets the editor for the specified item if it is already instanced.
            /// </summary>
            /// <param name="item">The project item to get an editor for.</param>
            /// <returns>The editor for the specified item if it exists, otherwise null.</returns>
            public AbstractEditorForm GetEditorFormIfExists(ProjectItem item)
            {
                AbstractEditorForm ed = null;

                EditorForms.TryGetValue(item.Path, out ed);
                return(ed);
            }
Example #2
0
            /// <summary>
            /// Initializes the specified editor form.
            /// </summary>
            /// <param name="form">The editor form to initialize.</param>
            public override void InitializeEditor(AbstractEditorForm form)
            {
                base.InitializeEditor(form);

                // Set breakpoints.
                var l = new List <int>();

                foreach (var b in Platform.DebuggerController.BreakpointController.Breakpoints)
                {
                    var bp = b as BreakpointController.LineBreakpointDefinition;
                    if (bp != null && bp.ProjectItem == form.Item)
                    {
                        l.Add(bp.Line);
                    }
                }
                form.Breakpoints = l;

                // Connect breakpoint events.
                form.BreakpointAdded   += new AbstractEditorForm.BreakpointToggledHandler(Platform.DebuggerController.BreakpointController.AddLineBreakpoint);
                form.BreadpointRemoved += new AbstractEditorForm.BreakpointToggledHandler(Platform.DebuggerController.BreakpointController.RemoveLineBreakpoint);
            }
Example #3
0
 /// <summary>
 /// Initializes the specified editor form.
 /// </summary>
 /// <param name="form">The editor form to initialize.</param>
 public virtual void InitializeEditor(AbstractEditorForm form)
 {
     form.IsReadOnly = _editorsReadOnly;
 }
Example #4
0
            /// <summary>
            /// Initializes the specified editor form.
            /// </summary>
            /// <param name="form">The editor form to initialize.</param>
            public override void InitializeEditor(AbstractEditorForm form)
            {
                base.InitializeEditor(form);

                // Set breakpoints.
                var l = new List<int>();
                foreach (var b in Platform.DebuggerController.BreakpointController.Breakpoints)
                {
                    var bp = b as BreakpointController.LineBreakpointDefinition;
                    if (bp != null && bp.ProjectItem == form.Item)
                    {
                        l.Add(bp.Line);
                    }
                }
                form.Breakpoints = l;

                // Connect breakpoint events.
                form.BreakpointAdded += new AbstractEditorForm.BreakpointToggledHandler(Platform.DebuggerController.BreakpointController.AddLineBreakpoint);
                form.BreadpointRemoved += new AbstractEditorForm.BreakpointToggledHandler(Platform.DebuggerController.BreakpointController.RemoveLineBreakpoint);
            }
Example #5
0
 /// <summary>
 /// Initializes the specified editor form.
 /// </summary>
 /// <param name="form">The editor form to initialize.</param>
 public virtual void InitializeEditor(AbstractEditorForm form)
 {
     form.IsReadOnly = _editorsReadOnly;
 }