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. 40
      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

40
data/resources/layouts/Debug.xml

@ -1,28 +1,30 @@
<DockingManager> <DockingManager>
<ResizingPanel ResizeWidth="*" ResizeHeight="*" Orientation="Horizontal"> <ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1076,904.08" Orientation="Vertical">
<DockablePane ResizeWidth="200" ResizeHeight="*" Anchor="Left"> <ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1257.04,717.08" Orientation="Horizontal">
<DockableContent Name="ICSharpCode_SharpDevelop_Project_ProjectBrowserPad" AutoHide="false" EffectiveSize="0,0" /> <DockablePane ResizeWidth="200" ResizeHeight="*" EffectiveSize="200,717.08" Anchor="Left">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ToolsPad" AutoHide="false" EffectiveSize="0,0" /> <DockableContent Name="ICSharpCode_SharpDevelop_Project_ProjectBrowserPad" AutoHide="false" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ToolsPad" AutoHide="false" />
</DockablePane> </DockablePane>
<ResizingPanel ResizeWidth="*" ResizeHeight="*" Orientation="Vertical">
<DocumentPanePlaceHolder /> <DocumentPanePlaceHolder />
<ResizingPanel ResizeWidth="*" ResizeHeight="226" Orientation="Horizontal"> <DockablePane ResizeWidth="200" ResizeHeight="*" EffectiveSize="200,717.08" Anchor="Right">
<DockablePane ResizeWidth="0.439330543933054*" ResizeHeight="226" Anchor="Bottom"> <DockableContent Name="ICSharpCode_SharpDevelop_Gui_ClassBrowser_ClassBrowserPad" AutoHide="true" />
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_CompilerMessageView" AutoHide="false" FloatingWindowSize="1280,199" EffectiveSize="0,0" /> <DockableContent Name="ICSharpCode_SharpDevelop_Gui_PropertyPad" AutoHide="true" />
<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>
<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>
</ResizingPanel> </ResizingPanel>
<DockablePane ResizeWidth="334" ResizeHeight="*" Anchor="Right"> <ResizingPanel ResizeWidth="*" ResizeHeight="183" EffectiveSize="1257.04,183" Orientation="Horizontal">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_ClassBrowser_ClassBrowserPad" AutoHide="true" EffectiveSize="0,0" /> <DockablePane ResizeWidth="0.516044590840343*" ResizeHeight="150" EffectiveSize="646.624514106583,183" Anchor="Bottom">
<DockableContent Name="ICSharpCode_SharpDevelop_Gui_PropertyPad" AutoHide="true" EffectiveSize="0,0" /> <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>
<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>
</ResizingPanel> </ResizingPanel>
<Hidden />
<Windows /> <Windows />
</DockingManager> </DockingManager>

25
data/resources/layouts/Default.xml

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

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

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

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

@ -94,7 +94,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
textView.LineTransformers.Add(textMarkerService); textView.LineTransformers.Add(textMarkerService);
textView.Services.AddService(typeof(ITextMarkerService), textMarkerService); textView.Services.AddService(typeof(ITextMarkerService), textMarkerService);
quickClassBrowser.JumpAction = quickClassBrowser_Jump; quickClassBrowser.JumpAction = JumpTo;
SetDock(quickClassBrowser, Dock.Top); SetDock(quickClassBrowser, Dock.Top);
this.Children.Add(quickClassBrowser); this.Children.Add(quickClassBrowser);
this.Children.Add(textEditor); this.Children.Add(textEditor);
@ -105,7 +105,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
InvalidateQuickClassBrowserCaretPosition(); InvalidateQuickClassBrowserCaretPosition();
} }
bool quickClassBrowserCaretPositionIsValid; bool quickClassBrowserCaretPositionInvalid;
/// <summary> /// <summary>
/// Only call 'SelectItemAtCaretPosition' once when the caret position /// Only call 'SelectItemAtCaretPosition' once when the caret position
@ -113,20 +113,22 @@ namespace ICSharpCode.AvalonEdit.AddIn
/// </summary> /// </summary>
void InvalidateQuickClassBrowserCaretPosition() void InvalidateQuickClassBrowserCaretPosition()
{ {
if (quickClassBrowserCaretPositionIsValid) { if (!quickClassBrowserCaretPositionInvalid) {
quickClassBrowserCaretPositionIsValid = false; quickClassBrowserCaretPositionInvalid = true;
Dispatcher.BeginInvoke( Dispatcher.BeginInvoke(
DispatcherPriority.Normal, DispatcherPriority.Normal,
new Action( new Action(
delegate { delegate {
quickClassBrowserCaretPositionInvalid = false;
quickClassBrowser.SelectItemAtCaretPosition(textEditorAdapter.Caret.Position); 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(); textEditor.Focus();
} }

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

@ -229,9 +229,9 @@ namespace ICSharpCode.AvalonEdit.AddIn
{ {
if (region.IsEmpty) if (region.IsEmpty)
return; return;
Action<DomRegion> jumpAction = this.JumpAction; Action<int, int> jumpAction = this.JumpAction;
if (item.IsInSamePart && jumpAction != null) { if (item.IsInSamePart && jumpAction != null) {
jumpAction(region); jumpAction(region.BeginLine, region.BeginColumn);
} else { } else {
FileService.JumpToFilePosition(item.Entity.CompilationUnit.FileName, region.BeginLine, region.BeginColumn); FileService.JumpToFilePosition(item.Entity.CompilationUnit.FileName, region.BeginLine, region.BeginColumn);
} }
@ -240,6 +240,6 @@ namespace ICSharpCode.AvalonEdit.AddIn
/// <summary> /// <summary>
/// Action used for jumping to a position inside the current file. /// Action used for jumping to a position inside the current file.
/// </summary> /// </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
get; get;
} }
/// <summary>
/// Gets whether this entity is static.
/// Returns true if either the 'static' or the 'const' modifier is set.
/// </summary>
bool IsStatic { bool IsStatic {
get; get;
} }
/// <summary>
/// Gets whether this entity is a constant (C#-like const).
/// </summary>
bool IsConst { bool IsConst {
get; get;
} }
@ -93,7 +100,6 @@ namespace ICSharpCode.SharpDevelop.Dom
get; get;
} }
bool IsInternal { bool IsInternal {
get; get;
} }

Loading…
Cancel
Save