Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This patch file was generated by NetBeans IDE
- # Following Index: paths are relative to: \FD3\External\Plugins\TaskListPanel
- # This patch can be applied using context Tools: Patch action on respective folder.
- # It uses platform neutral UTF-8 encoding and \n newlines.
- # Above lines and this line are ignored by the patching process.
- Index: PluginUI.cs
- --- PluginUI.cs Base (BASE)
- +++ PluginUI.cs Locally Modified (Based On LOCAL)
- @@ -33,10 +33,12 @@
- private Regex todoParser = null;
- private Boolean isEnabled = false;
- private Boolean refreshEnabled = false;
- + private Boolean copyEnabled = false;
- private Boolean firstExecutionCompleted = false;
- private Dictionary<String, DateTime> filesCache;
- private ContextMenuStrip contextMenu;
- private ToolStripMenuItem refreshButton;
- + private ToolStripMenuItem copyButton;
- private ToolStripLabel toolStripLabel;
- private ListViewSorter columnSorter;
- private StatusStrip statusStrip;
- @@ -68,7 +70,7 @@
- {
- this.groups.AddRange(settings.GroupValues);
- String pattern = String.Join("|", settings.GroupValues);
- - this.todoParser = new Regex(@"(//|/\*\*?|\*)[\t ]*(" + pattern + @")[:|\t ]*([^\r|\n|\*\*/]*)", RegexOptions.Multiline);
- + this.todoParser = new Regex(@"(//|/\*\*?|\*)[\t ]*(" + pattern + @")[:|\t ]*(.*?)(?:\r|\n|\**\*/)", RegexOptions.Multiline);
- this.isEnabled = true;
- this.InitGraphics();
- }
- @@ -201,10 +203,17 @@
- this.contextMenu = new ContextMenuStrip();
- this.contextMenu.Font = PluginBase.Settings.DefaultFont;
- this.statusStrip.Font = PluginBase.Settings.DefaultFont;
- +
- Image image = PluginBase.MainForm.FindImage("66");
- String label = TextHelper.GetString("FlashDevelop.Label.Refresh");
- this.refreshButton = new ToolStripMenuItem(label, image, new EventHandler(this.RefreshButtonClick));
- this.contextMenu.Items.Add(this.refreshButton);
- +
- + image = PluginBase.MainForm.FindImage("278");
- + label = TextHelper.GetString("FlashDevelop.Label.Copy");
- + this.copyButton = new ToolStripMenuItem(label, image, new EventHandler(this.CopyButtonClick));
- + this.contextMenu.Items.Add(this.copyButton);
- +
- this.listView.ContextMenuStrip = this.contextMenu;
- }
- @@ -237,7 +246,7 @@
- {
- this.groups.AddRange(settings.GroupValues);
- String pattern = String.Join("|", settings.GroupValues);
- - this.todoParser = new Regex(@"(//|/\*\*?|\*)[\t ]*(" + pattern + @")[:|\t ]*([^\r|\n|\*\*/]*)", RegexOptions.Multiline);
- + this.todoParser = new Regex(@"(//|/\*\*?|\*)[\t ]*(" + pattern + @")[:|\t ]*(.*?)(?:\r|\n|\**\*/)", RegexOptions.Multiline);
- this.isEnabled = true;
- this.InitGraphics();
- }
- @@ -266,6 +275,19 @@
- }
- /// <summary>
- + /// While parsing project files we need to disable the copy button
- + /// </summary>
- + public Boolean CopyEnabled
- + {
- + get { return this.copyEnabled; }
- + set
- + {
- + this.copyEnabled = value;
- + this.copyButton.Enabled = value;
- + }
- + }
- +
- + /// <summary>
- /// Stops the parse timer if not enabled.
- /// </summary>
- public void Terminate()
- @@ -376,6 +398,7 @@
- if (this.isEnabled && PluginBase.CurrentProject != null)
- {
- this.RefreshEnabled = false;
- + this.CopyEnabled = false;
- // stop current exploration
- if (this.parseTimer.Enabled) this.parseTimer.Stop();
- @@ -428,6 +451,37 @@
- }
- /// <summary>
- + /// Copies the list view contents to the clipboard.
- + /// </summary>
- + public void CopyToClipboard()
- + {
- + StringBuilder content = new StringBuilder();
- +
- + foreach(ColumnHeader header in this.listView.Columns)
- + {
- + content.Append(header.Text.Trim() + "\t");
- + }
- +
- + foreach(ListViewGroup group in this.listView.Groups)
- + {
- + content.AppendLine();
- +
- + foreach(ListViewItem item in group.Items)
- + {
- + content.AppendLine();
- + content.Append(item.Text.Trim());
- +
- + for(int i = 1; i < item.SubItems.Count; i ++)
- + {
- + content.Append("\t" + item.SubItems[i].Text.Trim());
- + }
- + }
- + }
- +
- + Clipboard.SetText(content.ToString());
- + }
- +
- + /// <summary>
- /// At startup parse all opened files
- /// </summary>
- private void ParseNextFile()
- @@ -482,7 +536,10 @@
- {
- this.parseTimer.Enabled = false;
- this.parseTimer.Stop();
- +
- this.RefreshEnabled = true;
- + this.CopyEnabled = true;
- +
- this.toolStripLabel.Text = "";
- if (this.firstExecutionCompleted == false)
- {
- @@ -685,6 +742,17 @@
- }
- /// <summary>
- + /// Clicked on "Copy" button. This will copy the list view contents to the cliboard
- + /// </summary>
- + private void CopyButtonClick(Object sender, EventArgs e)
- + {
- + if (this.isEnabled)
- + {
- + CopyToClipboard();
- + }
- + }
- +
- + /// <summary>
- /// When user stop mouse movement parse again this file
- /// </summary>
- private void SciControlDwellStart(ScintillaControl sci, int position)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement