Browse Source

Update to AvalonDock 1.2.2104.

Fixed bugs in new QuickClassBrowser.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4006 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 16 years ago
parent
commit
96887f5d5a
  1. 46
      data/resources/layouts/Debug.xml
  2. 25
      data/resources/layouts/Default.xml
  3. 2
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditViewContent.cs
  4. 14
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs
  5. 6
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.cs
  6. BIN
      src/Libraries/AvalonDock/AvalonDock.dll
  7. 8
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Interfaces/IEntity.cs

46
data/resources/layouts/Debug.xml

@ -1,28 +1,30 @@ @@ -1,28 +1,30 @@
<DockingManager>
<ResizingPanel ResizeWidth="*" ResizeHeight="*" Orientation="Horizontal">
<DockablePane ResizeWidth="200" ResizeHeight="*" Anchor="Left">
<DockableContent Name="ICSharpCode_SharpDevelop_Project_ProjectBrowserPad" AutoHide="false" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ToolsPad" AutoHide="false" EffectiveSize="0,0" />
</DockablePane>
<ResizingPanel ResizeWidth="*" ResizeHeight="*" Orientation="Vertical">
<ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1076,904.08" Orientation="Vertical">
<ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1257.04,717.08" Orientation="Horizontal">
<DockablePane ResizeWidth="200" ResizeHeight="*" EffectiveSize="200,717.08" Anchor="Left">
<DockableContent Name="ICSharpCode_SharpDevelop_Project_ProjectBrowserPad" AutoHide="false" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ToolsPad" AutoHide="false" />
</DockablePane>
<DocumentPanePlaceHolder />
<ResizingPanel ResizeWidth="*" ResizeHeight="226" Orientation="Horizontal">
<DockablePane ResizeWidth="0.439330543933054*" ResizeHeight="226" Anchor="Bottom">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_CompilerMessageView" AutoHide="false" FloatingWindowSize="1280,199" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_LocalVarPad" AutoHide="false" FloatingWindowSize="506,655.08" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_RunningThreadsPad" AutoHide="false" FloatingWindowSize="506,655.08" EffectiveSize="0,0" />
</DockablePane>
<DockablePane ResizeWidth="0.560669456066946*" ResizeHeight="*" Anchor="Bottom">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_ConsolePad" AutoHide="false" FloatingWindowSize="506,904.08" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_CallStackPad" AutoHide="false" FloatingWindowSize="506,655.08" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_LoadedModulesPad" AutoHide="false" FloatingWindowSize="506,655.08" EffectiveSize="0,0" />
</DockablePane>
</ResizingPanel>
<DockablePane ResizeWidth="200" ResizeHeight="*" EffectiveSize="200,717.08" Anchor="Right">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ClassBrowser_ClassBrowserPad" AutoHide="true" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_PropertyPad" AutoHide="true" />
</DockablePane>
</ResizingPanel>
<ResizingPanel ResizeWidth="*" ResizeHeight="183" EffectiveSize="1257.04,183" Orientation="Horizontal">
<DockablePane ResizeWidth="0.516044590840343*" ResizeHeight="150" EffectiveSize="646.624514106583,183" Anchor="Bottom">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ErrorListPad" AutoHide="false" FloatingWindowSize="1280,150" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_CompilerMessageView" AutoHide="false" FloatingWindowSize="1280,150" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_RunningThreadsPad" AutoHide="false" FloatingWindowSize="128,904.08" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_LocalVarPad" AutoHide="false" FloatingWindowSize="123,904.08" />
</DockablePane>
<DockablePane ResizeWidth="0.483955409159657*" ResizeHeight="*" EffectiveSize="606.415485893417,183" Anchor="Bottom">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_CallStackPad" AutoHide="false" FloatingWindowSize="640,904.08" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_ConsolePad" AutoHide="false" FloatingWindowSize="175,904.08" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_Pads_WatchPad" AutoHide="false" FloatingWindowSize="200,904.08" />
</DockablePane>
</ResizingPanel>
<DockablePane ResizeWidth="334" ResizeHeight="*" Anchor="Right">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ClassBrowser_ClassBrowserPad" AutoHide="true" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_PropertyPad" AutoHide="true" EffectiveSize="0,0" />
</DockablePane>
</ResizingPanel>
<Hidden />
<Windows />
</DockingManager>

25
data/resources/layouts/Default.xml

@ -1,21 +1,22 @@ @@ -1,21 +1,22 @@
<DockingManager>
<ResizingPanel ResizeWidth="*" ResizeHeight="*" Orientation="Horizontal">
<DockablePane ResizeWidth="200" ResizeHeight="*" Anchor="Left">
<DockableContent Name="ICSharpCode_SharpDevelop_Project_ProjectBrowserPad" AutoHide="false" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ToolsPad" AutoHide="false" EffectiveSize="0,0" />
<ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="0,0" Orientation="Horizontal">
<DockablePane ResizeWidth="200" ResizeHeight="*" EffectiveSize="200,904.08" Anchor="Left">
<DockableContent Name="ICSharpCode_SharpDevelop_Project_ProjectBrowserPad" AutoHide="false" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ToolsPad" AutoHide="false" />
</DockablePane>
<ResizingPanel ResizeWidth="*" ResizeHeight="*" Orientation="Vertical">
<ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="872,904.08" Orientation="Vertical">
<DocumentPanePlaceHolder />
<DockablePane ResizeWidth="*" ResizeHeight="226" Anchor="Bottom">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ErrorListPad" AutoHide="false" FloatingWindowSize="1280,199" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_TaskListPad" AutoHide="false" FloatingWindowSize="1280,199" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_CompilerMessageView" AutoHide="false" FloatingWindowSize="1280,199" EffectiveSize="0,0" />
<DockablePane ResizeWidth="*" ResizeHeight="150" EffectiveSize="872,150" Anchor="Bottom">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ErrorListPad" AutoHide="false" FloatingWindowSize="1280,150" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_TaskListPad" AutoHide="false" FloatingWindowSize="1280,150" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_CompilerMessageView" AutoHide="false" FloatingWindowSize="1280,150" />
</DockablePane>
</ResizingPanel>
<DockablePane ResizeWidth="200" ResizeHeight="*" Anchor="Right">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ClassBrowser_ClassBrowserPad" AutoHide="false" EffectiveSize="0,0" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_PropertyPad" AutoHide="false" EffectiveSize="0,0" />
<DockablePane ResizeWidth="200" ResizeHeight="*" EffectiveSize="200,904.08" Anchor="Right">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ClassBrowser_ClassBrowserPad" AutoHide="false" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_PropertyPad" AutoHide="false" />
</DockablePane>
</ResizingPanel>
<Hidden />
<Windows />
</DockingManager>

2
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditViewContent.cs

@ -212,7 +212,7 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -212,7 +212,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
public void JumpTo(int line, int column)
{
codeEditor.TextEditor.TextArea.Caret.Position = new TextViewPosition(line, column);
codeEditor.JumpTo(line, column);
}
#endregion

14
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs

@ -94,7 +94,7 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -94,7 +94,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
textView.LineTransformers.Add(textMarkerService);
textView.Services.AddService(typeof(ITextMarkerService), textMarkerService);
quickClassBrowser.JumpAction = quickClassBrowser_Jump;
quickClassBrowser.JumpAction = JumpTo;
SetDock(quickClassBrowser, Dock.Top);
this.Children.Add(quickClassBrowser);
this.Children.Add(textEditor);
@ -105,7 +105,7 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -105,7 +105,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
InvalidateQuickClassBrowserCaretPosition();
}
bool quickClassBrowserCaretPositionIsValid;
bool quickClassBrowserCaretPositionInvalid;
/// <summary>
/// Only call 'SelectItemAtCaretPosition' once when the caret position
@ -113,20 +113,22 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -113,20 +113,22 @@ namespace ICSharpCode.AvalonEdit.AddIn
/// </summary>
void InvalidateQuickClassBrowserCaretPosition()
{
if (quickClassBrowserCaretPositionIsValid) {
quickClassBrowserCaretPositionIsValid = false;
if (!quickClassBrowserCaretPositionInvalid) {
quickClassBrowserCaretPositionInvalid = true;
Dispatcher.BeginInvoke(
DispatcherPriority.Normal,
new Action(
delegate {
quickClassBrowserCaretPositionInvalid = false;
quickClassBrowser.SelectItemAtCaretPosition(textEditorAdapter.Caret.Position);
}));
}
}
void quickClassBrowser_Jump(DomRegion region)
public void JumpTo(int line, int column)
{
textEditor.TextArea.Caret.Position = new TextViewPosition(region.BeginLine, region.BeginColumn);
// the adapter sets the caret position and takes care of scrolling
textEditorAdapter.JumpTo(line, column);
textEditor.Focus();
}

6
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.cs

@ -229,9 +229,9 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -229,9 +229,9 @@ namespace ICSharpCode.AvalonEdit.AddIn
{
if (region.IsEmpty)
return;
Action<DomRegion> jumpAction = this.JumpAction;
Action<int, int> jumpAction = this.JumpAction;
if (item.IsInSamePart && jumpAction != null) {
jumpAction(region);
jumpAction(region.BeginLine, region.BeginColumn);
} else {
FileService.JumpToFilePosition(item.Entity.CompilationUnit.FileName, region.BeginLine, region.BeginColumn);
}
@ -240,6 +240,6 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -240,6 +240,6 @@ namespace ICSharpCode.AvalonEdit.AddIn
/// <summary>
/// Action used for jumping to a position inside the current file.
/// </summary>
public Action<DomRegion> JumpAction { get; set; }
public Action<int, int> JumpAction { get; set; }
}
}

BIN
src/Libraries/AvalonDock/AvalonDock.dll

Binary file not shown.

8
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Interfaces/IEntity.cs

@ -65,10 +65,17 @@ namespace ICSharpCode.SharpDevelop.Dom @@ -65,10 +65,17 @@ namespace ICSharpCode.SharpDevelop.Dom
get;
}
/// <summary>
/// Gets whether this entity is static.
/// Returns true if either the 'static' or the 'const' modifier is set.
/// </summary>
bool IsStatic {
get;
}
/// <summary>
/// Gets whether this entity is a constant (C#-like const).
/// </summary>
bool IsConst {
get;
}
@ -93,7 +100,6 @@ namespace ICSharpCode.SharpDevelop.Dom @@ -93,7 +100,6 @@ namespace ICSharpCode.SharpDevelop.Dom
get;
}
bool IsInternal {
get;
}

Loading…
Cancel
Save