diff --git a/src/AddIns/Misc/SubversionAddIn/Project/Resources/DiffPanel.xfrm b/src/AddIns/Misc/SubversionAddIn/Project/Resources/DiffPanel.xfrm deleted file mode 100644 index 2ebbcc31b9..0000000000 --- a/src/AddIns/Misc/SubversionAddIn/Project/Resources/DiffPanel.xfrm +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.Designer.cs b/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.Designer.cs new file mode 100644 index 0000000000..899bafa625 --- /dev/null +++ b/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.Designer.cs @@ -0,0 +1,254 @@ +// +// +// +// +// $Revision$ +// +namespace ICSharpCode.Svn +{ + partial class DiffPanel : System.Windows.Forms.UserControl + { + /// + /// Designer variable used to keep track of non-visual components. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Disposes resources used by the control. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing) { + if (components != null) { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + /// + /// This method is required for Windows Forms designer support. + /// Do not change the method contents inside the source code editor. The Forms designer might + /// not be able to load this method if it was changed manually. + /// + private void InitializeComponent() + { + System.Windows.Forms.ColumnHeader revisionColumnHeader; + System.Windows.Forms.ColumnHeader columnHeader1; + this.mainSplitContainer = new System.Windows.Forms.SplitContainer(); + this.topSplitContainer = new System.Windows.Forms.SplitContainer(); + this.leftListView = new System.Windows.Forms.ListView(); + this.authorColumnHeader = new System.Windows.Forms.ColumnHeader(); + this.dateColumnHeader = new System.Windows.Forms.ColumnHeader(); + this.commentColumnHeader = new System.Windows.Forms.ColumnHeader(); + this.label1 = new System.Windows.Forms.Label(); + this.rightListView = new System.Windows.Forms.ListView(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.label2 = new System.Windows.Forms.Label(); + this.diffViewPanel = new System.Windows.Forms.Panel(); + this.diffLabel = new System.Windows.Forms.Label(); + revisionColumnHeader = new System.Windows.Forms.ColumnHeader(); + columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.mainSplitContainer.Panel1.SuspendLayout(); + this.mainSplitContainer.Panel2.SuspendLayout(); + this.mainSplitContainer.SuspendLayout(); + this.topSplitContainer.Panel1.SuspendLayout(); + this.topSplitContainer.Panel2.SuspendLayout(); + this.topSplitContainer.SuspendLayout(); + this.SuspendLayout(); + // + // revisionColumnHeader + // + revisionColumnHeader.Text = "Revision"; + // + // columnHeader1 + // + columnHeader1.Text = "Revision"; + // + // mainSplitContainer + // + this.mainSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + this.mainSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.mainSplitContainer.Location = new System.Drawing.Point(0, 0); + this.mainSplitContainer.Name = "mainSplitContainer"; + this.mainSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // mainSplitContainer.Panel1 + // + this.mainSplitContainer.Panel1.Controls.Add(this.topSplitContainer); + this.mainSplitContainer.Panel1MinSize = 75; + // + // mainSplitContainer.Panel2 + // + this.mainSplitContainer.Panel2.Controls.Add(this.diffViewPanel); + this.mainSplitContainer.Panel2.Controls.Add(this.diffLabel); + this.mainSplitContainer.Panel2MinSize = 75; + this.mainSplitContainer.Size = new System.Drawing.Size(600, 400); + this.mainSplitContainer.SplitterDistance = 177; + this.mainSplitContainer.TabIndex = 0; + // + // topSplitContainer + // + this.topSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + this.topSplitContainer.Location = new System.Drawing.Point(0, 0); + this.topSplitContainer.Name = "topSplitContainer"; + // + // topSplitContainer.Panel1 + // + this.topSplitContainer.Panel1.Controls.Add(this.leftListView); + this.topSplitContainer.Panel1.Controls.Add(this.label1); + this.topSplitContainer.Panel1MinSize = 75; + // + // topSplitContainer.Panel2 + // + this.topSplitContainer.Panel2.Controls.Add(this.rightListView); + this.topSplitContainer.Panel2.Controls.Add(this.label2); + this.topSplitContainer.Panel2MinSize = 75; + this.topSplitContainer.Size = new System.Drawing.Size(600, 177); + this.topSplitContainer.SplitterDistance = 297; + this.topSplitContainer.TabIndex = 0; + // + // leftListView + // + this.leftListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.leftListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + revisionColumnHeader, + this.authorColumnHeader, + this.dateColumnHeader, + this.commentColumnHeader}); + this.leftListView.FullRowSelect = true; + this.leftListView.GridLines = true; + this.leftListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.leftListView.HideSelection = false; + this.leftListView.Location = new System.Drawing.Point(3, 25); + this.leftListView.MultiSelect = false; + this.leftListView.Name = "leftListView"; + this.leftListView.Size = new System.Drawing.Size(291, 149); + this.leftListView.TabIndex = 1; + this.leftListView.UseCompatibleStateImageBehavior = false; + this.leftListView.View = System.Windows.Forms.View.Details; + this.leftListView.SelectedIndexChanged += new System.EventHandler(this.LeftListViewSelectedIndexChanged); + // + // authorColumnHeader + // + this.authorColumnHeader.Text = "Author"; + this.authorColumnHeader.Width = 77; + // + // dateColumnHeader + // + this.dateColumnHeader.Text = "Date"; + this.dateColumnHeader.Width = 82; + // + // commentColumnHeader + // + this.commentColumnHeader.Text = "Comment"; + this.commentColumnHeader.Width = 144; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(3, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(100, 23); + this.label1.TabIndex = 0; + this.label1.Text = "Diff &from:"; + // + // rightListView + // + this.rightListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.rightListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + columnHeader1, + this.columnHeader2, + this.columnHeader3, + this.columnHeader4}); + this.rightListView.FullRowSelect = true; + this.rightListView.GridLines = true; + this.rightListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.rightListView.HideSelection = false; + this.rightListView.Location = new System.Drawing.Point(5, 25); + this.rightListView.MultiSelect = false; + this.rightListView.Name = "rightListView"; + this.rightListView.Size = new System.Drawing.Size(291, 149); + this.rightListView.TabIndex = 2; + this.rightListView.UseCompatibleStateImageBehavior = false; + this.rightListView.View = System.Windows.Forms.View.Details; + this.rightListView.SelectedIndexChanged += new System.EventHandler(this.RightListViewSelectedIndexChanged); + // + // columnHeader2 + // + this.columnHeader2.Text = "Author"; + this.columnHeader2.Width = 77; + // + // columnHeader3 + // + this.columnHeader3.Text = "Date"; + this.columnHeader3.Width = 82; + // + // columnHeader4 + // + this.columnHeader4.Text = "Comment"; + this.columnHeader4.Width = 144; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(3, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(100, 23); + this.label2.TabIndex = 1; + this.label2.Text = "Diff &to:"; + // + // diffViewPanel + // + this.diffViewPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.diffViewPanel.Location = new System.Drawing.Point(3, 21); + this.diffViewPanel.Name = "diffViewPanel"; + this.diffViewPanel.Size = new System.Drawing.Size(594, 195); + this.diffViewPanel.TabIndex = 1; + // + // diffLabel + // + this.diffLabel.Location = new System.Drawing.Point(3, 6); + this.diffLabel.Name = "diffLabel"; + this.diffLabel.Size = new System.Drawing.Size(100, 23); + this.diffLabel.TabIndex = 0; + this.diffLabel.Text = "Diff:"; + // + // DiffPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.mainSplitContainer); + this.Name = "DiffPanel"; + this.Size = new System.Drawing.Size(600, 400); + this.mainSplitContainer.Panel1.ResumeLayout(false); + this.mainSplitContainer.Panel2.ResumeLayout(false); + this.mainSplitContainer.ResumeLayout(false); + this.topSplitContainer.Panel1.ResumeLayout(false); + this.topSplitContainer.Panel2.ResumeLayout(false); + this.topSplitContainer.ResumeLayout(false); + this.ResumeLayout(false); + } + private System.Windows.Forms.Label diffLabel; + private System.Windows.Forms.Panel diffViewPanel; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ListView rightListView; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ColumnHeader commentColumnHeader; + private System.Windows.Forms.ColumnHeader dateColumnHeader; + private System.Windows.Forms.ColumnHeader authorColumnHeader; + private System.Windows.Forms.ListView leftListView; + private System.Windows.Forms.SplitContainer topSplitContainer; + private System.Windows.Forms.SplitContainer mainSplitContainer; + } +} diff --git a/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs b/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs deleted file mode 100644 index 22eea02728..0000000000 --- a/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs +++ /dev/null @@ -1,135 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.IO; -using System.Text; -using System.Threading; -using System.Windows.Forms; - -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop.Gui; -using ICSharpCode.SharpDevelop.Gui.XmlForms; -using NSvn.Common; -using NSvn.Core; - -namespace ICSharpCode.Svn -{ - /// - /// Description of InfoPanel. - /// - public class DiffPanel : BaseSharpDevelopUserControl - { - IViewContent viewContent; - - public DiffPanel(IViewContent viewContent) - { - this.viewContent = viewContent; - SetupFromXmlStream(GetType().Assembly.GetManifestResourceStream("ICSharpCode.Svn.Resources.DiffPanel.xfrm")); - Get("fromRevision").SelectedIndexChanged += new EventHandler(ShowDiff); - Get("toRevision").SelectedIndexChanged += new EventHandler(ShowDiff); - - ControlDictionary["diffRichTextBox"].Enabled = false; - ControlDictionary["diffRichTextBox"].Font = ResourceService.DefaultMonospacedFont; - ControlDictionary["splitter1"].Height = 3; - - ListViewItem newItem; - newItem = new ListViewItem(new string[] { "Base", "", "", "" }); - newItem.Tag = Revision.Base; - Get("fromRevision").Items.Add(newItem); - newItem.Selected = true; - newItem = new ListViewItem(new string[] { "Work", "", "", "" }); - newItem.Tag = Revision.Working; - Get("toRevision").Items.Add(newItem); - } - - protected override void OnLoad(EventArgs e) - { - // fix sizing problems - Get("toRevision").Width -= 13; - ControlDictionary["fromRevisionPanel"].Width = ControlDictionary["topPanel"].Width / 2 - 2; - } - - string output = null; - string fileName = null; - Revision fromRevision; - Revision toRevision; - - void DoDiffOperation() - { - output = null; - MemoryStream outStream = new MemoryStream(); - MemoryStream errStream = new MemoryStream(); - SvnClient.Instance.Client.Diff(new string [] {} , - fileName, - fromRevision, - fileName, - toRevision, - Recurse.None, - false, - true, - outStream, - errStream); - output = Encoding.Default.GetString(outStream.ToArray()); - WorkbenchSingleton.SafeThreadCall(SetOutput); - } - - void SetOutput() - { - ControlDictionary["diffRichTextBox"].Enabled = true; - ControlDictionary["diffLabel"].Text = "Diff from revision " + fromRevision + " to " + toRevision + ":"; - ControlDictionary["diffRichTextBox"].Text = output; - } - - void Disable() - { - ControlDictionary["diffRichTextBox"].Enabled = false; - ControlDictionary["diffLabel"].Text = "Diff:"; - ControlDictionary["diffRichTextBox"].Text = ""; - } - - void ShowDiff(object sender, EventArgs e) - { - Disable(); - - if (Get("fromRevision").SelectedItems.Count == 0 || Get("toRevision").SelectedItems.Count == 0 ) { - return; - } - - fromRevision = Get("fromRevision").SelectedItems[0].Tag as Revision; - toRevision = Get("toRevision").SelectedItems[0].Tag as Revision; - fileName = Path.GetFullPath(viewContent.FileName); - - if (fromRevision.ToString() == toRevision.ToString()) { - output = ""; - } else { - SvnClient.Instance.OperationStart("Diff", new ThreadStart(DoDiffOperation)); - } - } - - public void AddLogMessage(LogMessage logMessage) - { - ListViewItem newItem = new ListViewItem(new string[] { - logMessage.Revision.ToString(), - logMessage.Author, - logMessage.Date.ToString(), - logMessage.Message - }); - newItem.Tag = Revision.FromNumber(logMessage.Revision); - Get("fromRevision").Items.Add(newItem); - - ListViewItem newItem2 = new ListViewItem(new string[] { - logMessage.Revision.ToString(), - logMessage.Author, - logMessage.Date.ToString(), - logMessage.Message - }); - newItem2.Tag = Revision.FromNumber(logMessage.Revision); - Get("toRevision").Items.Add(newItem2); - } - } -} diff --git a/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.resx b/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.resx new file mode 100644 index 0000000000..8c1cd0125d --- /dev/null +++ b/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + False + + \ No newline at end of file diff --git a/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/HistoryViewPanel.cs b/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/HistoryViewPanel.cs index 8da255d401..b1abf57a1e 100644 --- a/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/HistoryViewPanel.cs +++ b/src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/HistoryViewPanel.cs @@ -59,11 +59,13 @@ namespace ICSharpCode.Svn diffTabPage.Controls.Add(diffPanel); mainTab.TabPages.Add(diffTabPage); + /* TabPage conflictTabPage = new TabPage("Conflicts"); Label todoLabel = new Label(); todoLabel.Text = "TODO :)"; conflictTabPage.Controls.Add(todoLabel); mainTab.TabPages.Add(conflictTabPage); + */ Controls.Add(mainTab); diff --git a/src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj b/src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj index 5a183c8841..906d8164af 100644 --- a/src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj +++ b/src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj @@ -54,7 +54,6 @@ - @@ -72,9 +71,6 @@ Form - - UserControl - @@ -96,6 +92,13 @@ Configuration\GlobalAssemblyInfo.cs + + DiffPanel.cs + + + + DiffPanel.cs + @@ -137,6 +140,11 @@ LibDB44.dll PreserveNewest + + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} + ICSharpCode.TextEditor + False + \ No newline at end of file diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj b/src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj index cec0124c19..2dc10ee0ce 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj +++ b/src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj @@ -201,6 +201,7 @@ Configuration\GlobalAssemblyInfo.cs + diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Resources/Patch-Mode.xshd b/src/Libraries/ICSharpCode.TextEditor/Project/Resources/Patch-Mode.xshd new file mode 100644 index 0000000000..f21f1fee54 --- /dev/null +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Resources/Patch-Mode.xshd @@ -0,0 +1,38 @@ + + + + + + + + + ~!%^*()-+=|\#/{}[]:;"'<> , .? + + + Index: + + + == + + + --- + + + +++ + + + @@ + + + - + + + + + + + + + + + + diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Resources/SyntaxModes.xml b/src/Libraries/ICSharpCode.TextEditor/Project/Resources/SyntaxModes.xml index 31799a6b71..e5cc722736 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Resources/SyntaxModes.xml +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Resources/SyntaxModes.xml @@ -35,6 +35,10 @@ name = "JavaScript" extensions = ".js"/> + +