From 47aec7d2a551b7892aa97be4f567de5c8d76a13f Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 2 Sep 2010 18:02:15 +0200 Subject: [PATCH 01/19] FileChangeWatcher: Handle exceptions that occur if the directory to be watched was deleted. --- .../Project/Src/Services/File/FileChangeWatcher.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Main/Base/Project/Src/Services/File/FileChangeWatcher.cs b/src/Main/Base/Project/Src/Services/File/FileChangeWatcher.cs index c29dc91ddb..ff86cd3e57 100644 --- a/src/Main/Base/Project/Src/Services/File/FileChangeWatcher.cs +++ b/src/Main/Base/Project/Src/Services/File/FileChangeWatcher.cs @@ -146,6 +146,18 @@ namespace ICSharpCode.SharpDevelop watcher.Dispose(); } watcher = null; + } catch (FileNotFoundException) { + // can occur if directory was deleted externally + if (watcher != null) { + watcher.Dispose(); + } + watcher = null; + } catch (ArgumentException) { + // can occur if parent directory was deleted externally + if (watcher != null) { + watcher.Dispose(); + } + watcher = null; } } From 6c1a9504a9bb931a95927c52da026db23efa0c5e Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 2 Sep 2010 19:30:12 +0200 Subject: [PATCH 02/19] Fixed bug in TextDocument.GetOffset when column is 0 --- .../Document/LineManagerTests.cs | 36 +++++++++++++++++++ .../Document/TextDocument.cs | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Document/LineManagerTests.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Document/LineManagerTests.cs index 192c154019..be967381d2 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Document/LineManagerTests.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Document/LineManagerTests.cs @@ -495,5 +495,41 @@ namespace ICSharpCode.AvalonEdit.Document "x", "c"); } + + [Test] + public void GetOffset() + { + document.Text = "Hello,\nWorld!"; + Assert.AreEqual(0, document.GetOffset(1, 1)); + Assert.AreEqual(1, document.GetOffset(1, 2)); + Assert.AreEqual(5, document.GetOffset(1, 6)); + Assert.AreEqual(6, document.GetOffset(1, 7)); + Assert.AreEqual(7, document.GetOffset(2, 1)); + Assert.AreEqual(8, document.GetOffset(2, 2)); + Assert.AreEqual(12, document.GetOffset(2, 6)); + Assert.AreEqual(13, document.GetOffset(2, 7)); + } + + [Test] + public void GetOffsetIgnoreNegativeColumns() + { + document.Text = "Hello,\nWorld!"; + Assert.AreEqual(0, document.GetOffset(1, -1)); + Assert.AreEqual(0, document.GetOffset(1, -100)); + Assert.AreEqual(0, document.GetOffset(1, 0)); + Assert.AreEqual(7, document.GetOffset(2, -1)); + Assert.AreEqual(7, document.GetOffset(2, -100)); + Assert.AreEqual(7, document.GetOffset(2, 0)); + } + + [Test] + public void GetOffsetIgnoreTooHighColumns() + { + document.Text = "Hello,\nWorld!"; + Assert.AreEqual(6, document.GetOffset(1, 8)); + Assert.AreEqual(6, document.GetOffset(1, 100)); + Assert.AreEqual(13, document.GetOffset(2, 8)); + Assert.AreEqual(13, document.GetOffset(2, 100)); + } } } diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs index 1f63816335..5913667065 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs @@ -664,7 +664,7 @@ namespace ICSharpCode.AvalonEdit.Document public int GetOffset(int line, int column) { DocumentLine docLine = GetLineByNumber(line); - if (column < 0) + if (column <= 0) return docLine.Offset; if (column > docLine.Length) return docLine.EndOffset; From fde21e0f16c87576c7b1853ab9e500dde9850d9f Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 2 Sep 2010 18:30:17 +0200 Subject: [PATCH 03/19] AvalonEdit: Add TextDocument constructor that takes ITextSource. This allows creating a document from a RopeTextDocument or from another TextDocument while sharing unchanged parts of the document text. --- .../Document/TextDocument.cs | 25 +++++++++++++++++++ .../ICSharpCode.AvalonEdit/TextEditor.cs | 14 +++++------ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs index 5913667065..7d4c0799da 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs @@ -105,6 +105,31 @@ namespace ICSharpCode.AvalonEdit.Document undoStack.AttachToDocument(this); FireChangeEvents(); } + + /// + /// Create a new text document with the specified initial text. + /// + public TextDocument(ITextSource initialText) + : this(GetTextFromTextSource(initialText)) + { + } + + // gets the text from a text source, directly retrieving the underlying rope where possible + static IEnumerable GetTextFromTextSource(ITextSource textSource) + { + if (textSource == null) + throw new ArgumentNullException("textSource"); + + RopeTextSource rts = textSource as RopeTextSource; + if (rts != null) + return rts.GetRope(); + + TextDocument doc = textSource as TextDocument; + if (doc != null) + return doc.rope; + + return textSource.Text; + } #endregion #region Text diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditor.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditor.cs index e284fb2503..f3777caa1f 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditor.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditor.cs @@ -58,18 +58,16 @@ namespace ICSharpCode.AvalonEdit textArea.TextView.Services.AddService(typeof(TextEditor), this); - SetCurrentPropertyValue(OptionsProperty, textArea.Options); - SetCurrentPropertyValue(DocumentProperty, new TextDocument()); + SetCurrentValue(OptionsProperty, textArea.Options); + SetCurrentValue(DocumentProperty, new TextDocument()); } - void SetCurrentPropertyValue(DependencyProperty property, object value) + #if !DOTNET4 + void SetCurrentValue(DependencyProperty property, object value) { - #if DOTNET4 - SetCurrentValue(property, value); - #else SetValue(property, value); - #endif } + #endif #endregion /// @@ -440,7 +438,7 @@ namespace ICSharpCode.AvalonEdit if (e.PropertyName == "IsOriginalFile") { TextDocument document = this.Document; if (document != null) { - SetCurrentPropertyValue(IsModifiedProperty, Boxes.Box(!document.UndoStack.IsOriginalFile)); + SetCurrentValue(IsModifiedProperty, Boxes.Box(!document.UndoStack.IsOriginalFile)); } return true; } else { From 308cc7402ab5d4f681dcd60bab3e60fe69f253a1 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 2 Sep 2010 18:44:20 +0200 Subject: [PATCH 04/19] DocumentUtilitites.GetTextSource: unwrap existing ITextSource instead of creating a double adapter --- .../Editor/AvalonEdit/AvalonEditDocumentAdapter.cs | 2 +- .../Editor/AvalonEdit/AvalonEditTextSourceAdapter.cs | 2 +- .../Base/Project/Src/Editor/DocumentUtilitites.cs | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditDocumentAdapter.cs b/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditDocumentAdapter.cs index 555d026038..7b15c4ccf4 100644 --- a/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditDocumentAdapter.cs +++ b/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditDocumentAdapter.cs @@ -20,7 +20,7 @@ namespace ICSharpCode.SharpDevelop.Editor.AvalonEdit /// public class AvalonEditDocumentAdapter : IDocument { - readonly TextDocument document; + internal readonly TextDocument document; readonly IServiceProvider parentServiceProvider; /// diff --git a/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditTextSourceAdapter.cs b/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditTextSourceAdapter.cs index 159af03593..e0e9dd7e63 100644 --- a/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditTextSourceAdapter.cs +++ b/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditTextSourceAdapter.cs @@ -12,7 +12,7 @@ namespace ICSharpCode.SharpDevelop.Editor.AvalonEdit { public class AvalonEditTextSourceAdapter : ITextBuffer { - ITextSource textSource; + internal readonly ITextSource textSource; public AvalonEditTextSourceAdapter(ITextSource textSource) { diff --git a/src/Main/Base/Project/Src/Editor/DocumentUtilitites.cs b/src/Main/Base/Project/Src/Editor/DocumentUtilitites.cs index e8d8db70ee..2be57df4d9 100644 --- a/src/Main/Base/Project/Src/Editor/DocumentUtilitites.cs +++ b/src/Main/Base/Project/Src/Editor/DocumentUtilitites.cs @@ -8,10 +8,10 @@ using System; using System.Diagnostics; using System.Windows.Documents; - using ICSharpCode.AvalonEdit; using ICSharpCode.AvalonEdit.Document; using ICSharpCode.AvalonEdit.Utils; +using ICSharpCode.SharpDevelop.Editor.AvalonEdit; namespace ICSharpCode.SharpDevelop.Editor { @@ -178,6 +178,15 @@ namespace ICSharpCode.SharpDevelop.Editor { if (textBuffer == null) throw new ArgumentNullException("textBuffer"); + + var textSourceAdapter = textBuffer as AvalonEditTextSourceAdapter; + if (textSourceAdapter != null) + return textSourceAdapter.textSource; + + var documentAdapter = textBuffer as AvalonEditDocumentAdapter; + if (documentAdapter != null) + return documentAdapter.document; + return new TextBufferTextSource(textBuffer); } From 5afefddcfb0b708c9c078986ebedb34d95ffb773 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 14:15:03 +0200 Subject: [PATCH 05/19] InsertCtor inserts static ctor in static class --- .../AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs | 2 +- .../Project/Src/InsertCtorSnippetRefactoring.cs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs index 9d4854e2c8..f2030ba2de 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs @@ -96,7 +96,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Snippets new CodeSnippet { Name = "ctor", Description = "Constructor", - Text = "public ${ClassName}(${anchor:parameterList})\n{\n\t${refactoring:ctor}\n}", + Text = " ${ClassName}(${anchor:parameterList})\n{\n\t${refactoring:ctor}\n}", Keyword = "event" }, new CodeSnippet { diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs index 761ee55bc6..f8b4695241 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs @@ -62,6 +62,13 @@ namespace SharpRefactoring ITextAnchor anchor = textEditor.Document.CreateAnchor(context.InsertionPosition); anchor.MovementType = AnchorMovementType.BeforeInsertion; + if (current.IsStatic) + context.Document.Insert(context.StartPosition, "static"); + else + context.Document.Insert(context.StartPosition, "public"); + + context.InsertionPosition += 6; + InsertCtorDialog dialog = new InsertCtorDialog(context, textEditor, anchor, current, parameters); dialog.Element = uiService.CreateInlineUIElement(anchor, dialog); From 9df98cf3d957f596c25d0ada5734730a0273a108 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 18:18:16 +0200 Subject: [PATCH 06/19] added documentation comment to FileService.GetOpenFile --- src/Main/Base/Project/Src/Services/File/FileService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Main/Base/Project/Src/Services/File/FileService.cs b/src/Main/Base/Project/Src/Services/File/FileService.cs index 11f102b4b3..2b13b76a86 100644 --- a/src/Main/Base/Project/Src/Services/File/FileService.cs +++ b/src/Main/Base/Project/Src/Services/File/FileService.cs @@ -336,6 +336,9 @@ namespace ICSharpCode.SharpDevelop return fileNames; } + /// + /// Gets the IViewContent for a fileName. Returns null if the file is not opened currently. + /// public static IViewContent GetOpenFile(string fileName) { if (fileName != null && fileName.Length > 0) { From c494adb781b5657a5300ec6eb689a6cc3a3fa1f1 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 18:20:58 +0200 Subject: [PATCH 07/19] added DocumentUtilitites.LoadDocumentFromBuffer --- .../Base/Project/Src/Editor/DocumentUtilitites.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Main/Base/Project/Src/Editor/DocumentUtilitites.cs b/src/Main/Base/Project/Src/Editor/DocumentUtilitites.cs index 2be57df4d9..a7c2399c04 100644 --- a/src/Main/Base/Project/Src/Editor/DocumentUtilitites.cs +++ b/src/Main/Base/Project/Src/Editor/DocumentUtilitites.cs @@ -173,6 +173,17 @@ namespace ICSharpCode.SharpDevelop.Editor return NormalizeNewLines(input, GetLineTerminator(document, lineNumber)); } + /// + /// Creates an IDocument from an ITextBuffer. + /// + public static IDocument LoadDocumentFromBuffer(ITextBuffer buffer) + { + if (buffer == null) + throw new ArgumentNullException("buffer"); + TextDocument document = new TextDocument(buffer.Text); + return new AvalonEdit.AvalonEditDocumentAdapter(document, null); + } + #region ITextSource implementation public static ICSharpCode.AvalonEdit.Document.ITextSource GetTextSource(ITextBuffer textBuffer) { From 5315c0e2babe9286cd2dca84eb68e19d4e4174f3 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 20:38:50 +0200 Subject: [PATCH 08/19] made IsAutomaticProperty static and internal, removed dependency on ITextEditor, works now with any IProperty in any class, even partial classes --- .../Src/PropertyRefactoringMenuBuilder.cs | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/PropertyRefactoringMenuBuilder.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/PropertyRefactoringMenuBuilder.cs index 97f710ceb4..a903ee9725 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/PropertyRefactoringMenuBuilder.cs +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/PropertyRefactoringMenuBuilder.cs @@ -10,7 +10,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Windows.Documents; - +using ICSharpCode.AvalonEdit.Document; using ICSharpCode.Core.Presentation; using ICSharpCode.Core.WinForms; using ICSharpCode.NRefactory; @@ -48,7 +48,7 @@ namespace SharpRefactoring ITextEditor editor = FindReferencesAndRenameHelper.OpenDefinitionFile(property, false); string field = null; PropertyDeclaration astProp = null; - if (IsAutomaticProperty(editor, property)) { + if (IsAutomaticProperty(property)) { cmd = new MenuCommand("${res:SharpDevelop.Refactoring.ExpandAutomaticProperty}", ExpandAutomaticProperty); cmd.Tag = property; items.Add(cmd); @@ -68,21 +68,38 @@ namespace SharpRefactoring return items.ToArray(); } - bool IsAutomaticProperty(ITextEditor editor, IProperty property) + internal static bool IsAutomaticProperty(IProperty property) { - if (editor == null) + string fileName = property.CompilationUnit.FileName; + + if (fileName == null) return false; + IDocument document; + ITextEditorProvider provider = FileService.GetOpenFile(fileName) as ITextEditorProvider; + + if (provider == null) { + if (!File.Exists(fileName)) + return false; + try { + document = DocumentUtilitites.LoadDocumentFromBuffer(new StringTextBuffer(File.ReadAllText(fileName))); + } catch (IOException) { + return false; + } + } else { + document = provider.TextEditor.Document; + } + bool isAutomatic = false; if (property.CanGet) { if (property.GetterRegion.IsEmpty) isAutomatic = true; else { - int getterStartOffset = editor.Document.PositionToOffset(property.GetterRegion.BeginLine, property.GetterRegion.BeginColumn); - int getterEndOffset = editor.Document.PositionToOffset(property.GetterRegion.EndLine, property.GetterRegion.EndColumn); + int getterStartOffset = document.PositionToOffset(property.GetterRegion.BeginLine, property.GetterRegion.BeginColumn); + int getterEndOffset = document.PositionToOffset(property.GetterRegion.EndLine, property.GetterRegion.EndColumn); - string text = editor.Document.GetText(getterStartOffset, getterEndOffset - getterStartOffset) + string text = document.GetText(getterStartOffset, getterEndOffset - getterStartOffset) .Replace(" ", "").Replace("\t", "").Replace("\n", "").Replace("\r", ""); isAutomatic = text == "get;"; @@ -93,10 +110,10 @@ namespace SharpRefactoring if (property.SetterRegion.IsEmpty) isAutomatic |= true; else { - int setterStartOffset = editor.Document.PositionToOffset(property.SetterRegion.BeginLine, property.SetterRegion.BeginColumn); - int setterEndOffset = editor.Document.PositionToOffset(property.SetterRegion.EndLine, property.SetterRegion.EndColumn); + int setterStartOffset = document.PositionToOffset(property.SetterRegion.BeginLine, property.SetterRegion.BeginColumn); + int setterEndOffset = document.PositionToOffset(property.SetterRegion.EndLine, property.SetterRegion.EndColumn); - string text = editor.Document.GetText(setterStartOffset, setterEndOffset - setterStartOffset) + string text = document.GetText(setterStartOffset, setterEndOffset - setterStartOffset) .Replace(" ", "").Replace("\t", "").Replace("\n", "").Replace("\r", ""); isAutomatic |= text == "set;"; From 23cb8156c4f6aaf223dc16d902622e3163f91447 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 20:54:01 +0200 Subject: [PATCH 09/19] fixed exception in Deactivate on deletion of snippet; exclude constants, static fields and properties with backing field from list --- .../Project/Src/Gui/AbstractInlineRefactorDialog.cs | 5 +++++ .../Project/Src/InsertCtorSnippetRefactoring.cs | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/AbstractInlineRefactorDialog.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/AbstractInlineRefactorDialog.cs index b197d04339..3670fcc10f 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/AbstractInlineRefactorDialog.cs +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/AbstractInlineRefactorDialog.cs @@ -113,6 +113,11 @@ namespace SharpRefactoring.Gui void IActiveElement.Deactivate(SnippetEventArgs e) { + if (e.Reason == DeactivateReason.Deleted) { + Deactivate(); + return; + } + if (e.Reason == DeactivateReason.ReturnPressed) OKButtonClick(null, null); diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs index f8b4695241..cd77b9b6cf 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; + using ICSharpCode.AvalonEdit.Snippets; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Dom; @@ -80,13 +81,15 @@ namespace SharpRefactoring { int i = 0; - foreach (var f in sourceClass.Fields) { - yield return new CtorParamWrapper(f) { Index = i, IsSelected = !f.IsReadonly }; + foreach (var f in sourceClass.Fields.Where(field => !field.IsConst && field.IsStatic == sourceClass.IsStatic)) { + yield return new CtorParamWrapper(f) { Index = i, IsSelected = true }; i++; } - foreach (var p in sourceClass.Properties.Where(prop => prop.CanSet && !prop.IsIndexer)) { - yield return new CtorParamWrapper(p) { Index = i, IsSelected = !p.IsReadonly }; + foreach (var p in sourceClass.Properties.Where(prop => prop.CanSet && !prop.IsIndexer + && PropertyRefactoringMenuBuilder.IsAutomaticProperty(prop) + && prop.IsStatic == sourceClass.IsStatic)) { + yield return new CtorParamWrapper(p) { Index = i, IsSelected = true }; i++; } } From 4d0aaba068ad2a0409cbb3348ba9657860a53c91 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 21:17:32 +0200 Subject: [PATCH 10/19] deleted unused CombineStartupPanel.xfrm --- .../Project/ICSharpCode.SharpDevelop.csproj | 1 - .../Resources/CombineStartupPanel.xfrm | 122 ------------------ 2 files changed, 123 deletions(-) delete mode 100644 src/Main/Base/Project/Resources/CombineStartupPanel.xfrm diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj index d38b693158..5e5dbf5aff 100644 --- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj +++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj @@ -619,7 +619,6 @@ - diff --git a/src/Main/Base/Project/Resources/CombineStartupPanel.xfrm b/src/Main/Base/Project/Resources/CombineStartupPanel.xfrm deleted file mode 100644 index 090a5820d2..0000000000 --- a/src/Main/Base/Project/Resources/CombineStartupPanel.xfrm +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 395a8b7df0e86842616a0f65d87e25e89300663d Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 22:04:28 +0200 Subject: [PATCH 11/19] Deleted multiple translations for "Move Down" and "Move Up" and added Global.MoveDown and Global.MoveUp --- data/resources/StringResources.cn-gb.resx | 36 +++------------ data/resources/StringResources.cz.resx | 36 +++------------ data/resources/StringResources.de.resx | 36 +++------------ data/resources/StringResources.es-mx.resx | 36 +++------------ data/resources/StringResources.es.resx | 36 +++------------ data/resources/StringResources.fr.resx | 45 +++++++------------ data/resources/StringResources.hu.resx | 36 +++------------ data/resources/StringResources.it.resx | 36 +++------------ data/resources/StringResources.kr.resx | 36 +++------------ data/resources/StringResources.nl.resx | 36 +++------------ data/resources/StringResources.no.resx | 36 +++------------ data/resources/StringResources.pl.resx | 36 +++------------ data/resources/StringResources.pt-br.resx | 36 +++------------ data/resources/StringResources.pt.resx | 36 +++------------ data/resources/StringResources.resx | 36 +++------------ data/resources/StringResources.ro.resx | 36 +++------------ data/resources/StringResources.se.resx | 36 +++------------ data/resources/StringResources.tr.resx | 36 +++------------ .../Project/Src/Gui/InsertCtorDialog.xaml | 4 +- .../Project/ICSharpCode.SharpDevelop.addin | 8 ++-- .../Resources/ExternalToolOptions.xfrm | 4 +- 21 files changed, 125 insertions(+), 548 deletions(-) diff --git a/data/resources/StringResources.cn-gb.resx b/data/resources/StringResources.cn-gb.resx index 59d0cf3c0c..02e2108687 100644 --- a/data/resources/StringResources.cn-gb.resx +++ b/data/resources/StringResources.cn-gb.resx @@ -302,12 +302,6 @@ 查找相似词: - - 下移 - - - 上移 - 主题 @@ -1223,12 +1217,6 @@ 入口 - - 下移 - - - 上移 - 多启动工程(&M) @@ -1241,12 +1229,6 @@ 命令(&C) - - 下移(&D) - - - 上移(&U) - 参数提示(&P) @@ -2199,6 +2181,12 @@ 整个工程 + + 下移(&D) + + + 上移(&U) + 下一步> @@ -3823,18 +3811,6 @@ 确认要删除项目"${TabItem}"吗? - - 下移组(&w) - - - 下移项目 - - - 上移项目 - - - 上移组(&U) - 重命名组(&R) diff --git a/data/resources/StringResources.cz.resx b/data/resources/StringResources.cz.resx index 02c497f118..aa99fde20d 100644 --- a/data/resources/StringResources.cz.resx +++ b/data/resources/StringResources.cz.resx @@ -303,12 +303,6 @@ Hledat podobná slova - - Posuň dolů - - - Posuň nahoru - témata @@ -1736,12 +1730,6 @@ Chcete přidat nový soubor do projektu ${CurrentProjectName}? Položka - - Posun Dolů - - - Posun Nahoru - Hro&madný startovací projekt @@ -1754,12 +1742,6 @@ Chcete přidat nový soubor do projektu ${CurrentProjectName}? &Příkaz - - Posunout &nahoru - - - Posunout &dolu - Ze&ptat se na Parametry @@ -2820,6 +2802,12 @@ Můžete se také rozhodnout, že všechny volby budou uloženy ve vlastním .us celý projekt + + Posunout &nahoru + + + Posunout &dolu + Neaplikovatelné @@ -5787,18 +5775,6 @@ Soubory resources byly přejmenovány/přesunuty, aby tomu odpovídaly. Přejete si opravdu odstranit položku "${TabItem}"? - - Záložka Do&lů - - - Posun dolů - - - Posun nahoru - - - Záložk&u Nahoru - Pře&jmenovat záložku diff --git a/data/resources/StringResources.de.resx b/data/resources/StringResources.de.resx index 19d60473fb..785439394a 100644 --- a/data/resources/StringResources.de.resx +++ b/data/resources/StringResources.de.resx @@ -371,12 +371,6 @@ Installieren Sie das .NET Framework SDK. Nach verwandten Worten suchen - - Ab - - - Auf - Themen @@ -2224,12 +2218,6 @@ Wollen Sie die neue Datei zum Projekt ${CurrentProjectName} hinzufügen? Eintrag - - Runter - - - Hoch - &Mehrfachausführung @@ -2242,12 +2230,6 @@ Wollen Sie die neue Datei zum Projekt ${CurrentProjectName} hinzufügen? B&efehl - - Nach &oben - - - Nach &unten - Zu&r Argumenteingabe auffordern @@ -3440,6 +3422,12 @@ Sie können die Einstellungen auch in einer .user-Datei anstelle der Projektdate ganzes Projekt + + Nach &oben + + + Nach &unten + N/A @@ -6830,18 +6818,6 @@ SharpDevelop 2 kompiliert Ressourcendateien anders: der Ressourcenname ist nicht Wollen Sie den Eintrag "${TabItem}" löschen? - - Tab runter bewegen - - - Item runter bewegen - - - Item hoch bewegen - - - Tab hoch bewegen - Tab umbenennen diff --git a/data/resources/StringResources.es-mx.resx b/data/resources/StringResources.es-mx.resx index 2834bf697b..359a38b076 100644 --- a/data/resources/StringResources.es-mx.resx +++ b/data/resources/StringResources.es-mx.resx @@ -371,12 +371,6 @@ Necesita instalar el .NET Framework SDK para obtener el sistema de ayuda. Buscar palabras similares - - Mover hacia abajo - - - Mover hacia arriba - tópicos @@ -2225,12 +2219,6 @@ Adicionalmente, se le puede asignar a una extensión un conjunto de reglas defin Entrada - - Mover abajo - - - Mover arriba - Proyecto de inicio &múltiple @@ -2243,12 +2231,6 @@ Adicionalmente, se le puede asignar a una extensión un conjunto de reglas defin &Comando - - Mover &Abajo - - - Mover A&rriba - &Solicitar argumentos @@ -3439,6 +3421,12 @@ También puede elegir guardar la opción en el archivo .user en lugar de en el a todo el proyecto + + Mover &Abajo + + + Mover A&rriba + N/A @@ -6816,18 +6804,6 @@ Los archivos de recursos han sido renombrados/movidos convenientemente. ¿Realmente desea borrar el elemento "${TabItem}"? - - Bajar &Pestaña - - - Bajar Elemento - - - Subir Elemento - - - S&ubir Pestaña - &Renombrar Pestaña diff --git a/data/resources/StringResources.es.resx b/data/resources/StringResources.es.resx index 779093565b..77619d5f2a 100644 --- a/data/resources/StringResources.es.resx +++ b/data/resources/StringResources.es.resx @@ -371,12 +371,6 @@ Es necesario instalar el .NET Framework SDK para obtener el sistema de ayuda. Buscar palabras similares - - Bajar - - - Subir - tópicos @@ -2222,12 +2216,6 @@ Adicionalmente, se le puede asignar a una extensión un conjunto de reglas defin Entrada - - Mover abajo - - - Mover arriba - Inicio Proyectos &Múltiples @@ -2240,12 +2228,6 @@ Adicionalmente, se le puede asignar a una extensión un conjunto de reglas defin &Comando - - Mover &Abajo - - - Mover A&rriba - &Pedir Argumentos @@ -3440,6 +3422,12 @@ También puede escoger almacenar el parámetro de configuración en el archivo . proyecto completo + + Mover &Abajo + + + Mover A&rriba + N/A @@ -6820,18 +6808,6 @@ Los archivos de recursos han sido renombrados o cambiados de ubicación de acuer ¿Desea realmente borrar el elemento "${TabItem}"? - - Mover Tab hacia abajo - - - Mover elemento hacia abajo - - - Mover elemento hacia arriba - - - Mover Tab hacia Arriba - &Renombrar Tab diff --git a/data/resources/StringResources.fr.resx b/data/resources/StringResources.fr.resx index 6b2f368006..4455f581ed 100644 --- a/data/resources/StringResources.fr.resx +++ b/data/resources/StringResources.fr.resx @@ -232,6 +232,9 @@ Téléchargez un AddIn depuis l'Internet, cliquez ensuite sur 'Installer un AddI Afficher le diagramme des classes + + TortoiseGit doit être installé pour exécuter cette action. + Contenus @@ -370,12 +373,6 @@ Téléchargez un AddIn depuis l'Internet, cliquez ensuite sur 'Installer un AddI Rechercher des mots similaires - - Déplacer vers la bas - - - Déplacer vers le haut - Sujets @@ -2220,12 +2217,6 @@ Voulez-vous ajouter le nouveau fichier au projet ${CurrentProjectName}? Elément - - Bas - - - Haut - Projet lancements &multiples @@ -2238,12 +2229,6 @@ Voulez-vous ajouter le nouveau fichier au projet ${CurrentProjectName}? &Commande - - &Descendre - - - Monter - &Demande d'Arguments @@ -3437,6 +3422,12 @@ Vous pouvez aussi choisir de stocker la configuration dans le fichier .user-file projet complet + + &Descendre + + + Monter + Non disponible @@ -4053,9 +4044,15 @@ Configurez le chemin vers NAnt dans les options de SharpDevelop. Projets Python + + Envoyer cette ligne vers la console Python + Impossible de trouver le type '{0}'. Manque-t-il uUne référence d'assembly ? + + Envoyer cette ligne vers la console Ruby + Chargement du fichier ${FileNameWithoutPath} depuis ${Path}. Controler les droits et l'existence du fichier. @@ -6815,18 +6812,6 @@ Les fichiers de resources ont été renommés/déplacés en conséquence. Voulez-vous vraiment supprimer l'élément "${TabItem}" ? - - Déplacer vers le bas - - - Déplacer vers la bas - - - Déplacer vers le haut - - - Déplacer vers le haut - &Renommer diff --git a/data/resources/StringResources.hu.resx b/data/resources/StringResources.hu.resx index 355745ab36..7eed25fae0 100644 --- a/data/resources/StringResources.hu.resx +++ b/data/resources/StringResources.hu.resx @@ -308,12 +308,6 @@ Telepítenie kell a .NET keretrendszer 2.0-s verziójának szoftverfejlesztői k Hasonló szavak keresése - - Mozgatás felfelé - - - Mozgatás lefelé - témakör @@ -1422,12 +1416,6 @@ Hozzáadja az új fáljt a ${CurrentProjectName} projekthez? Elem - - Le - - - Fel - &Több indulási projekt @@ -1440,12 +1428,6 @@ Hozzáadja az új fáljt a ${CurrentProjectName} projekthez? P&arancs - - &Le - - - &Fel - &Kérje a paramétereket @@ -2504,6 +2486,12 @@ Ugyancsak választhatja hogy a beállításokat .user-fájlban tárolja a projek a teljes projekt + + &Le + + + &Fel + N/A @@ -4982,18 +4970,6 @@ Az erőforrás fájlok mozgatása/átnevezése megtörtént. Biztosan törölhető a tétel "${TabItem}"? - - Panel mozgatása &le - - - Tétel mozgatása le - - - Tétel mozgatása föl - - - Panel mozgatása &föl - &Panel átnevezése diff --git a/data/resources/StringResources.it.resx b/data/resources/StringResources.it.resx index 834d13b1c8..dc3698c7d4 100644 --- a/data/resources/StringResources.it.resx +++ b/data/resources/StringResources.it.resx @@ -302,12 +302,6 @@ Installare il .NET Framework SDK per utilizzare il sistema di help. Cerca parole simili - - Sposta in basso - - - Sposta in alto - argomenti @@ -1205,12 +1199,6 @@ Vuoi aggiungere il nuovo file al progetto ${CurrentProjectName}? Parte - - Muove giu - - - Muove su - Progetto di avvio &Multiplo @@ -1223,12 +1211,6 @@ Vuoi aggiungere il nuovo file al progetto ${CurrentProjectName}? &Comando - - Muove &Giu - - - Muove &Su - &Richiesta Argomenti @@ -2269,6 +2251,12 @@ Puoi anche scegliere di memorizzare le impostazioni in un file .user invece che intero progetto + + Muove &Giu + + + Muove &Su + N/A @@ -4643,18 +4631,6 @@ SharpDevelop 2 compila le risorse differentemente: il nome della risorsa non è Vuoi eliminare veramente la tabulazione "${TabItem}"? - - Muove Tabulazione G&iù - - - Muovi Item Giù - - - Muovi Item Su - - - Muove Tabulazione &Sù - &Rinomina Tabulazione diff --git a/data/resources/StringResources.kr.resx b/data/resources/StringResources.kr.resx index 2da9d14f74..39c6104a79 100644 --- a/data/resources/StringResources.kr.resx +++ b/data/resources/StringResources.kr.resx @@ -304,12 +304,6 @@ 비슷한 단어 찾기 - - 아래로 이동 - - - 위로 이동 - 주제 @@ -1754,12 +1748,6 @@ ${CurrentProjectName} 프로젝트에 이 새 파일을 더하겠습니까? 엔트리 - - 아래로 이동 - - - 위로 이동 - 다중 시작 프로젝트(&M) @@ -1772,12 +1760,6 @@ ${CurrentProjectName} 프로젝트에 이 새 파일을 더하겠습니까? 명령(&C) - - 아래로 이동(&D) - - - 위로 이동(&U) - 인수 묻기(&P) @@ -2915,6 +2897,12 @@ ${CurrentProjectName} 프로젝트에 이 새 파일을 더하겠습니까? 전체 프로젝트 + + 아래로 이동(&D) + + + 위로 이동(&U) + 사용할 수 없음 @@ -6111,18 +6099,6 @@ SharpDevelop 2는 리소스를 다른 방법으로 컴파일합니다: 리소스 "${TabItem}" 항목을 정말로 지우겠습니까? - - 탭을 아래로 이동(&W) - - - 항목을 아래로 이동 - - - 항목을 위로 이동 - - - 탭을 위로 이동(&U) - 탭 제거(&R) diff --git a/data/resources/StringResources.nl.resx b/data/resources/StringResources.nl.resx index 3eb683f9de..d0780f4334 100644 --- a/data/resources/StringResources.nl.resx +++ b/data/resources/StringResources.nl.resx @@ -373,12 +373,6 @@ Om het help systeem te verkrijgen dient u de .NET Framework SDK te installeren.< Zoek naar overeenkomstige woorden - - Verplaats omlaag - - - Verplaats omhoog - onderwerpen @@ -2230,12 +2224,6 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}? Ingave - - Verplaats omlaag - - - Verplaats omhoog - Project met &meervoudige startup @@ -2248,12 +2236,6 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}? &Opdracht - - Omlaag - - - Omhoog - &Prompt voor argumenten @@ -3443,6 +3425,12 @@ Er kan worden gekozen voor opslag van de instellingen in het .user bestand inpla hele project + + Omlaag + + + Omhoog + n.v.t. @@ -6826,18 +6814,6 @@ De hulpbron bestanden zijn hernoemd/verplaatst op de beschreven wijze. Wilt u item "${TabItem}" echt verwijderen? - - Tab naar &beneden - - - Verplaats item omlaag - - - Verplaats item omhoog - - - Verplaats tab &omhoog - He&rnoem Tab diff --git a/data/resources/StringResources.no.resx b/data/resources/StringResources.no.resx index be884e5ed6..e93ade05a9 100644 --- a/data/resources/StringResources.no.resx +++ b/data/resources/StringResources.no.resx @@ -308,12 +308,6 @@ Du må installere .NET Framework SDK for å få tilgang til hjelpesystemet. Let etter lignende ord - - Flytt ned - - - Flytt opp - emner @@ -1814,12 +1808,6 @@ I tillegg kan et spenn tilordnes et navngitt regelsett som tillater kompleks for Oppføring - - Flytt ned - - - Flytt opp - &Fleroppstarts prosjekt @@ -1832,12 +1820,6 @@ I tillegg kan et spenn tilordnes et navngitt regelsett som tillater kompleks for &Kommando - - Flytt &ned - - - Flytt &opp - &Spør etter argumenter @@ -2981,6 +2963,12 @@ Du kan også velge å lagre innstillingen i .user-filen istedet for i prosjektfi hele prosjektet + + Flytt &ned + + + Flytt &opp + (ikke aktuelt) @@ -6193,18 +6181,6 @@ SharpDevelop 2 kompilerer ressurser annerledes: ressursnavnet er ikke bare filna Vil du slette elementet "${TabItem}"? - - Flytt flik &ned - - - Flytt element ned - - - Flytt element opp - - - Flytt flik &opp - &Gi flik nytt navn diff --git a/data/resources/StringResources.pl.resx b/data/resources/StringResources.pl.resx index d30d41afac..557489b5e2 100644 --- a/data/resources/StringResources.pl.resx +++ b/data/resources/StringResources.pl.resx @@ -305,12 +305,6 @@ Musisz zainstalować .NET Framework SDK aby otrzymać system pomocy. Patrz na podobne słowa - - Ruch w dół - - - Ruch w górę - tytuły @@ -1594,12 +1588,6 @@ Czy chcesz dodać nowy plik do projektu ${CurrentProjectName}? Element - - Przenieś w dół - - - Przenieś w górę - &Złożony Projekt Startowy @@ -1612,12 +1600,6 @@ Czy chcesz dodać nowy plik do projektu ${CurrentProjectName}? Pole&cenie - - Rusz Na&dol - - - R&usz Do Gory - &Pytanie o Argumenty @@ -2660,6 +2642,12 @@ Możesz również wybrać przechowywanie ustawienia w pliku użytkownika zamiast cały projekt + + Rusz Na&dol + + + R&usz Do Gory + Niedostępne @@ -5362,18 +5350,6 @@ Pliki zasobów zostały odpowiednio nazwane/przeniesione. Czy na pewno chcesz usunąć pozycję "${TabItem}"? - - Przesuń Belkę &w Dół - - - Przesuń Pozycję Niżej - - - Przesuń Pozycję Wyżej - - - Przesuń Belkę w Górę - &Zmień nazwę Belki diff --git a/data/resources/StringResources.pt-br.resx b/data/resources/StringResources.pt-br.resx index c12c13a9c9..88082e7e59 100644 --- a/data/resources/StringResources.pt-br.resx +++ b/data/resources/StringResources.pt-br.resx @@ -370,12 +370,6 @@ Voce precisa instalar o .Net Framework SDK para acessar o sistema de ajuda. Procurar por palavras similares - - Mover para baixo - - - Mover para cima - tópicos @@ -2038,12 +2032,6 @@ Além disso, um span pode definir um rule set nomedo que permite uma formataçã Entrada - - Mover para baixo - - - Mover para cima - Projeto de Inicializações &Múltiplas @@ -2056,12 +2044,6 @@ Além disso, um span pode definir um rule set nomedo que permite uma formataçã &Comando - - Mover para baixo - - - Mover para cima - &Prompt para Argumentos @@ -3190,6 +3172,12 @@ Além disso, um span pode definir um rule set nomedo que permite uma formataçã projeto inteiro + + Mover para baixo + + + Mover para cima + N/D @@ -5666,18 +5654,6 @@ Use somente letras, dígitos, espaço, "." ou "_" são permitidos. Você realemente deseja deletar o item "${TabItem}"? - - Mover Tab para &Baixo - - - Mover Item para Baixo - - - Mover Item para Cima - - - Mover Tab para &Cima - Re&nomear Tab diff --git a/data/resources/StringResources.pt.resx b/data/resources/StringResources.pt.resx index 6f4b1f6596..75b30531aa 100644 --- a/data/resources/StringResources.pt.resx +++ b/data/resources/StringResources.pt.resx @@ -302,12 +302,6 @@ Precisa de instalar o .NET Framework SDK para utilizar o sistema de ajuda. Procurar por palavras semelhantes - - Mover para baixo - - - Mover para cima - Tópicos @@ -1688,12 +1682,6 @@ Além disso, um bloco pode ser associado a um conjunto de regras que permita uma Entrada - - Para baixo - - - Para cima - Projecto com múltiplos arranques @@ -1706,12 +1694,6 @@ Além disso, um bloco pode ser associado a um conjunto de regras que permita uma &Comando - - &Descer - - - &Subir - &Pedir argumentos @@ -2763,6 +2745,12 @@ Pode também escolher guardar o parâmetro num ficheiro .user-file em vez de no projecto inteiro + + &Descer + + + &Subir + N/A @@ -5599,18 +5587,6 @@ Os ficheiros de recursos foram renomeados/movidos em conformidade. Deseja mesmo apagar o item "${TabItem}"? - - Mover o Separador para &Baixo - - - Mover o Item para Baixo - - - Mover o Item para Cima - - - Mover o Separador para &Cima - Altera&r o nome do Separador diff --git a/data/resources/StringResources.resx b/data/resources/StringResources.resx index def2b77f69..61993c9d77 100644 --- a/data/resources/StringResources.resx +++ b/data/resources/StringResources.resx @@ -374,12 +374,6 @@ You need to install the .NET Framework SDK to get the help system. Look for similiar words - - Move down - - - Move up - topics @@ -2233,12 +2227,6 @@ Do you want to add the new file to the project ${CurrentProjectName}? Entry - - Move down - - - Move up - &Multiple Startup Project @@ -2251,12 +2239,6 @@ Do you want to add the new file to the project ${CurrentProjectName}? &Command - - Move &Down - - - Move &Up - &Prompt for Arguments @@ -3449,6 +3431,12 @@ You can also choose to store the setting in the .user-file instead of the projec whole project + + Move &Down + + + Move &Up + N/A @@ -6840,18 +6828,6 @@ The resources files have been renamed/moved accordingly. Do you really want to delete item "${TabItem}"? - - Move Tab Do&wn - - - Move Item Down - - - Move Item Up - - - Move Tab &Up - &Rename Tab diff --git a/data/resources/StringResources.ro.resx b/data/resources/StringResources.ro.resx index a006b5d2b0..ee59ab6ada 100644 --- a/data/resources/StringResources.ro.resx +++ b/data/resources/StringResources.ro.resx @@ -301,12 +301,6 @@ Pentru aceasta trebuie să instalaţi .NET Framework SDK. Căutare cuvinte similare - - Mută în jos - - - Mută în sus - subiecte @@ -1133,12 +1127,6 @@ Doriţi adăugarea noului fişier la proiectul ${CurrentProjectName}? Intrare - - Deplasare în jos - - - Deplasare în sus - Proiect cu Start &Multiplu @@ -1151,12 +1139,6 @@ Doriţi adăugarea noului fişier la proiectul ${CurrentProjectName}? &Comanda - - Muta &Jos - - - Muta &Sus - Director &Soluţii @@ -1997,6 +1979,12 @@ Doriţi adăugarea noului fişier la proiectul ${CurrentProjectName}? întregul proiect + + Muta &Jos + + + Muta &Sus + Nume @@ -3693,18 +3681,6 @@ Toate modificările se vor pierde. Doriţi ştergerea elementului "${TabItem}"? - - Deplasare Tab În &Jos - - - Deplasare Element În Jos - - - Deplasare Element În Sus - - - Deplasare Tab În &Sos - &Redenumire Tab diff --git a/data/resources/StringResources.se.resx b/data/resources/StringResources.se.resx index a009ca48da..21608ecc7e 100644 --- a/data/resources/StringResources.se.resx +++ b/data/resources/StringResources.se.resx @@ -299,12 +299,6 @@ Du måste installera .NET Framework SDK för att komma åt hjälpsystemet. Sök efter liknande ord - - Flytta ner - - - Flytta upp - ämnen @@ -1279,12 +1273,6 @@ Vill du lägga till den nya filen till projektet ${CurrentProjectName}? Val - - Flytta ner - - - Flytta upp - Flera startprojekt @@ -1297,12 +1285,6 @@ Vill du lägga till den nya filen till projektet ${CurrentProjectName}? &Kommando - - Flytta &Ner - - - Flytta &Upp - Plats för argument @@ -2302,6 +2284,12 @@ Du kan även välja att lagra inställningen i .user-filen istället för projek hela projektet + + Flytta &Ner + + + Flytta &Upp + Namn @@ -4551,18 +4539,6 @@ Resursfilerna har därför bytt namn/flyttats enligt ovan. Vill du verkligen ta bort föremålet "${TabItem}"? - - Flytta tabulator nedåt - - - Flytta föremål ner - - - Flytta föremål upp - - - Flytta tabulator &uppåt - Byt namn på tabulator diff --git a/data/resources/StringResources.tr.resx b/data/resources/StringResources.tr.resx index c7fc75aa8f..4d5b4298c2 100644 --- a/data/resources/StringResources.tr.resx +++ b/data/resources/StringResources.tr.resx @@ -308,12 +308,6 @@ Yardım sistemini elde edebilmek için .NET Framework SDK 'yı yüklemelisiniz.< Benzer kelimeleri ara - - Aşağıya taşı - - - Yukarı taşı - başlıklar @@ -1646,12 +1640,6 @@ Ek olarak, bir ölçüm aralığı, içerisinde karmaşık biçimlemeye izin ver Girdi - - Aşağıya taşı - - - Yukarıya taşı - &Çoklu Başlangıç Projesi @@ -1664,12 +1652,6 @@ Ek olarak, bir ölçüm aralığı, içerisinde karmaşık biçimlemeye izin ver &Komut - - &Aşağıya Taşı - - - &Yukarıya Taşı - Argümanlar için &sor @@ -2718,6 +2700,12 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için tüm proje + + &Aşağıya Taşı + + + &Yukarıya Taşı + Uygulanamaz @@ -5502,18 +5490,6 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı. "${TabItem}" yi gerçekten silmek istiyor musunuz? - - Sekmeyi A&şağı Taşı - - - Aşağı Taşı - - - Yukarı Taşı - - - Sekmeyi &Yukarı Taşı - Sekmeyi &YenidenAdlandır diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml index 42e19c4a9f..ace37af391 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml @@ -43,8 +43,8 @@ public static class DocumentUtilitites { + /// + /// Creates a new mutable document from the specified text buffer. + /// + /// + /// Use the more efficient if you only need a read-only document. + /// + public static IDocument LoadDocumentFromBuffer(ITextBuffer buffer) + { + if (buffer == null) + throw new ArgumentNullException("buffer"); + var doc = new TextDocument(GetTextSource(buffer)); + return new AvalonEditDocumentAdapter(doc, null); + } + + /// + /// Creates a new read-only document from the specified text buffer. + /// + public static IDocument LoadReadOnlyDocumentFromBuffer(ITextBuffer buffer) + { + if (buffer == null) + throw new ArgumentNullException("buffer"); + return new ReadOnlyDocument(buffer); + } + /// /// Gets the word in front of the caret. /// @@ -173,17 +197,6 @@ namespace ICSharpCode.SharpDevelop.Editor return NormalizeNewLines(input, GetLineTerminator(document, lineNumber)); } - /// - /// Creates an IDocument from an ITextBuffer. - /// - public static IDocument LoadDocumentFromBuffer(ITextBuffer buffer) - { - if (buffer == null) - throw new ArgumentNullException("buffer"); - TextDocument document = new TextDocument(buffer.Text); - return new AvalonEdit.AvalonEditDocumentAdapter(document, null); - } - #region ITextSource implementation public static ICSharpCode.AvalonEdit.Document.ITextSource GetTextSource(ITextBuffer textBuffer) { diff --git a/src/Main/Base/Project/Src/Editor/ReadOnlyDocument.cs b/src/Main/Base/Project/Src/Editor/ReadOnlyDocument.cs new file mode 100644 index 0000000000..46613adad1 --- /dev/null +++ b/src/Main/Base/Project/Src/Editor/ReadOnlyDocument.cs @@ -0,0 +1,281 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using ICSharpCode.NRefactory; + +namespace ICSharpCode.SharpDevelop.Editor +{ + /// + /// Read-only implementation of IDocument. + /// + sealed class ReadOnlyDocument : IDocument + { + ITextBuffer textBuffer; + int[] lines; + + public ReadOnlyDocument(ITextBuffer textBuffer) + { + // ensure that underlying buffer is immutable + this.textBuffer = textBuffer.CreateSnapshot(); + List lines = new List(); + lines.Add(0); + int offset = 0; + string newlineType; + var textSource = DocumentUtilitites.GetTextSource(this.textBuffer); + while ((offset = ICSharpCode.AvalonEdit.Document.TextUtilities.FindNextNewLine(textSource, offset, out newlineType)) >= 0) { + offset += newlineType.Length; + lines.Add(offset); + } + this.lines = lines.ToArray(); + } + + public IDocumentLine GetLine(int lineNumber) + { + if (lineNumber < 1 || lineNumber > lines.Length) + throw new ArgumentOutOfRangeException("lineNumber", lineNumber, "Value must be between 1 and " + lines.Length); + return new ReadOnlyDocumentLine(this, lineNumber); + } + + sealed class ReadOnlyDocumentLine : IDocumentLine + { + readonly ReadOnlyDocument doc; + readonly int lineNumber; + + public ReadOnlyDocumentLine(ReadOnlyDocument doc, int lineNumber) + { + this.doc = doc; + this.lineNumber = lineNumber; + } + + public int Offset { + get { + return doc.GetStartOffset(lineNumber); + } + } + + public int Length { + get { + return doc.GetEndOffset(lineNumber) - doc.GetStartOffset(lineNumber); + } + } + + public int EndOffset { + get { + return doc.GetEndOffset(lineNumber); + } + } + + public int TotalLength { + get { + return doc.GetTotalEndOffset(lineNumber) - doc.GetStartOffset(lineNumber); + } + } + + public int DelimiterLength { + get { + return doc.GetTotalEndOffset(lineNumber) - doc.GetEndOffset(lineNumber); + } + } + + public int LineNumber { + get { return lineNumber; } + } + + public string Text { + get { + return doc.GetText(this.Offset, this.Length); + } + } + } + + int GetStartOffset(int lineNumber) + { + return lines[lineNumber-1]; + } + + int GetTotalEndOffset(int lineNumber) + { + return lineNumber < lines.Length ? lines[lineNumber] : textBuffer.TextLength; + } + + int GetEndOffset(int lineNumber) + { + if (lineNumber == lines.Length) + return textBuffer.TextLength; + int off = lines[lineNumber] - 1; + if (off > 0 && textBuffer.GetCharAt(off - 1) == '\r' && textBuffer.GetCharAt(off) == '\n') + off--; + return off; + } + + public IDocumentLine GetLineForOffset(int offset) + { + return GetLine(GetLineNumberForOffset(offset)); + } + + int GetLineNumberForOffset(int offset) + { + int r = Array.BinarySearch(lines, offset); + return r < 0 ? ~r : r + 1; + } + + public int PositionToOffset(int line, int column) + { + if (line < 1 || line > lines.Length) + throw new ArgumentOutOfRangeException("line", line, "Value must be between 1 and " + lines.Length); + int lineStart = GetStartOffset(line); + if (column <= 0) + return lineStart; + int lineEnd = GetEndOffset(line); + if (column >= lineEnd - lineStart) + return lineEnd; + return lineStart + column - 1; + } + + public Location OffsetToPosition(int offset) + { + if (offset < 0 || offset > textBuffer.TextLength) + throw new ArgumentOutOfRangeException("offset", offset, "Value must be between 0 and " + textBuffer.TextLength); + int line = GetLineNumberForOffset(offset); + return new Location(offset-GetStartOffset(line)+1, line); + } + + public event EventHandler Changing { add {} remove {} } + + public event EventHandler Changed { add {} remove {} } + + public event EventHandler TextChanged { add {} remove {} } + + public string Text { + get { return textBuffer.Text; } + set { + throw new NotSupportedException(); + } + } + + public int TotalNumberOfLines { + get { return lines.Length; } + } + + public ITextBufferVersion Version { + get { return null; } + } + + public int TextLength { + get { return textBuffer.TextLength; } + } + + public void Insert(int offset, string text) + { + throw new NotSupportedException(); + } + + public void Remove(int offset, int length) + { + throw new NotSupportedException(); + } + + public void Replace(int offset, int length, string newText) + { + throw new NotSupportedException(); + } + + public void StartUndoableAction() + { + } + + public void EndUndoableAction() + { + } + + public IDisposable OpenUndoGroup() + { + return new CallbackOnDispose(EndUndoableAction); + } + + public ITextAnchor CreateAnchor(int offset) + { + return new ReadOnlyDocumentTextAnchor(OffsetToPosition(offset), offset); + } + + sealed class ReadOnlyDocumentTextAnchor : ITextAnchor + { + readonly Location location; + readonly int offset; + + public ReadOnlyDocumentTextAnchor(Location location, int offset) + { + this.location = location; + this.offset = offset; + } + + public event EventHandler Deleted { add {} remove {} } + + public Location Location { + get { return location; } + } + + public int Offset { + get { return offset; } + } + + public AnchorMovementType MovementType { get; set; } + + public bool SurviveDeletion { get; set; } + + public bool IsDeleted { + get { return false; } + } + + public int Line { + get { return location.Line; } + } + + public int Column { + get { return location.Column; } + } + } + + public ITextBuffer CreateSnapshot() + { + return this; // ReadOnlyDocument is immutable + } + + public ITextBuffer CreateSnapshot(int offset, int length) + { + return textBuffer.CreateSnapshot(offset, length); + } + + public System.IO.TextReader CreateReader() + { + return textBuffer.CreateReader(); + } + + public System.IO.TextReader CreateReader(int offset, int length) + { + return textBuffer.CreateReader(offset, length); + } + + public char GetCharAt(int offset) + { + return textBuffer.GetCharAt(offset); + } + + public string GetText(int offset, int length) + { + return textBuffer.GetText(offset, length); + } + + public object GetService(Type serviceType) + { + return null; + } + } +} From bd3dc66e865db62ea0af9bcee10b4d9d42d6304e Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 2 Sep 2010 21:20:08 +0200 Subject: [PATCH 13/19] Add unit test for ReadOnlyDocument. --- .../ICSharpCode.SharpDevelop.Tests.csproj | 1 + src/Main/Base/Test/ReadOnlyDocumentTests.cs | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 src/Main/Base/Test/ReadOnlyDocumentTests.cs diff --git a/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj b/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj index 843b496e67..53d802f358 100644 --- a/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj +++ b/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj @@ -75,6 +75,7 @@ + diff --git a/src/Main/Base/Test/ReadOnlyDocumentTests.cs b/src/Main/Base/Test/ReadOnlyDocumentTests.cs new file mode 100644 index 0000000000..810b8d9f1e --- /dev/null +++ b/src/Main/Base/Test/ReadOnlyDocumentTests.cs @@ -0,0 +1,66 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.NRefactory; +using ICSharpCode.SharpDevelop.Editor; +using NUnit.Framework; + +namespace ICSharpCode.SharpDevelop.Tests +{ + [TestFixture] + public class ReadOnlyDocumentTests + { + [Test] + public void EmptyReadOnlyDocument() + { + IDocument document = DocumentUtilitites.LoadReadOnlyDocumentFromBuffer(new StringTextBuffer(string.Empty)); + Assert.AreEqual(string.Empty, document.Text); + Assert.AreEqual(0, document.TextLength); + Assert.AreEqual(1, document.TotalNumberOfLines); + Assert.AreEqual(0, document.PositionToOffset(1, 1)); + Assert.AreEqual(new Location(1, 1), document.OffsetToPosition(0)); + + Assert.AreEqual(0, document.GetLine(1).Offset); + Assert.AreEqual(0, document.GetLine(1).EndOffset); + Assert.AreEqual(0, document.GetLine(1).Length); + Assert.AreEqual(0, document.GetLine(1).TotalLength); + Assert.AreEqual(0, document.GetLine(1).DelimiterLength); + Assert.AreEqual(1, document.GetLine(1).LineNumber); + } + + [Test] + public void SimpleDocument() + { + string text = "Hello\nWorld!\r\n"; + IDocument document = DocumentUtilitites.LoadReadOnlyDocumentFromBuffer(new StringTextBuffer(text)); + Assert.AreEqual(text, document.Text); + Assert.AreEqual(3, document.TotalNumberOfLines); + + Assert.AreEqual(0, document.GetLine(1).Offset); + Assert.AreEqual(5, document.GetLine(1).EndOffset); + Assert.AreEqual(5, document.GetLine(1).Length); + Assert.AreEqual(6, document.GetLine(1).TotalLength); + Assert.AreEqual(1, document.GetLine(1).DelimiterLength); + Assert.AreEqual(1, document.GetLine(1).LineNumber); + + Assert.AreEqual(6, document.GetLine(2).Offset); + Assert.AreEqual(12, document.GetLine(2).EndOffset); + Assert.AreEqual(6, document.GetLine(2).Length); + Assert.AreEqual(8, document.GetLine(2).TotalLength); + Assert.AreEqual(2, document.GetLine(2).DelimiterLength); + Assert.AreEqual(2, document.GetLine(2).LineNumber); + + Assert.AreEqual(14, document.GetLine(3).Offset); + Assert.AreEqual(14, document.GetLine(3).EndOffset); + Assert.AreEqual(0, document.GetLine(3).Length); + Assert.AreEqual(0, document.GetLine(3).TotalLength); + Assert.AreEqual(0, document.GetLine(3).DelimiterLength); + Assert.AreEqual(3, document.GetLine(3).LineNumber); + } + } +} From 834b9afd6aea7e24f07e81031d6ac5ff75cc39b1 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 22:18:29 +0200 Subject: [PATCH 14/19] more resource cleanup: removed old "Tip Of The Day" resources --- data/resources/StringResources.cn-gb.resx | 12 ------------ data/resources/StringResources.cz.resx | 12 ------------ data/resources/StringResources.de.resx | 12 ------------ data/resources/StringResources.es-mx.resx | 12 ------------ data/resources/StringResources.es.resx | 12 ------------ data/resources/StringResources.fr.resx | 12 ------------ data/resources/StringResources.hu.resx | 12 ------------ data/resources/StringResources.it.resx | 12 ------------ data/resources/StringResources.kr.resx | 12 ------------ data/resources/StringResources.nl.resx | 12 ------------ data/resources/StringResources.no.resx | 12 ------------ data/resources/StringResources.pl.resx | 12 ------------ data/resources/StringResources.pt-br.resx | 12 ------------ data/resources/StringResources.pt.resx | 12 ------------ data/resources/StringResources.resx | 12 ------------ data/resources/StringResources.ro.resx | 12 ------------ data/resources/StringResources.se.resx | 12 ------------ data/resources/StringResources.tr.resx | 12 ------------ 18 files changed, 216 deletions(-) diff --git a/data/resources/StringResources.cn-gb.resx b/data/resources/StringResources.cn-gb.resx index 02e2108687..0100ae552c 100644 --- a/data/resources/StringResources.cn-gb.resx +++ b/data/resources/StringResources.cn-gb.resx @@ -2043,18 +2043,6 @@ 类型 - - 下一帖(&N) - - - 启动时显示每日一帖 - - - 每日一帖 - - - 你知道吗... - GNU通用公共许可证 diff --git a/data/resources/StringResources.cz.resx b/data/resources/StringResources.cz.resx index aa99fde20d..170a88f45f 100644 --- a/data/resources/StringResources.cz.resx +++ b/data/resources/StringResources.cz.resx @@ -2658,18 +2658,6 @@ Můžete se také rozhodnout, že všechny volby budou uloženy ve vlastním .us Typ - - &Další tip - - - Zobrazit tipy při startu - - - Tip na dnešní den - - - Víte, že... - GNU General Public License diff --git a/data/resources/StringResources.de.resx b/data/resources/StringResources.de.resx index 785439394a..d03e07c659 100644 --- a/data/resources/StringResources.de.resx +++ b/data/resources/StringResources.de.resx @@ -3251,18 +3251,6 @@ Sie können die Einstellungen auch in einer .user-Datei anstelle der Projektdate Typ - - &Nächster Tip - - - Tips beim Start zeigen - - - Tip des Tages - - - Wussten sie schon... - GNU General Public License diff --git a/data/resources/StringResources.es-mx.resx b/data/resources/StringResources.es-mx.resx index 359a38b076..8b3effed86 100644 --- a/data/resources/StringResources.es-mx.resx +++ b/data/resources/StringResources.es-mx.resx @@ -3250,18 +3250,6 @@ También puede elegir guardar la opción en el archivo .user en lugar de en el a Tipo - - &Siguiente - - - Mostrar sugerencias al inicio - - - Sugerencia del día - - - Sabia que... - GNU Licencia Pública General diff --git a/data/resources/StringResources.es.resx b/data/resources/StringResources.es.resx index 77619d5f2a..c3f09fc156 100644 --- a/data/resources/StringResources.es.resx +++ b/data/resources/StringResources.es.resx @@ -3251,18 +3251,6 @@ También puede escoger almacenar el parámetro de configuración en el archivo . Tipo - - &Siguiente - - - Mostrar sugerencias al inicio - - - Sugerencia del día - - - Sabía qué... - Licencia general pública GNU diff --git a/data/resources/StringResources.fr.resx b/data/resources/StringResources.fr.resx index 4455f581ed..4db26d1e98 100644 --- a/data/resources/StringResources.fr.resx +++ b/data/resources/StringResources.fr.resx @@ -3251,18 +3251,6 @@ Vous pouvez aussi choisir de stocker la configuration dans le fichier .user-file Type - - &Suivant - - - Afficher au démarrage - - - Conseil du jour - - - Savez-vous que... - GNU General Public License diff --git a/data/resources/StringResources.hu.resx b/data/resources/StringResources.hu.resx index 7eed25fae0..8221eabdee 100644 --- a/data/resources/StringResources.hu.resx +++ b/data/resources/StringResources.hu.resx @@ -2327,18 +2327,6 @@ Ugyancsak választhatja hogy a beállításokat .user-fájlban tárolja a projek Típus - - &Következő tipp - - - Mutassa a tippeket indításkor - - - A nap tippje - - - Tudta-e hogy... - GNU Általános Szerződési Feltételek diff --git a/data/resources/StringResources.it.resx b/data/resources/StringResources.it.resx index dc3698c7d4..af56353cad 100644 --- a/data/resources/StringResources.it.resx +++ b/data/resources/StringResources.it.resx @@ -2109,18 +2109,6 @@ Puoi anche scegliere di memorizzare le impostazioni in un file .user invece che Tipo - - &Prossima Idea - - - Mostra suggerimenti all'avvio - - - Suggerimento del giorno - - - Lo sapevate che... - Licenza pubblica generale GNU diff --git a/data/resources/StringResources.kr.resx b/data/resources/StringResources.kr.resx index 39c6104a79..e02ef769f2 100644 --- a/data/resources/StringResources.kr.resx +++ b/data/resources/StringResources.kr.resx @@ -2741,18 +2741,6 @@ ${CurrentProjectName} 프로젝트에 이 새 파일을 더하겠습니까? - - 다음 팁(&N) - - - 시작 시 팁을 보여 줌 - - - 오늘의 팁 - - - 알고 계십니까... - GNU 일반 공개 라이선스 diff --git a/data/resources/StringResources.nl.resx b/data/resources/StringResources.nl.resx index d0780f4334..a9f07aa401 100644 --- a/data/resources/StringResources.nl.resx +++ b/data/resources/StringResources.nl.resx @@ -3254,18 +3254,6 @@ Er kan worden gekozen voor opslag van de instellingen in het .user bestand inpla Type - - Volge&nde Tip - - - Tips tonen bij starten - - - Tip van de dag - - - Wist u ... - GNU General Public License diff --git a/data/resources/StringResources.no.resx b/data/resources/StringResources.no.resx index e93ade05a9..9468d2a7d8 100644 --- a/data/resources/StringResources.no.resx +++ b/data/resources/StringResources.no.resx @@ -2804,18 +2804,6 @@ Du kan også velge å lagre innstillingen i .user-filen istedet for i prosjektfi Type - - &Neste tips - - - Vis tips ved oppstart - - - Dagens tips - - - Visste du at... - GNU General Public License diff --git a/data/resources/StringResources.pl.resx b/data/resources/StringResources.pl.resx index 557489b5e2..45960885c3 100644 --- a/data/resources/StringResources.pl.resx +++ b/data/resources/StringResources.pl.resx @@ -2498,18 +2498,6 @@ Możesz również wybrać przechowywanie ustawienia w pliku użytkownika zamiast Typ - - &Następna - - - Pokazuj porady przy starcie - - - Porada dnia - - - Czy wiesz że... - GNU General Public License diff --git a/data/resources/StringResources.pt-br.resx b/data/resources/StringResources.pt-br.resx index 88082e7e59..e7f9bcf066 100644 --- a/data/resources/StringResources.pt-br.resx +++ b/data/resources/StringResources.pt-br.resx @@ -3016,18 +3016,6 @@ Além disso, um span pode definir um rule set nomedo que permite uma formataçã Tipo - - Próxi&ma Dica - - - Mostrar dicas ao iniciar - - - Dica do Dia - - - Você sabia ... - Licença Pública Geral do GNU diff --git a/data/resources/StringResources.pt.resx b/data/resources/StringResources.pt.resx index 75b30531aa..bb43f8e55b 100644 --- a/data/resources/StringResources.pt.resx +++ b/data/resources/StringResources.pt.resx @@ -2601,18 +2601,6 @@ Pode também escolher guardar o parâmetro num ficheiro .user-file em vez de no Tipo - - &Próxima sugestão - - - Mostra sugestões no início - - - Sugestão do dia - - - Sabia que... - Licença pública GNU geral diff --git a/data/resources/StringResources.resx b/data/resources/StringResources.resx index 61993c9d77..aa10595719 100644 --- a/data/resources/StringResources.resx +++ b/data/resources/StringResources.resx @@ -3260,18 +3260,6 @@ You can also choose to store the setting in the .user-file instead of the projec Type - - &Next Tip - - - Show tips at startup - - - Tip of the Day - - - Did you know... - GNU General Public License diff --git a/data/resources/StringResources.ro.resx b/data/resources/StringResources.ro.resx index ee59ab6ada..00880862a5 100644 --- a/data/resources/StringResources.ro.resx +++ b/data/resources/StringResources.ro.resx @@ -1844,18 +1844,6 @@ Doriţi adăugarea noului fişier la proiectul ${CurrentProjectName}? Tip - - &Următorul - - - Afişare indicii la pornire - - - Indiciul zilei - - - Ştiaţi că... - Licenţă Publică Generală GNU diff --git a/data/resources/StringResources.se.resx b/data/resources/StringResources.se.resx index 21608ecc7e..9591c39f57 100644 --- a/data/resources/StringResources.se.resx +++ b/data/resources/StringResources.se.resx @@ -2137,18 +2137,6 @@ Du kan även välja att lagra inställningen i .user-filen istället för projek Typ - - &Nästa tips - - - Visa tips när programmet startas - - - Dagens tips - - - Visste du att... - Gnu General Public License diff --git a/data/resources/StringResources.tr.resx b/data/resources/StringResources.tr.resx index 4d5b4298c2..2cc5ff87d3 100644 --- a/data/resources/StringResources.tr.resx +++ b/data/resources/StringResources.tr.resx @@ -2556,18 +2556,6 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için Tip - - &Sonraki İpucu - - - Açılışta ipuçlarını göster - - - Günün İpucu - - - Biliyor muydunuz... - GNU Genel Kamu Lisansı From 9950790ab11a7a79d2c60186baf849acf82655f5 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 22:33:55 +0200 Subject: [PATCH 15/19] removed file load code duplication; replaced by ParserService.GetParseableFileContent --- .../Src/PropertyRefactoringMenuBuilder.cs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/PropertyRefactoringMenuBuilder.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/PropertyRefactoringMenuBuilder.cs index a903ee9725..a870ffcd0e 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/PropertyRefactoringMenuBuilder.cs +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/PropertyRefactoringMenuBuilder.cs @@ -75,21 +75,7 @@ namespace SharpRefactoring if (fileName == null) return false; - IDocument document; - ITextEditorProvider provider = FileService.GetOpenFile(fileName) as ITextEditorProvider; - - if (provider == null) { - if (!File.Exists(fileName)) - return false; - try { - document = DocumentUtilitites.LoadDocumentFromBuffer(new StringTextBuffer(File.ReadAllText(fileName))); - } catch (IOException) { - return false; - } - } else { - document = provider.TextEditor.Document; - } - + IDocument document = DocumentUtilitites.LoadDocumentFromBuffer(ParserService.GetParseableFileContent(fileName)); bool isAutomatic = false; if (property.CanGet) { From 5388ce84da93333f87dda6b27337612e06267e99 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 22:52:25 +0200 Subject: [PATCH 16/19] added missing documentation comments to new Snippet classes --- .../Snippets/InsertionContext.cs | 3 ++ .../Snippets/SnippetAnchorElement.cs | 28 +++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/InsertionContext.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/InsertionContext.cs index 984f03a4dc..befbf505d3 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/InsertionContext.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/InsertionContext.cs @@ -92,6 +92,9 @@ namespace ICSharpCode.AvalonEdit.Snippets AnchorSegment wholeSnippetAnchor; bool deactivateIfSnippetEmpty; + /// + /// Gets the start position of the snippet insertion. + /// public int StartPosition { get { if (wholeSnippetAnchor != null) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetAnchorElement.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetAnchorElement.cs index 111e0bfcab..53edc37851 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetAnchorElement.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetAnchorElement.cs @@ -10,17 +10,25 @@ using ICSharpCode.AvalonEdit.Document; namespace ICSharpCode.AvalonEdit.Snippets { + /// + /// Creates a named anchor that can be accessed by other SnippetElements. + /// public sealed class SnippetAnchorElement : SnippetElement { - string textToInsert = ""; - + /// + /// Gets or sets the name of the anchor. + /// public string Name { get; private set; } + /// + /// Creates a SnippetAnchorElement with the supplied name. + /// public SnippetAnchorElement(string name) { this.Name = name; } + /// public override void Insert(InsertionContext context) { int start = context.InsertionPosition; @@ -29,8 +37,12 @@ namespace ICSharpCode.AvalonEdit.Snippets } } + /// + /// AnchorElement created by SnippetAnchorElement. + /// public sealed class AnchorElement : IActiveElement { + /// public bool IsEditable { get { return false; } } @@ -38,10 +50,14 @@ namespace ICSharpCode.AvalonEdit.Snippets AnchorSegment segment; InsertionContext context; + /// public ISegment Segment { get { return segment; } } + /// + /// Creates a new AnchorElement. + /// public AnchorElement(AnchorSegment segment, string text, string name, InsertionContext context) { this.segment = segment; @@ -50,6 +66,9 @@ namespace ICSharpCode.AvalonEdit.Snippets this.Name = name; } + /// + /// Gets or sets the text at the anchor. + /// public string Text { get { return context.Document.GetText(segment); } set { @@ -63,12 +82,17 @@ namespace ICSharpCode.AvalonEdit.Snippets } } + /// + /// Gets or sets the name of the anchor. + /// public string Name { get; private set; } + /// public void OnInsertionCompleted() { } + /// public void Deactivate(SnippetEventArgs e) { } From 085cc3b5c38da3ba239f5ea237d98c220923d23f Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 2 Sep 2010 22:53:15 +0200 Subject: [PATCH 17/19] reset visibility of SetCaret to internal --- .../ICSharpCode.AvalonEdit/Snippets/SnippetCaretElement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetCaretElement.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetCaretElement.cs index d0532892e9..2d11e4814b 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetCaretElement.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetCaretElement.cs @@ -24,7 +24,7 @@ namespace ICSharpCode.AvalonEdit.Snippets SetCaret(context); } - public static void SetCaret(InsertionContext context) + internal static void SetCaret(InsertionContext context) { TextAnchor pos = context.Document.CreateAnchor(context.InsertionPosition); pos.SurviveDeletion = true; From 6add010c749908a5812b95b5f0cc270b558e9cd1 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 3 Sep 2010 08:15:55 +0200 Subject: [PATCH 18/19] suppress CS1591 and CS1574 in AvalonDock --- src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj b/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj index c65adb1df5..569bb7b942 100644 --- a/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj +++ b/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj @@ -14,13 +14,15 @@ Client 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 False File ..\..\..\..\bin\ False False false + 4 + OnBuildSuccess + 1591, 1574 true @@ -28,14 +30,12 @@ false TRACE;DEBUG;NET4 prompt - 4 pdbonly true TRACE;NET4 prompt - 4 $(OutputPath)\AvalonDock.XML @@ -252,10 +252,6 @@ - - - -