Browse Source

Merge bugfixes from revision 4108 to trunk:

WpfWorkbench: fixed MainWin32Window property
 NRefactoryCodeCompletionBinding: fixed NullReferenceException in context completion for enums
 EditingCommandHandler: support copying of whole lines

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4125 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts^2
Daniel Grunwald 16 years ago
parent
commit
7ec09f2873
  1. 5
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Gui/EditingCommandHandler.cs
  2. 2
      src/Main/Base/Project/Src/Editor/CodeCompletion/NRefactoryCodeCompletionBinding.cs
  3. 7
      src/Main/Base/Project/Src/Gui/Workbench/WpfWorkbench.cs

5
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Gui/EditingCommandHandler.cs

@ -202,7 +202,12 @@ namespace ICSharpCode.AvalonEdit.Gui @@ -202,7 +202,12 @@ namespace ICSharpCode.AvalonEdit.Gui
{
TextArea textArea = GetTextArea(target);
if (textArea != null && textArea.Document != null) {
if (textArea.Selection.IsEmpty && textArea.Options.CutCopyWholeLine) {
DocumentLine currentLine = textArea.Document.GetLineByNumber(textArea.Caret.Line);
CopyWholeLine(textArea, currentLine);
} else {
CopySelectedText(textArea);
}
args.Handled = true;
}
}

2
src/Main/Base/Project/Src/Editor/CodeCompletion/NRefactoryCodeCompletionBinding.cs

@ -164,7 +164,7 @@ namespace ICSharpCode.SharpDevelop.Editor @@ -164,7 +164,7 @@ namespace ICSharpCode.SharpDevelop.Editor
contextList.activationKey = charTyped;
foreach (CodeCompletionItem item in contextList.Items.OfType<CodeCompletionItem>()) {
IClass itemClass = item.Entity as IClass;
if (c != null && c.FullyQualifiedName == itemClass.FullyQualifiedName && c.TypeParameters.Count == itemClass.TypeParameters.Count) {
if (itemClass != null && c.FullyQualifiedName == itemClass.FullyQualifiedName && c.TypeParameters.Count == itemClass.TypeParameters.Count) {
contextList.SuggestedItem = item;
break;
}

7
src/Main/Base/Project/Src/Gui/Workbench/WpfWorkbench.cs

@ -63,10 +63,15 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -63,10 +63,15 @@ namespace ICSharpCode.SharpDevelop.Gui
public WpfWorkbench()
{
this.SynchronizingObject = new WpfSynchronizeInvoke(this.Dispatcher);
this.MainWin32Window = this.GetWin32Window();
InitializeComponent();
}
protected override void OnSourceInitialized(EventArgs e)
{
this.MainWin32Window = this.GetWin32Window();
base.OnSourceInitialized(e);
}
public void Initialize()
{
foreach (PadDescriptor content in AddInTree.BuildItems<PadDescriptor>(viewContentPath, this, false)) {

Loading…
Cancel
Save