public ListItem(string description, ProjectItem projectItem, int line, int column) { Description = description; ProjectItem = projectItem; Line = line; Column = column; }
/// <summary> /// Creates and adds an item using the specified data. /// </summary> /// <param name="description">The item description.</param> /// <param name="projectItem">The name of the project item.</param> /// <param name="line">The source code line.</param> /// <param name="column">The source code column.</param> /// <returns>The created ListItem.</returns> public virtual ListItem AddItem(string description, ProjectItem projectItem, int line, int column) { ListItem item = new ListItem(description, projectItem, line, column); AddItem(item); return item; }
/// <summary> /// Restores the project state from the specified memento. /// </summary> /// <param name="memento">The memento to restore.</param> public void SetMemento(ProjectMemento memento) { Items.Clear(); MainItem = null; foreach (var i in memento.Items) { var item = new ProjectItem(); item.Project = this; item.RelativePath = i; if (!File.Exists(item.Path)) { File.WriteAllText(item.Path, string.Empty); } Items.Add(item); if (i == memento.MainItem) { MainItem = item; } } SetPlatformByName(memento.Platform); }
/// <summary> /// Opens the specified project item. /// </summary> /// <param name="item">The project item to open.</param> public virtual void Open(ProjectItem item) { Item = item; Open(item.Path); }
protected void OnBreadpointRemoved(ProjectItem item, int line) { if (BreadpointRemoved != null) BreadpointRemoved(item, line); }
protected void OnBreakpointAdded(ProjectItem item, int line) { if (BreakpointAdded != null) BreakpointAdded(item, line); }
/// <summary> /// Shows the editor for the specified ProjectItem. /// </summary> /// <param name="item">The item to show the editor for.</param> public void ShowEditorFor(ProjectItem item) { if (item == null) return; var e = item.GetEditorForm(); if (e.Visible) { e.Activate(); } else { e.Show(dock, DockState.Document); } }