Browse Source

Added support for IViewContent navigation history (known in the Wiki as Code Navigation). Basic documentation available in the XML comments for ICSharpCode.Core.NavigationService

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1569 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Alpert 20 years ago
parent
commit
9b96afbfde
  1. 23
      AddIns/ICSharpCode.SharpDevelop.addin
  2. 7
      data/resources/image/BitmapResources/BitmapResources.res
  3. BIN
      data/resources/image/BitmapResources/NavigationIcons/Icons.16x16.NavigateBack.disabled.png
  4. BIN
      data/resources/image/BitmapResources/NavigationIcons/Icons.16x16.NavigateBack.png
  5. BIN
      data/resources/image/BitmapResources/NavigationIcons/Icons.16x16.NavigateForward.png
  6. 12
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
  7. 29
      src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj
  8. 30
      src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj.user
  9. 7
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  10. 122
      src/Main/Base/Project/Src/Commands/MenuItemBuilders.cs
  11. 83
      src/Main/Base/Project/Src/Commands/NavigationCommands.cs
  12. 7
      src/Main/Base/Project/Src/Gui/AbstractViewContent.cs
  13. 8
      src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/HtmlViewPane.cs
  14. 14
      src/Main/Base/Project/Src/Gui/ContentInterfaces/IPositionable.cs
  15. 7
      src/Main/Base/Project/Src/Gui/IViewContent.cs
  16. 30
      src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/ProjectBrowserControl.cs
  17. 38
      src/Main/Base/Project/Src/Internal/ConditionEvaluators/NavigationConditionEvaluators.cs
  18. 11
      src/Main/Base/Project/Src/Services/File/FileService.cs
  19. 130
      src/Main/Base/Project/Src/Services/NavigationService/DefaultNavigationPoint.cs
  20. 85
      src/Main/Base/Project/Src/Services/NavigationService/INavigationPoint.cs
  21. 317
      src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs
  22. 35
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs
  23. 62
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorNavigationPoint.cs
  24. 116
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextNavigationPoint.cs
  25. 4
      src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj
  26. 114
      src/Main/Base/Test/Services_Navigation/INavigationPointTextFixture.cs
  27. 616
      src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs
  28. 70
      src/Main/Base/Test/Services_Navigation/TestNavigationPoint.cs
  29. 8
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/Gui/ToolBarSplitButton.cs
  30. BIN
      src/Main/StartUp/Project/Resources/BitmapResources.resources
  31. 3
      src/Main/StartUp/Project/SharpDevelopMain.cs
  32. 6
      src/SharpDevelop.Tests.sln
  33. 2
      src/SharpDevelop.sln

23
AddIns/ICSharpCode.SharpDevelop.addin

@ -890,6 +890,29 @@
<ToolbarItem id = "ChooseLayout" <ToolbarItem id = "ChooseLayout"
type = "ComboBox" type = "ComboBox"
class = "ICSharpCode.SharpDevelop.Commands.ChooseLayoutCommand" /> class = "ICSharpCode.SharpDevelop.Commands.ChooseLayoutCommand" />
<ToolbarItem id="NavigationSeparator" type="Separator"/>
<Condition name="CanNavigateBack" action="Disable">
<ToolbarItem id="NavigateBack"
type="SplitButton"
icon="Icons.16x16.NavigateBack"
tooltip="Navigate Back"
disabledIcon="Icons.16x16.NavigateBack"
loadclasslazy="false"
class="ICSharpCode.SharpDevelop.Commands.NavigateBack"
>
<MenuItem id="NavigationHistoryBuilder"
type="Builder"
class="ICSharpCode.SharpDevelop.Commands.NavigationHistoryMenuBuilder"/>
</ToolbarItem>
</Condition>
<Condition name="CanNavigateForward" action="Disable">
<ToolbarItem id="NavigateForward"
icon="Icons.16x16.NavigateForward"
tooltip="Navigate Forward"
loadclasslazy="false"
class="ICSharpCode.SharpDevelop.Commands.NavigateForward"/>
</Condition>
</Path> </Path>
<!-- end toolbars --> <!-- end toolbars -->

7
data/resources/image/BitmapResources/BitmapResources.res

@ -1,6 +1,6 @@
# this file was automatically generated by ResAsm # this file was automatically generated by ResAsm
Icons.Svn.StatusImages = SubversionIcons\Svn.StatusImages.png Icons.Svn.StatusImages = SubversionIcons\Svn.StatusImages.png
Svn.ApplyPatch = SubversionIcons\Svn.ApplyPatch.png Svn.ApplyPatch = SubversionIcons\Svn.ApplyPatch.png
Svn.Checkout = SubversionIcons\Svn.Checkout.png Svn.Checkout = SubversionIcons\Svn.Checkout.png
Svn.Commit = SubversionIcons\Svn.Commit.png Svn.Commit = SubversionIcons\Svn.Commit.png
@ -490,6 +490,9 @@ Icons.16x16.SharpReport.Function = SharpReportIcons\Icons.16x16.SharpReport.Func
Icons.16.16.SharpReport.Textbox = SharpReportIcons\Icons.16.16.SharpReport.Textbox.ico Icons.16.16.SharpReport.Textbox = SharpReportIcons\Icons.16.16.SharpReport.Textbox.ico
Icons.16.16.SharpReport.Line = SharpReportIcons\Icons.16.16.SharpReport.Line.ico Icons.16.16.SharpReport.Line = SharpReportIcons\Icons.16.16.SharpReport.Line.ico
#ViewNavigation icons
Icons.16x16.NavigateBack = NavigationIcons\Icons.16x16.NavigateBack.png
Icons.16x16.NavigateBack.disabled = NavigationIcons\Icons.16x16.NavigateBack.disabled.png
Icons.16x16.NavigateForward = NavigationIcons\Icons.16x16.NavigateForward.png

BIN
data/resources/image/BitmapResources/NavigationIcons/Icons.16x16.NavigateBack.disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

BIN
data/resources/image/BitmapResources/NavigationIcons/Icons.16x16.NavigateBack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

BIN
data/resources/image/BitmapResources/NavigationIcons/Icons.16x16.NavigateForward.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

12
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

@ -456,6 +456,18 @@ namespace ICSharpCode.XmlEditor
xmlEditor.ActiveTextAreaControl.JumpTo(line, column); xmlEditor.ActiveTextAreaControl.JumpTo(line, column);
} }
public int Line {
get {
return xmlEditor.ActiveTextAreaControl.Caret.Line;
}
}
public int Column {
get {
return xmlEditor.ActiveTextAreaControl.Caret.Column;
}
}
#endregion #endregion
protected override void OnFileNameChanged(EventArgs e) protected override void OnFileNameChanged(EventArgs e)

29
src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj

@ -23,43 +23,28 @@
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<BaseAddress>101187584</BaseAddress> <BaseAddress>101187584</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG;FRAMEWORK_VER_2x</DefineConstants> <DefineConstants>TRACE;DEBUG;FRAMEWORK_VER_2x</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib> <NoStdLib>false</NoStdLib>
<NoWarn> <Optimize>False</Optimize>
</NoWarn> <RegisterForComInterop>False</RegisterForComInterop>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks> <RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Maintainability#CA1502;-Microsoft.Maintainability#CA1501;-Microsoft.Maintainability#CA1500;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230</CodeAnalysisRules> <CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Maintainability#CA1502;-Microsoft.Maintainability#CA1501;-Microsoft.Maintainability#CA1500;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230</CodeAnalysisRules>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<Optimize>False</Optimize>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<RegisterForComInterop>False</RegisterForComInterop>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks> <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>101187584</BaseAddress> <BaseAddress>101187584</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;FRAMEWORK_VER_2x</DefineConstants> <DefineConstants>TRACE;FRAMEWORK_VER_2x</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>false</DebugSymbols> <DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib> <NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop> <RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks> <RemoveIntegerChecks>false</RemoveIntegerChecks>
@ -309,6 +294,8 @@
<EmbeddedResource Include="Resources\DockPaneStrip.ScrollRightEnabled.bmp" /> <EmbeddedResource Include="Resources\DockPaneStrip.ScrollRightEnabled.bmp" />
<EmbeddedResource Include="Resources\MdiClientController.bmp" /> <EmbeddedResource Include="Resources\MdiClientController.bmp" />
<EmbeddedResource Include="Strings.resX" /> <EmbeddedResource Include="Strings.resX" />
</ItemGroup>
<ItemGroup>
<Content Include="Controls\CodeDoc\InertButton.xml" /> <Content Include="Controls\CodeDoc\InertButton.xml" />
<Content Include="Docking\CodeDoc\AutoHidePane.xml" /> <Content Include="Docking\CodeDoc\AutoHidePane.xml" />
<Content Include="Docking\CodeDoc\AutoHidePaneCollection.xml" /> <Content Include="Docking\CodeDoc\AutoHidePaneCollection.xml" />
@ -339,15 +326,7 @@
<Content Include="Docking\CodeDoc\FloatWindowCollection.xml" /> <Content Include="Docking\CodeDoc\FloatWindowCollection.xml" />
<Content Include="Docking\CodeDoc\Interfaces.xml" /> <Content Include="Docking\CodeDoc\Interfaces.xml" />
<Content Include="Docking\CodeDoc\NestedDockingStatus.xml" /> <Content Include="Docking\CodeDoc\NestedDockingStatus.xml" />
</ItemGroup>
<ItemGroup>
<Service Include="{967B4E0D-AD0C-4609-AB67-0FA40C0206D8}" /> <Service Include="{967B4E0D-AD0C-4609-AB67-0FA40C0206D8}" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

30
src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj.user

@ -3,12 +3,6 @@
<LastOpenVersion>8.0.50215</LastOpenVersion> <LastOpenVersion>8.0.50215</LastOpenVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ReferencePath>
</ReferencePath>
<CopyProjectDestinationFolder>
</CopyProjectDestinationFolder>
<CopyProjectUncPath>
</CopyProjectUncPath>
<CopyProjectOption>0</CopyProjectOption> <CopyProjectOption>0</CopyProjectOption>
<ProjectView>ProjectFiles</ProjectView> <ProjectView>ProjectFiles</ProjectView>
<ProjectTrust>0</ProjectTrust> <ProjectTrust>0</ProjectTrust>
@ -19,19 +13,7 @@
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging> <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled> <RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction> <StartAction>Project</StartAction>
<StartArguments>
</StartArguments>
<StartPage>
</StartPage>
<StartProgram>
</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>true</StartWithIE> <StartWithIE>true</StartWithIE>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@ -40,19 +22,7 @@
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging> <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled> <RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction> <StartAction>Project</StartAction>
<StartArguments>
</StartArguments>
<StartPage>
</StartPage>
<StartProgram>
</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>false</StartWithIE> <StartWithIE>false</StartWithIE>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

7
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -776,7 +776,13 @@
<Compile Include="Src\TextEditor\Gui\Editor\AdvancedHighlighter.cs" /> <Compile Include="Src\TextEditor\Gui\Editor\AdvancedHighlighter.cs" />
<Compile Include="Src\Dom\Implementations\SystemTypes.cs" /> <Compile Include="Src\Dom\Implementations\SystemTypes.cs" />
<Compile Include="Src\Dom\CecilReader.cs" /> <Compile Include="Src\Dom\CecilReader.cs" />
<Compile Include="Src\Services\NavigationService\DefaultNavigationPoint.cs" />
<Compile Include="Src\TextEditor\Gui\Editor\ITextAreaToolTipProvider.cs" /> <Compile Include="Src\TextEditor\Gui\Editor\ITextAreaToolTipProvider.cs" />
<Compile Include="Src\Services\NavigationService\INavigationPoint.cs" />
<Compile Include="Src\Services\NavigationService\NavigationService.cs" />
<Compile Include="Src\Commands\NavigationCommands.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\NavigationConditionEvaluators.cs" />
<Compile Include="Src\TextEditor\Gui\Editor\TextNavigationPoint.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj"> <ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj">
@ -803,6 +809,7 @@
</Content> </Content>
<Folder Include="Src\Util" /> <Folder Include="Src\Util" />
<Folder Include="Src\Gui\Pads\ClassBrowser\NodeBuilder" /> <Folder Include="Src\Gui\Pads\ClassBrowser\NodeBuilder" />
<Folder Include="Src\Services\NavigationService" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project> </Project>

122
src/Main/Base/Project/Src/Commands/MenuItemBuilders.cs

@ -9,6 +9,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Collections; using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using System.Text; using System.Text;
@ -20,6 +21,127 @@ using ICSharpCode.SharpDevelop.Internal.ExternalTool;
namespace ICSharpCode.SharpDevelop.Commands namespace ICSharpCode.SharpDevelop.Commands
{ {
public class NavigationHistoryMenuBuilder : ISubmenuBuilder
{
// TODO: refactor BuildSubmenu to add a choice between flat and perfile, eventually per class/method sorting of the list
ToolStripItem[] BuildMenuFlat(List<INavigationPoint> points, int additionalItems)
{
ToolStripItem[] items = new ToolStripItem[points.Count+additionalItems];
MenuCommand cmd = null;
INavigationPoint p = null;
int n = points.Count-1; // the last point
int i = 0;
while (i<points.Count) {
p = points[n-i];
cmd = new MenuCommand(p.Description, new EventHandler(NavigateTo));
cmd.Tag = p;
// if (p == NavigationService.CurrentPosition) {
// cmd.Text = "*** "+cmd.Text;
// }
items[i++] = cmd;
}
return items;
}
ToolStripItem[] BuildMenuByFile(List<INavigationPoint> points, int additionalItems)
{
Dictionary<string, List<INavigationPoint>> files =
new Dictionary<string, List<INavigationPoint>>();
List<string> fileNames = new List<string>();
foreach (INavigationPoint p in points) {
if (p.FileName==null) {
throw new ApplicationException("should not get here!");
}
if (!fileNames.Contains(p.FileName)) {
fileNames.Add(p.FileName);
files.Add(p.FileName, new List<INavigationPoint>());
}
if (!files[p.FileName].Contains(p)) {
files[p.FileName].Add(p);
}
}
fileNames.Sort();
ToolStripItem[] items =
new ToolStripItem[fileNames.Count + additionalItems];
ToolStripMenuItem containerItem = null;
MenuCommand cmd = null;
int i = 0;
foreach (string fname in fileNames) {
// create a menu bucket
containerItem = new ToolStripMenuItem();
containerItem.Text = System.IO.Path.GetFileName(fname);
containerItem.ToolTipText = fname;
// sort and populate the bucket's contents
// files[fname].Sort();
foreach(INavigationPoint p in files[fname]) {
cmd = new MenuCommand(p.Description, new EventHandler(NavigateTo));
cmd.Tag = p;
containerItem.DropDownItems.Add(cmd);
}
// if there's only one nested item, add it
// to the result directly, ignoring the bucket
// if (containerItem.DropDownItems.Count==1) {
// items[i] = containerItem.DropDownItems[0];
// items[i].Text = ((INavigationPoint)items[i].Tag).FullDescription;
// i++;
// } else {
// // add the bucket to the result
// items[i++] = containerItem;
// }
// add the bucket to the result
items[i++] = containerItem;
}
return items;
}
public ToolStripItem[] BuildSubmenu(Codon codon, object owner)
{
MenuCommand cmd = null;
if (NavigationService.CanNavigateBack || NavigationService.CanNavigateForwards) {
List<INavigationPoint> points = NavigationService.GetListOfPoints();
//ToolStripItem[] items = BuildMenuFlat(points, numberOfAdditionalItems);
ToolStripItem[] items = BuildMenuByFile(points, numberOfAdditionalItems);
int i = items.Length - numberOfAdditionalItems;
// additional item 1
items[i++] = new ToolStripSeparator();
// additional item 2
cmd = new MenuCommand("Clear Navigation History", new EventHandler(ClearHistory));
items[i++] = cmd;
return items;
}
// default is to disable the dropdown feature...
return null;
}
int numberOfAdditionalItems = 2;
public void NavigateTo(object sender, EventArgs e)
{
MenuCommand item = (MenuCommand)sender;
NavigationService.Go((INavigationPoint)item.Tag);
}
public void ClearHistory(object sender, EventArgs e)
{
NavigationService.ClearHistory();
}
}
public class RecentFilesMenuBuilder : ISubmenuBuilder public class RecentFilesMenuBuilder : ISubmenuBuilder
{ {
public ToolStripItem[] BuildSubmenu(Codon codon, object owner) public ToolStripItem[] BuildSubmenu(Codon codon, object owner)

83
src/Main/Base/Project/Src/Commands/NavigationCommands.cs

@ -0,0 +1,83 @@
/*
* Created by SharpDevelop.
* User: David
* Date: 29/06/2006
* Time: 12:36 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Windows.Forms;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Commands
{
public class NavigateBack : AbstractMenuCommand
{
ToolBarSplitButton splitButton = null;
public override bool IsEnabled {
get {
UpdateEnabledState();
return NavigationService.CanNavigateBack;
}
}
public override void Run()
{
//LoggingService.Debug("Jumping back...");
NavigationService.Go(-1);
}
protected override void OnOwnerChanged(EventArgs e)
{
base.OnOwnerChanged(e);
// grab the owner so we can manipulate the buttons later
splitButton = (ToolBarSplitButton)Owner;
// wire up our event handlers
NavigationService.HistoryChanged += NavHistoryChanged;
// trigger state change to match initial state
NavHistoryChanged(this, EventArgs.Empty);
}
public void NavHistoryChanged(object sender, EventArgs e)
{
INavigationPoint p = NavigationService.CurrentPosition;
// LoggingService.DebugFormatted("NavHistoryChanged ({0}): {1}",
// NavigationService.Count,
// (p==null?"null":p.ToString()));
UpdateEnabledState();
}
public void UpdateEnabledState()
{
splitButton.ButtonEnabled = NavigationService.CanNavigateBack;
splitButton.DropDownEnabled = NavigationService.Count>1;
}
}
public class NavigateForward : AbstractMenuCommand
{
public override bool IsEnabled {
get {
return NavigationService.CanNavigateForwards;
}
}
public override void Run()
{
//LoggingService.Debug("Jumping forwards...");
NavigationService.Go(+1);
}
protected override void OnOwnerChanged(EventArgs e)
{
base.OnOwnerChanged(e);
}
}
}

7
src/Main/Base/Project/Src/Gui/AbstractViewContent.cs

@ -10,6 +10,8 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Gui namespace ICSharpCode.SharpDevelop.Gui
{ {
public abstract class AbstractViewContent : AbstractBaseViewContent, IViewContent public abstract class AbstractViewContent : AbstractBaseViewContent, IViewContent
@ -134,6 +136,11 @@ namespace ICSharpCode.SharpDevelop.Gui
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
public virtual INavigationPoint BuildNavPoint()
{
return new DefaultNavigationPoint(this.FileName);
}
public event EventHandler TitleNameChanged; public event EventHandler TitleNameChanged;
public event EventHandler Saving; public event EventHandler Saving;
public event SaveEventHandler Saved; public event SaveEventHandler Saved;

8
src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/HtmlViewPane.cs

@ -102,6 +102,14 @@ namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding
else else
TitleName = title; TitleName = title;
} }
// TODO: Navigation - implement browser navigation points?
public override INavigationPoint BuildNavPoint()
{
// returning null disables navigation for this IViewContent as
// requests to log null points are ignored.
return null;
}
} }
public class HtmlViewPane : UserControl public class HtmlViewPane : UserControl

14
src/Main/Base/Project/Src/Gui/ContentInterfaces/IPositionable.cs

@ -19,5 +19,19 @@ namespace ICSharpCode.SharpDevelop.Gui
/// And pos.X is the column (starting from 0 too). /// And pos.X is the column (starting from 0 too).
/// </summary> /// </summary>
void JumpTo(int line, int column); void JumpTo(int line, int column);
/// <summary>
/// gets the 'caret' position line (starting from 0)
/// </summary>
int Line {
get;
}
/// <summary>
/// gets the 'caret' position column (starting from 0)
/// </summary>
int Column {
get;
}
} }
} }

7
src/Main/Base/Project/Src/Gui/IViewContent.cs

@ -9,6 +9,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Gui namespace ICSharpCode.SharpDevelop.Gui
{ {
public delegate void SaveEventHandler(object sender, SaveEventArgs e); public delegate void SaveEventHandler(object sender, SaveEventArgs e);
@ -109,6 +111,11 @@ namespace ICSharpCode.SharpDevelop.Gui
/// </summary> /// </summary>
void Load(string fileName); void Load(string fileName);
/// <summary>
/// Builds an <see cref="INavigationPoint"/> for the current position.
/// </summary>
INavigationPoint BuildNavPoint();
/// <summary> /// <summary>
/// Is called each time the name for the content has changed. /// Is called each time the name for the content has changed.
/// </summary> /// </summary>

30
src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/ProjectBrowserControl.cs

@ -222,7 +222,7 @@ namespace ICSharpCode.SharpDevelop.Project
TreeNode FindDeepestOpenNodeForPath(string fileName) TreeNode FindDeepestOpenNodeForPath(string fileName)
{ {
LoggingService.DebugFormatted("Finding Deepest for '{0}'", fileName); //LoggingService.DebugFormatted("Finding Deepest for '{0}'", fileName);
Solution solution = ProjectService.OpenSolution; Solution solution = ProjectService.OpenSolution;
if (solution == null) { if (solution == null) {
return null; return null;
@ -230,7 +230,7 @@ namespace ICSharpCode.SharpDevelop.Project
IProject project = solution.FindProjectContainingFile(fileName); IProject project = solution.FindProjectContainingFile(fileName);
if (project == null) { if (project == null) {
LoggingService.Debug("no IProject found"); //LoggingService.Debug("no IProject found");
return null; return null;
} }
@ -282,18 +282,18 @@ namespace ICSharpCode.SharpDevelop.Project
if (!targetNode.IsExpanded) { if (!targetNode.IsExpanded) {
// the targetNode is not expanded so it's as deep as we can go // the targetNode is not expanded so it's as deep as we can go
LoggingService.DebugFormatted("target node '{0};{1}' is not expanded.", targetNode, targetNode.Text); //LoggingService.DebugFormatted("target node '{0};{1}' is not expanded.", targetNode, targetNode.Text);
return targetNode; return targetNode;
} }
LoggingService.Debug("entering depth loop..."); //LoggingService.Debug("entering depth loop...");
LoggingService.DebugFormatted(@"\- looking for '{0}'", relativePath); //LoggingService.DebugFormatted(@"\- looking for '{0}'", relativePath);
LoggingService.DebugFormatted(@"\- starting at '{0}'", targetNode != null ? targetNode.Text : "null"); //LoggingService.DebugFormatted(@"\- starting at '{0}'", targetNode != null ? targetNode.Text : "null");
string[] targets = relativePath.Trim('/','\\').Split('/', '\\'); string[] targets = relativePath.Trim('/','\\').Split('/', '\\');
TreeNode nextNode = null; TreeNode nextNode = null;
foreach (string target in targets) { foreach (string target in targets) {
LoggingService.Debug("-- looking for: "+target); //LoggingService.Debug("-- looking for: "+target);
nextNode = null; nextNode = null;
foreach (TreeNode node in targetNode.Nodes) { foreach (TreeNode node in targetNode.Nodes) {
if (node == null) { if (node == null) {
@ -347,22 +347,6 @@ namespace ICSharpCode.SharpDevelop.Project
} }
return null; return null;
} }
// TODO: remove this debug code
// void LogTreeViewPaths(TreeNodeCollection nodes, int depth)
// {
// System.Text.StringBuilder sb = null;
//
// foreach (TreeNode node in nodes) {
// sb = new System.Text.StringBuilder();
// for(int i = 0; i<depth; i++) {
// sb.Append("--");
// }
// sb.Append(node.Text+" ("+node.GetType().Name+")");
// LoggingService.Debug(sb.ToString());
// LogTreeViewPaths(node.Nodes, depth+1);
// }
// }
#endregion #endregion
public void ViewSolution(Solution solution) public void ViewSolution(Solution solution)

38
src/Main/Base/Project/Src/Internal/ConditionEvaluators/NavigationConditionEvaluators.cs

@ -0,0 +1,38 @@
using System;
using System.IO;
using System.Xml;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
/// <summary>
/// Tests the <see cref="NavigationService"/> for the presence of points
/// to jump back to.
/// </summary>
/// <example title="Test if the NavigationService can jump back.">
/// &lt;Condition name = "CanNavigateBack" &gt;
/// </example>
public class CanNavigateBackConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
return NavigationService.CanNavigateBack || NavigationService.CanNavigateForwards;
}
}
/// <summary>
/// Tests the <see cref="NavigationService"/> for the presence of points
/// to jump forward to.
/// </summary>
/// <example title="Test if the NavigationService can jump forward.">
/// &lt;Condition name = "CanNavigateForward" &gt;
/// </example>
public class CanNavigateForwardConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
return NavigationService.CanNavigateForwards;
}
}
}

11
src/Main/Base/Project/Src/Services/File/FileService.cs

@ -225,9 +225,11 @@ namespace ICSharpCode.Core
} }
IViewContent content = window.ViewContent; IViewContent content = window.ViewContent;
if (content is IPositionable) { if (content is IPositionable) {
// TODO: enable jumping to a particular view
window.SwitchView(0); window.SwitchView(0);
((IPositionable)content).JumpTo(Math.Max(0, line), Math.Max(0, column)); ((IPositionable)content).JumpTo(Math.Max(0, line), Math.Max(0, column));
} }
NavigationService.Log(content.BuildNavPoint());
return content; return content;
} }
@ -274,6 +276,13 @@ namespace ICSharpCode.Core
} }
} }
public static void OnJumpedToFilePosition(string fileName)
{
if (JumpedToFilePosition != null) {
JumpedToFilePosition(null, new FileEventArgs(fileName, false));
}
}
public static event EventHandler<FileRenamingEventArgs> FileRenaming; public static event EventHandler<FileRenamingEventArgs> FileRenaming;
public static event EventHandler<FileRenameEventArgs> FileRenamed; public static event EventHandler<FileRenameEventArgs> FileRenamed;
@ -282,5 +291,7 @@ namespace ICSharpCode.Core
public static event EventHandler<FileCancelEventArgs> FileReplacing; public static event EventHandler<FileCancelEventArgs> FileReplacing;
public static event EventHandler<FileEventArgs> FileReplaced; public static event EventHandler<FileEventArgs> FileReplaced;
public static event EventHandler<FileEventArgs> JumpedToFilePosition;
} }
} }

130
src/Main/Base/Project/Src/Services/NavigationService/DefaultNavigationPoint.cs

@ -0,0 +1,130 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Alpert" email="david@spinthemoose.com"/>
// <version>$Revision: $</version>
// </file>
using System;
using System.Drawing;
namespace ICSharpCode.Core
{
/// <summary>
/// Default implementation for classes that wrap Navigational
/// information for the <see cref="NavigationService"/>.
/// </summary>
public class DefaultNavigationPoint : INavigationPoint
{
string fileName;
object data;
#region constructor
public DefaultNavigationPoint() : this(String.Empty, null) {}
public DefaultNavigationPoint(string fileName) : this(fileName, null) {}
public DefaultNavigationPoint(string fileName, object data)
{
this.fileName = fileName;
this.data = data;
}
#endregion
#region overrides
public override string ToString()
{
return String.Format("[{0}: {1}]",
this.GetType().Name,
this.Description);
}
#endregion
#region INavigationPoint implementation
public virtual string FileName {
get {
return fileName;
}
}
public virtual string Description {
get {
return String.Format("{0}: {1}", fileName, data);
}
}
public virtual string FullDescription {
get {
return Description;
}
}
public virtual string ToolTip {
get {
return Description;
}
}
// public string TabName {
// get {
// return tabName;
// }
// }
public virtual int Index {
get {
return 0;
}
}
public object NavigationData {
get {
return data;
}
set {
data = value;
}
}
public virtual void JumpTo()
{
FileService.JumpToFilePosition(this.FileName, 0, 0);
}
public void FileNameChanged(string newName)
{
fileName = newName;
}
public virtual void ContentChanging(object sender, EventArgs e)
{
//throw new NotImplementedException();
}
#endregion
#region IComparable
public virtual int CompareTo(object obj)
{
if (this.GetType() != obj.GetType()) {
return this.GetType().Name.CompareTo(obj.GetType().Name);
}
DefaultNavigationPoint b = obj as DefaultNavigationPoint;
return this.FileName.CompareTo(b.FileName);
}
#endregion
#region Equality
public override bool Equals(object obj)
{
DefaultNavigationPoint b = obj as DefaultNavigationPoint;
if (b == null) return false;
return this.FileName == b.FileName;
}
public override int GetHashCode()
{
return this.FileName.GetHashCode();
}
#endregion
}
}

85
src/Main/Base/Project/Src/Services/NavigationService/INavigationPoint.cs

@ -0,0 +1,85 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Alpert" email="david@spinthemoose.com"/>
// <version>$Revision: $</version>
// </file>
using System;
namespace ICSharpCode.Core
{
/// <summary>
/// Interface for classes that store Navigational information for
/// the <see cref="NavigationService"/>.
/// </summary>
public interface INavigationPoint : IComparable
{
/// <summary>
/// The path to the file containing the <see cref="INavigationPoint"/>
/// </summary>
string FileName {
get;
}
/// <summary>
/// Gets the text that will appear in the drop-down menu to select
/// this <see cref="INavigationPoint"/>.
/// </summary>
string Description {
get;
}
/// <summary>
/// Gets more detailed text that cam be used to describe
/// this <see cref="INavigationPoint"/>.
/// </summary>
string FullDescription {
get;
}
string ToolTip {
get;
}
// /// <summary>
// ///
// /// </summary>
// string TabName {
// get;
// }
/// <summary>
/// Gets the specific data, if any, needed to
/// navigate to this <see cref="INavigationPoint"/>.
/// </summary>
object NavigationData {
get;
}
int Index {
get;
}
/// <summary>
/// Navigates to this <see cref="INavigationPoint"/>.
/// </summary>
void JumpTo();
/// <summary>
/// Updates the <see cref="FileName"/>.
/// </summary>
/// <param name="newName"></param>
void FileNameChanged(string newName);
/// <summary>
/// Responsible for updating the internal data of the
/// <see cref="INavigationPoint"/> to synch it with
/// changes in the IViewContent containing the point.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void ContentChanging(object sender, EventArgs e);
}
}

317
src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs

@ -0,0 +1,317 @@
/*
* Created by SharpDevelop.
* User: David
* Date: 23/06/2006
* Time: 12:14 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.TextEditor;
namespace ICSharpCode.Core
{
/// <summary>
/// Provides the infrastructure to handle generalized code navigation.
/// </summary>
/// <remarks>
/// <para>This service is not limited to navigating code; rather, it
/// integrates with SharpDevelop's extendable <see cref="IViewContent"/>
/// interface so that each window has the opportunity to implement a
/// contextually appropriate navigation scheme.</para>
/// <para>The default scheme, <see cref="DefaultNavigationPoint"/>, is
/// created automatically in the <see cref="AbstractViewContent"/>
/// implementation. This scheme supports the basic function of logging a
/// filename and returning to that file's default view.</para>
/// <para>The default text editor provides a slightly more sophisticated
/// scheme, <see cref="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.TextEditorNavigationPoint">
/// TextEditorNavigationPoint</see>, that logs filename and line number.</para>
/// <para>To implement your own navigation scheme, implement
/// <see cref="IViewContent"/> or derive from
/// <see cref="AbstractViewContent"/> and override the
/// <see cref="IViewContent.BuildNavigationPoint">BuildNavigationPoint</see>
/// method.</para>
/// <para>
/// <i>History logic based in part on Orlando Curioso's <i>Code Project</i> article:
/// <see href="http://www.codeproject.com/cs/miscctrl/WinFormsHistory.asp">
/// Navigational history (go back/forward) for WinForms controls</see></i>
/// </para>
/// </remarks>
public class NavigationService
{
#region Private members
static LinkedList<INavigationPoint> history;
static LinkedListNode<INavigationPoint> currentNode;
static bool loggingSuspended;
#endregion
static NavigationService()
{
history = new LinkedList<INavigationPoint>();
currentNode = null;
loggingSuspended = false;
WorkbenchSingleton.WorkbenchCreated += WorkbenchCreatedHandler;
FileService.FileRenamed += FileService_FileRenamed;
}
#region Public Properties
public static bool CanNavigateBack {
get { return currentNode != history.First && currentNode != null;}
}
public static bool CanNavigateForwards {
get {return currentNode != history.Last && currentNode != null;}
}
public static int Count {
get { return history.Count; }
}
public static INavigationPoint CurrentPosition {
get {
return currentNode==null ? (INavigationPoint)null : currentNode.Value;
}
set {
Log(value);
}
}
public static bool IsLogging {
get { return !loggingSuspended;}
}
#endregion
#region Public Methods
public static void ContentChanging(object sender, EventArgs e)
{
foreach (INavigationPoint p in history)
{
p.ContentChanging(sender, e);
}
}
#region private helpers
static void Log(IWorkbenchWindow window)
{
if (window==null) return;
// TODO: Navigation - enable logging of subpanes via window.ActiveViewContent
Log(window.ViewContent);
}
static void Log(IViewContent vc)
{
if (vc==null) return;
Log(vc.BuildNavPoint());
}
#endregion
public static void Log(INavigationPoint p)
{
if (loggingSuspended) {
return;
}
LogInternal(p);
}
// refactoring this out of Log() allows the NavigationService
// to call this and ensure it will work regardless of the
// requested state of loggingSuspended
private static void LogInternal(INavigationPoint p)
{
if (p == null
|| p.FileName==null) { // HACK: why/how do we get here?
return;
}
if (currentNode==null) {
currentNode = history.AddFirst(p);
} else if (p.Equals(currentNode.Value)) {
// replace it
currentNode.Value = p;
} else {
currentNode = history.AddAfter(currentNode, p);
}
OnHistoryChanged();
}
// untested
public static INavigationPoint Log()
{
// IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
// if (window == null) {
// return null;
// }
//
// IViewContent view = window.ViewContent;
// if (view == null) {
// return null;
// }
//
// return view.BuildNavPoint();
return null;
}
public static List<INavigationPoint> GetListOfPoints()
{
return new List<INavigationPoint>(history);
}
public static void ClearHistory()
{
ClearHistory(false);
}
public static void ClearHistory(bool clearCurrentPosition)
{
INavigationPoint currentPosition = CurrentPosition;
history.Clear();
currentNode = null;
if (!clearCurrentPosition) {
LogInternal(currentPosition);
}
OnHistoryChanged();
}
public static void Go(int n)
{
if (0 == n) {
return;
} else if (0>n) {
// move backwards
while (0>n && currentNode!=history.First) {
currentNode = currentNode.Previous;
n++;
}
} else {
// move forwards
while (0<n && currentNode!=history.Last) {
currentNode = currentNode.Next;
n--;
}
}
SyncViewWithModel();
}
public static void Go(INavigationPoint target)
{
if (target==null) {
return;
}
LinkedListNode<INavigationPoint> targetNode;
targetNode = history.Find(target);
if (targetNode!=null) {
currentNode = targetNode;
} else {
LoggingService.ErrorFormatted("Logging additional point: {0}", target);
LogInternal(target);
//currentNode = history.AddAfter(currentNode, target);
}
SyncViewWithModel();
}
private static void SyncViewWithModel()
{
//LoggingService.Info("suspend logging");
SuspendLogging();
if (CurrentPosition!=null) {
CurrentPosition.JumpTo();
}
//LoggingService.Info("resume logging");
ResumeLogging();
}
public static void SuspendLogging()
{
loggingSuspended = true;
}
public static void ResumeLogging()
{
// ENH: possible enhancement: use int instead of bool so resume statements are incremental rather than definitive.
loggingSuspended = false;
}
#endregion
// the following code is not covered by Unit tests as i wasn't sure
// how to test code triggered by the user interacting with the workbench
#region event trapping
#region ViewContent events
public static void WorkbenchCreatedHandler(object sender, EventArgs e)
{
WorkbenchSingleton.Workbench.ViewOpened +=
new ViewContentEventHandler(ViewContentOpened);
WorkbenchSingleton.Workbench.ViewClosed +=
new ViewContentEventHandler(ViewContentClosed);
}
static void ViewContentOpened(object sender, ViewContentEventArgs e)
{
//Log(e.Content);
e.Content.WorkbenchWindow.WindowSelected += WorkBenchWindowSelected;
}
static void ViewContentClosed(object sender, ViewContentEventArgs e)
{
e.Content.WorkbenchWindow.WindowSelected -= WorkBenchWindowSelected;
}
static IWorkbenchWindow lastSelectedWindow = null;
static void WorkBenchWindowSelected(object sender, EventArgs e)
{
try {
IWorkbenchWindow window = sender as IWorkbenchWindow;
if (window == lastSelectedWindow) {
return;
}
int n = NavigationService.Count;
Log(window);
//LoggingService.DebugFormatted("WorkbenchSelected: logging {0}", window.Title);
// HACK: Navigation - for some reason, JumpToFilePosition returns _before_ this
// gets fired, (not the behaviour i expected) so we need to remember the
// previous selected window to ensure that we only log once per visit to
// a given window.
lastSelectedWindow = window;
} catch (Exception ex) {
LoggingService.ErrorFormatted("{0}:\n{1}",ex.Message, ex.StackTrace);
}
}
#endregion
static void FileService_FileRenamed(object sender, FileRenameEventArgs e)
{
foreach (INavigationPoint p in history) {
if (p.FileName.Equals(e.SourceFile)) {
p.FileNameChanged(e.TargetFile);
}
}
}
#endregion
#region Public Events
public static event System.EventHandler HistoryChanged;
public static void OnHistoryChanged()
{
if (HistoryChanged!=null) {
HistoryChanged(NavigationService.CurrentPosition, EventArgs.Empty);
}
}
#endregion
}
}

35
src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

@ -188,6 +188,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
textAreaControl.Document.DocumentChanged += new DocumentEventHandler(TextAreaChangedEvent); textAreaControl.Document.DocumentChanged += new DocumentEventHandler(TextAreaChangedEvent);
textAreaControl.ActiveTextAreaControl.Caret.CaretModeChanged += new EventHandler(CaretModeChanged); textAreaControl.ActiveTextAreaControl.Caret.CaretModeChanged += new EventHandler(CaretModeChanged);
textAreaControl.ActiveTextAreaControl.Enter += new EventHandler(CaretUpdate); textAreaControl.ActiveTextAreaControl.Enter += new EventHandler(CaretUpdate);
textAreaControl.ActiveTextAreaControl.Caret.PositionChanged += CaretUpdate;
// KSL Start, New lines // KSL Start, New lines
// textAreaControl.FileNameChanged += new EventHandler(FileNameChangedEvent); // textAreaControl.FileNameChanged += new EventHandler(FileNameChangedEvent);
@ -281,6 +282,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
void TextAreaChangedEvent(object sender, DocumentEventArgs e) void TextAreaChangedEvent(object sender, DocumentEventArgs e)
{ {
IsDirty = true; IsDirty = true;
NavigationService.ContentChanging(this.textAreaControl, e);
} }
public override void RedrawContent() public override void RedrawContent()
@ -391,6 +393,19 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
// textAreaControl.Refresh(); // textAreaControl.Refresh();
} }
Point GetTextAreaPosition()
{
return textAreaControl.Document.OffsetToPosition(textAreaControl.ActiveTextAreaControl.Caret.Offset);
}
public override INavigationPoint BuildNavPoint()
{
int lineNumber = this.Line;
LineSegment lineSegment = textAreaControl.Document.GetLineSegment(lineNumber);
string txt = textAreaControl.Document.GetText(lineSegment);
return new TextNavigationPoint(this.FileName, lineNumber, this.Column, txt);
}
void CaretUpdate(object sender, EventArgs e) void CaretUpdate(object sender, EventArgs e)
{ {
CaretChanged(null, null); CaretChanged(null, null);
@ -399,15 +414,15 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
void CaretChanged(object sender, EventArgs e) void CaretChanged(object sender, EventArgs e)
{ {
Point pos = textAreaControl.Document.OffsetToPosition(textAreaControl.ActiveTextAreaControl.Caret.Offset); Point pos = GetTextAreaPosition();
LineSegment line = textAreaControl.Document.GetLineSegment(pos.Y); LineSegment line = textAreaControl.Document.GetLineSegment(pos.Y);
StatusBarService.SetCaretPosition(pos.X + 1, pos.Y + 1, textAreaControl.ActiveTextAreaControl.Caret.Offset - line.Offset + 1); StatusBarService.SetCaretPosition(pos.X + 1, pos.Y + 1, textAreaControl.ActiveTextAreaControl.Caret.Offset - line.Offset + 1);
NavigationService.Log(this.BuildNavPoint());
} }
void CaretModeChanged(object sender, EventArgs e) void CaretModeChanged(object sender, EventArgs e)
{ {
StatusBarService.SetInsertMode(textAreaControl.ActiveTextAreaControl.Caret.CaretMode == CaretMode.InsertMode); StatusBarService.SetInsertMode(textAreaControl.ActiveTextAreaControl.Caret.CaretMode == CaretMode.InsertMode);
} }
@ -423,11 +438,27 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
base.TitleName = Path.GetFileName(value); base.TitleName = Path.GetFileName(value);
} }
} }
#region IPositionable implementation
public void JumpTo(int line, int column) public void JumpTo(int line, int column)
{ {
textAreaControl.ActiveTextAreaControl.JumpTo(line, column); textAreaControl.ActiveTextAreaControl.JumpTo(line, column);
} }
public int Line {
get {
return textAreaControl.ActiveTextAreaControl.Caret.Line;
}
}
public int Column {
get {
return textAreaControl.ActiveTextAreaControl.Caret.Column;
}
}
#endregion
public void ForceFoldingUpdate() public void ForceFoldingUpdate()
{ {
if (textAreaControl.TextEditorProperties.EnableFolding) { if (textAreaControl.TextEditorProperties.EnableFolding) {

62
src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorNavigationPoint.cs

@ -0,0 +1,62 @@
/*
* Created by SharpDevelop.
* User: David
* Date: 23/04/2006
* Time: 11:47 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Drawing;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
{
/// <summary>
/// Description of TextEditorNavigationPoint.
/// </summary>
public class TextEditorNavigationPoint : DefaultNavigationPoint
{
public TextEditorNavigationPoint(string fileName, int line, int col) :
base(fileName, new Point(col, line)) {}
public int Line {
get {
return ((Point)base.NavigationData).Y;
}
}
public override string Description {
get {
return String.Format("{0}: {1}", this.FileName, this.Line);
}
}
public override int Index {
get {
return this.Line;
}
}
public override bool Equals(object obj)
{
TextEditorNavigationPoint b = obj as TextEditorNavigationPoint;
if (b == null) return false;
return b.FileName == this.FileName && b.Line == this.Line;
}
public override int GetHashCode()
{
return base.GetHashCode() ^ this.Line;
}
public override void JumpTo()
{
Point p = (Point)this.NavigationData;
FileService.JumpToFilePosition(this.FileName, p.Y, p.X);
}
}
}

116
src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextNavigationPoint.cs

@ -0,0 +1,116 @@
/*
* Created by SharpDevelop.
* User: David
* Date: 06/07/2006
* Time: 12:40 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Drawing;
using System.IO;
using ICSharpCode.Core;
namespace ICSharpCode.TextEditor.Document
{
/// <summary>
/// Description of TextNavigationPoint.
/// </summary>
public class TextNavigationPoint : DefaultNavigationPoint
{
const int THREASHOLD = 5;
#region constructor
public TextNavigationPoint() : this(String.Empty, 0, 0) {}
public TextNavigationPoint(string fileName) : this(fileName, 0, 0) {}
public TextNavigationPoint(string fileName, int lineNumber, int column) : this(fileName, lineNumber, column, String.Empty) {}
public TextNavigationPoint(string fileName, int lineNumber, int column, string content) : base(fileName, new Point(column, lineNumber))
{
this.content = content;
}
#endregion
// TODO: Navigation - eventually, we'll store a reference to the document
// itself so we can track filename changes, inserts (that affect
// line numbers), and dynamically retrieve the text at this.lineNumber
//
// what happens to the doc reference when the document is closed?
//
string content;
public int LineNumber {
get {return ((Point)this.NavigationData).Y;}
}
public int Column {
get {return ((Point)this.NavigationData).X;}
}
public override void JumpTo()
{
FileService.JumpToFilePosition(this.FileName,
this.LineNumber,
this.Column);
}
public override void ContentChanging(object sender, EventArgs e)
{
// TODO: Navigation - finish ContentChanging
// if (e is DocumentEventArgs) {
// DocumentEventArgs de = (DocumentEventArgs)e;
// if (this.LineNumber >=
// }
}
#region IComparable
public override int CompareTo(object obj)
{
int result = base.CompareTo(obj);
if (0!=result) {
return result;
}
TextNavigationPoint b = obj as TextNavigationPoint;
if (this.LineNumber==b.LineNumber) {
return 0;
} else if (this.LineNumber>b.LineNumber) {
return 1;
} else {
return -1;
}
}
#endregion
#region Equality
public override bool Equals(object obj)
{
TextNavigationPoint b = obj as TextNavigationPoint;
if (b==null) return false;
return this.FileName.Equals(b.FileName)
&& (Math.Abs(this.LineNumber - b.LineNumber)<=THREASHOLD);
}
public override int GetHashCode()
{
return this.FileName.GetHashCode() ^ this.LineNumber.GetHashCode();
}
#endregion
public override string Description {
get {
return String.Format("{0}: {1}",
this.LineNumber,
this.content);
}
}
public override string FullDescription {
get {
return String.Format("{0} - {1}",
Path.GetFileName(this.FileName),
this.Description);
}
}
}
}

4
src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj

@ -84,6 +84,9 @@
<Compile Include="ProcessExitedTestFixture.cs" /> <Compile Include="ProcessExitedTestFixture.cs" />
<Compile Include="ProcessRunnerNotStartedTestFixture.cs" /> <Compile Include="ProcessRunnerNotStartedTestFixture.cs" />
<Compile Include="ConsoleAppTestFixtureBase.cs" /> <Compile Include="ConsoleAppTestFixtureBase.cs" />
<Compile Include="Services_Navigation\INavigationPointTextFixture.cs" />
<Compile Include="Services_Navigation\TestNavigationPoint.cs" />
<Compile Include="Services_Navigation\NavigationServiceTestFixture.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Project\ICSharpCode.SharpDevelop.csproj"> <ProjectReference Include="..\Project\ICSharpCode.SharpDevelop.csproj">
@ -120,6 +123,7 @@
</Content> </Content>
<Folder Include="WebReferences" /> <Folder Include="WebReferences" />
<Folder Include="Templates" /> <Folder Include="Templates" />
<Folder Include="Services_Navigation" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project> </Project>

114
src/Main/Base/Test/Services_Navigation/INavigationPointTextFixture.cs

@ -0,0 +1,114 @@
/*
* Created by SharpDevelop.
* User: David
* Date: 04/03/2006
* Time: 5:28 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using NUnit.Framework;
using ICSharpCode.Core;
namespace NavigationServiceTests
{
[TestFixture]
public class INavigationPointTextFixture
{
INavigationPoint p1;
INavigationPoint p2;
[TestFixtureSetUp]
public void Init()
{
int line = 3;
p1 = new TestNavigationPoint("test1.cs", line);
p2 = new TestNavigationPoint("test2.cs", line+2);
}
[Test]
/// <summary>
/// A navigation point must store the filename of the file containing
/// them so that they can switch to the correct file, reopening it
/// if needed.
/// </summary>
public void FileNameTest()
{
Assert.AreNotEqual("test1.css", p1.FileName, "FileName differs: expected test1.cs, received "+p1.FileName);
Assert.AreEqual("test1.cs", p1.FileName);
}
[Test]
/// <summary>
/// A navigation point must remember whatever additional data is needed
/// to navigation to the appropriate view-position within that file.
/// </summary>
public void DataTagTest()
{
Assert.AreEqual(3, (int)p1.NavigationData);
}
[Test]
/// <summary>
/// A navigation point must provide a description of itself for the
/// menu subsystem (ie. for menu text).
/// </summary>
public void DescriptionTest()
{
Assert.AreNotEqual(String.Empty, p1.Description);
}
[Test]
/// <summary>
/// A navigation point must provide an index for sorting purposes.
/// </summary>
public void IndexTest()
{
Assert.AreNotEqual(null, p1.Description);
}
[Test]
/// <summary>
/// A navigation point must provide a tooltip for the menu system.
/// </summary>
public void ToolTipText()
{
Assert.AreNotEqual(String.Empty, p1.ToolTip);
}
[Test]
/// <summary>
/// A navigation point must take responsibility for restoring the
/// cursor to whatever state is "held" (i.e. "described by") it's data.
/// </summary>
public void JumpToTest()
{
TestNavigationPoint.CurrentTestPosition = null;
Assert.AreEqual(TestNavigationPoint.CurrentTestPosition, null);
p1.JumpTo();
Assert.AreEqual("test1.cs", TestNavigationPoint.CurrentTestPosition.FileName);
Assert.AreEqual(3, (int)TestNavigationPoint.CurrentTestPosition.NavigationData);
p2.JumpTo();
Assert.AreEqual("test2.cs", TestNavigationPoint.CurrentTestPosition.FileName);
}
[Test]
/// <summary>
/// A navigation point must take responsibility for evaluating equality tests.
/// </summary>
public void EqualityTest()
{
Assert.IsTrue(p1.Equals(p1));
Assert.IsFalse(p1.Equals(p2));
Assert.IsFalse(p1.Equals("not an INavigationPoint..."));
Assert.AreNotEqual(p1.GetHashCode(), p2.GetHashCode());
}
}
}

616
src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs

@ -0,0 +1,616 @@
/*
* Created by SharpDevelop.
* User: David
* Date: 22/06/2006
* Time: 11:45 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using NUnit.Framework;
using ICSharpCode.Core;
namespace NavigationServiceTests
{
/// <summary>
/// Provides unit tests for the <see cref="NavigationService"/>.
/// </summary>
/// <remarks>
/// <para>Code Navigation Requirements:</para>
/// <list type="definition">
/// <term><see href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.SharpDevelop21Features">#develop wiki</see>:</term>
/// <description>
/// <list type="bullet">
/// <item>backwards & forwards through visited positions in the editor windows</item>
/// </list>
/// </description>
/// <term>Daniel Grunwald [sharpdevelop-contributors@lists.sourceforge.net]:</term>
/// <description>
/// <list type="bullet">
/// <item>includes back/forward command to reset the cursor position/active file</item>
/// <item>saves class+method+line info of the cursor</item>
/// <item>"undo" cursor position changes</item>
/// <item>when adding a cursor position to the history, all other
/// cursor positions in the same method are removed</item>
/// <item>the "navigate back" command would be a SplitButton in the toolbar</item>
/// <item>the dropdown would show class+method names</item>
/// </list>
/// </description>
/// </list>
/// <para> The <see cref="NavigationService.Count">Count</see> and list of
/// points returned by <see cref="NavigationService.GetListOfPoints">
/// GetListOfPoints()</see> are both assumed to contain the
/// <see cref="NavigationService.CurrentPosition">CurrentPosition</see>.
/// </para>
/// <para>As the current position is also exposed a property, clients can
/// then make the choice to include or exclude it when iterating over the
/// list of points.</para>
/// </remarks>
[TestFixture]
public class NavigationServiceTestFixture
{
#region private members
INavigationPoint p;
INavigationPoint p_5;
INavigationPoint p_6;
INavigationPoint p_37;
INavigationPoint q;
INavigationPoint r;
INavigationPoint s;
INavigationPoint t;
#endregion
#region the tests
// TODO: build "CreateNUnitTest" command
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose an <see cref="INavigationPoint"/>
/// reference for the current "position" in the
/// editor windows, and return <see langword="null"/>
/// when the history is empty.
/// </summary>
public void CurrentPositionTest()
{
Assert.IsNull(NavigationService.CurrentPosition);
NavigationService.CurrentPosition = p;
Assert.IsInstanceOfType(typeof(INavigationPoint),
NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// be able to log and remember changes to the
/// <see cref="NavigationService.CurrentPosition">
/// CurrentPosition</see>.
/// </summary>
public void LogTest()
{
NavigationService.CurrentPosition = p;
Assert.AreEqual(p, NavigationService.CurrentPosition);
NavigationService.CurrentPosition = q;
Assert.AreEqual(q, NavigationService.CurrentPosition);
NavigationService.CurrentPosition = r;
Assert.AreEqual(r, NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose a list of points in it's history.
/// <see cref="List<T>"/> of type
/// <see cref="INavigationPoint"/>.
/// </summary>
/// <remarks>necessary for testing and for menu building</remarks>
public void GetListOfPointsTest()
{
Assert.IsInstanceOfType(typeof(List<INavigationPoint>),
NavigationService.GetListOfPoints());
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose a method to empty the points in its
/// history.
/// </summary>
public void ClearHistoryTest()
{
NavigationService.ClearHistory(true);
List<INavigationPoint> history = NavigationService.GetListOfPoints();
Assert.AreEqual(0, history.Count);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose a property of type <see cref="int"/>
/// indicating how many points are currently
/// stored in it's history.
/// </summary>
public void CountTest()
{
Assert.IsInstanceOfType(typeof(int),
NavigationService.Count);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose a property of type <see cref="int"/>
/// indicating how many points are currently
/// stored in it's history.
/// </summary>
public void CountingTest()
{
Assert.AreEqual(0, NavigationService.Count);
NavigationService.CurrentPosition = p;
Assert.AreEqual(1, NavigationService.Count);
NavigationService.CurrentPosition = q;
Assert.AreEqual(2, NavigationService.Count);
NavigationService.CurrentPosition = r;
Assert.AreEqual(3, NavigationService.Count);
NavigationService.ClearHistory(true);
Assert.AreEqual(0, NavigationService.Count);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// ignore requests to log a null reference.
/// </summary>
public void LogNullTest()
{
Assert.AreEqual(0, NavigationService.Count);
NavigationService.CurrentPosition = null;
Assert.AreEqual(0, NavigationService.Count);
NavigationService.CurrentPosition = p;
NavigationService.CurrentPosition = null;
Assert.AreEqual(p, NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose methods that allow clients to
/// suspend and resume logging of positions.
/// </summary>
public void SuspendLoggingTest()
{
Assert.AreEqual(0, NavigationService.Count);
NavigationService.SuspendLogging();
NavigationService.CurrentPosition = p;
Assert.AreEqual(0, NavigationService.Count);
NavigationService.ResumeLogging();
NavigationService.CurrentPosition = q;
Assert.AreEqual(q, NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose a Property to access the state of
/// logging.
/// </summary>
public void IsLoggingTest()
{
Assert.IsTrue(NavigationService.IsLogging);
NavigationService.SuspendLogging();
Assert.IsFalse(NavigationService.IsLogging);
NavigationService.ResumeLogging();
Assert.IsTrue(NavigationService.IsLogging);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// <list type="bullet>
/// <item>include a back/forward command to reset the
/// cursor position/active file</item>
/// <item>be able to "undo" cursor position changes</item>
/// </list>
/// </summary>
public void GoTest()
{
Assert.AreEqual(0, NavigationService.Count);
Assert.IsNull(NavigationService.CurrentPosition);
TestNavigationPoint.CurrentTestPosition = null;
Assert.IsNull(TestNavigationPoint.CurrentTestPosition);
NavigationService.CurrentPosition = p;
NavigationService.CurrentPosition = q;
NavigationService.CurrentPosition = TestNavigationPoint.CurrentTestPosition = r;
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(r, NavigationService.CurrentPosition);
Assert.AreEqual(r, TestNavigationPoint.CurrentTestPosition);
NavigationService.Go(0);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(r, NavigationService.CurrentPosition);
Assert.AreEqual(r, TestNavigationPoint.CurrentTestPosition);
NavigationService.Go(-1);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(q, NavigationService.CurrentPosition);
Assert.AreEqual(q, TestNavigationPoint.CurrentTestPosition);
NavigationService.Go(1);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(r, NavigationService.CurrentPosition);
Assert.AreEqual(r, TestNavigationPoint.CurrentTestPosition);
NavigationService.Go(-2);
Assert.AreEqual(p, NavigationService.CurrentPosition);
Assert.AreEqual(p, TestNavigationPoint.CurrentTestPosition);
NavigationService.Go(1);
Assert.AreEqual(q, NavigationService.CurrentPosition);
Assert.AreEqual(q, TestNavigationPoint.CurrentTestPosition);
NavigationService.Go(1);
Assert.AreEqual(r, NavigationService.CurrentPosition);
Assert.AreEqual(r, TestNavigationPoint.CurrentTestPosition);
// now attempt to go beyond the bounds of the list;
// we should meet this request as best as possible
// and generate no errors.
NavigationService.Go(-5);
Assert.AreEqual(p, NavigationService.CurrentPosition);
Assert.AreEqual(p, TestNavigationPoint.CurrentTestPosition);
NavigationService.Go(7);
Assert.AreEqual(r, NavigationService.CurrentPosition);
Assert.AreEqual(r, TestNavigationPoint.CurrentTestPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// support navigating directly to a specific
/// point.
/// </summary>
/// <remarks>
/// <para>
/// When the target point is not in the history,
/// the <see cref="NavigationService"/> must
/// add it such that advancing back restores the
/// position that was current before this request
/// and advancing forwards returns the same results
/// had this request never been made.
/// </para>
/// </remarks>
public void GoDirectTest()
{
Assert.AreEqual(0, NavigationService.Count);
NavigationService.Log(p);
NavigationService.Log(q);
NavigationService.Log(r);
TestNavigationPoint.CurrentTestPosition = r;
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(r, NavigationService.CurrentPosition);
Assert.AreEqual(r, TestNavigationPoint.CurrentTestPosition);
Assert.IsTrue(NavigationService.CanNavigateBack);
Assert.IsFalse(NavigationService.CanNavigateForwards);
NavigationService.Go(p);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(p, NavigationService.CurrentPosition);
Assert.AreEqual(p, TestNavigationPoint.CurrentTestPosition);
Assert.IsFalse(NavigationService.CanNavigateBack);
Assert.IsTrue(NavigationService.CanNavigateForwards);
NavigationService.Go(s);
Assert.AreEqual(4, NavigationService.Count);
Assert.AreEqual(s, NavigationService.CurrentPosition);
Assert.AreEqual(s, TestNavigationPoint.CurrentTestPosition);
Assert.IsTrue(NavigationService.CanNavigateBack);
Assert.IsTrue(NavigationService.CanNavigateForwards);
NavigationService.Go(-1);
Assert.AreEqual(p, NavigationService.CurrentPosition);
Assert.AreEqual(p, TestNavigationPoint.CurrentTestPosition);
NavigationService.Go(2);
Assert.AreEqual(q, NavigationService.CurrentPosition);
Assert.AreEqual(q, TestNavigationPoint.CurrentTestPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose boolean properties indicating whether
/// or not it is possible to navigate forwards
/// or backwards within the history.
/// </summary>
public void CanNavigateTest()
{
Assert.AreEqual(0, NavigationService.Count);
Assert.IsFalse(NavigationService.CanNavigateBack);
Assert.IsFalse(NavigationService.CanNavigateForwards);
NavigationService.Log(p);
Assert.IsFalse(NavigationService.CanNavigateBack);
Assert.IsFalse(NavigationService.CanNavigateForwards);
NavigationService.Log(q);
Assert.IsTrue(NavigationService.CanNavigateBack);
Assert.IsFalse(NavigationService.CanNavigateForwards);
NavigationService.Go(-1);
Assert.IsFalse(NavigationService.CanNavigateBack);
Assert.IsTrue(NavigationService.CanNavigateForwards);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// ignore multiple successive requests to
/// log identical points.
/// </summary>
public void LogMultipleIdenticalSuccessiveTest()
{
Assert.AreEqual(0, NavigationService.Count);
NavigationService.Log(p);
NavigationService.Log(p);
Assert.AreEqual(1, NavigationService.Count);
Assert.AreEqual(p, NavigationService.CurrentPosition);
NavigationService.Log(q);
NavigationService.Log(r);
NavigationService.Log(r);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(r, NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// support multiple successive requests to
/// log equivalent points, where equivalency
/// is measured by INavigationPoint.Equals(),
/// in which case the new point replaces the
/// current point.
/// </summary>
public void LogMultipleEquivalentSuccessiveTest()
{
Assert.AreEqual(0, NavigationService.Count);
Assert.IsTrue(p_5.Equals(p_6));
NavigationService.Log(p_5);
NavigationService.Log(p_5);
Assert.AreEqual(1, NavigationService.Count);
Assert.AreEqual(p_5, NavigationService.CurrentPosition);
NavigationService.Log(p_6);
Assert.AreEqual(1, NavigationService.Count);
Assert.AreEqual(p_6, NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// allow requests to log multiple instances of
/// the same position (where sameness is tested
/// by INavigationPoint.<see cref="INavigationPoint.Equals">
/// Equals()</see>), provided they are not logged
/// successively.
/// </summary>
public void LogMultipleEquivalentDisjointTest()
{
Assert.AreEqual(0, NavigationService.Count);
Assert.IsTrue(p_5.Equals(p_6));
NavigationService.Log(p_5);
NavigationService.Log(p_5);
Assert.AreEqual(1, NavigationService.Count);
Assert.AreEqual(p_5, NavigationService.CurrentPosition);
NavigationService.Log(q);
NavigationService.Log(p_6);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(p_6, NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose an event that fires when the
/// navigation list has changed
/// </summary>
public void HistoryChangedTest()
{
navigationChangedCount = 0;
NavigationService.HistoryChanged += NavigationHistoryChanged;
Assert.AreEqual(0, NavigationService.Count);
Assert.AreEqual(0, navigationChangedCount);
NavigationService.Log(p);
Assert.AreEqual(1, NavigationService.Count);
Assert.AreEqual(1, navigationChangedCount);
NavigationService.Log(p_5);
Assert.AreEqual(1, NavigationService.Count);
Assert.AreEqual(2, navigationChangedCount);
NavigationService.Log(q);
Assert.AreEqual(2, NavigationService.Count);
Assert.AreEqual(3, navigationChangedCount);
NavigationService.ClearHistory(true);
Assert.AreEqual(0, NavigationService.Count);
Assert.AreEqual(4, navigationChangedCount);
NavigationService.HistoryChanged -= NavigationHistoryChanged;
}
int navigationChangedCount;
public void NavigationHistoryChanged(object sender, EventArgs e)
{
navigationChangedCount++;
}
[Test]
[Ignore("System.NullReferenceException: Object reference not set to an instance of an object.")]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose a method to generate an
/// <see cref="INavigationPoint"/> from a
/// given window.
/// </summary>
public void GenerateCurrentPositionTest()
{
INavigationPoint p = NavigationService.Log();
}
#endregion
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// expose a method to empty the points in its
/// history without forgetting the current
/// position
/// </summary>
public void ClearHistoryRetainCurrentTest()
{
Assert.AreEqual(0, NavigationService.Count);
NavigationService.Log(p);
NavigationService.Log(q);
Assert.AreEqual(2, NavigationService.Count);
Assert.AreEqual(q, NavigationService.CurrentPosition);
NavigationService.ClearHistory();
Assert.AreEqual(1, NavigationService.Count);
Assert.AreEqual(q, NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// ignore requests to go directly to a null
/// position.
/// </summary>
public void GoDirectToNullTest()
{
Assert.AreEqual(0, NavigationService.Count);
NavigationService.Log(p);
NavigationService.Log(q);
NavigationService.Log(r);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(r, NavigationService.CurrentPosition);
NavigationService.Go(null);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(r, NavigationService.CurrentPosition);
}
[Test]
/// <summary>
/// The <see cref="NavigationService"/> must
/// ignore requests to log a point equivalent
/// to the next position either forwards or back.
/// </summary>
public void LogDuplicateNextTest()
{
Assert.AreEqual(0, NavigationService.Count);
NavigationService.Log(p);
NavigationService.Log(q);
NavigationService.Log(r);
NavigationService.Go(-1);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(q, NavigationService.CurrentPosition);
Assert.IsTrue(NavigationService.CanNavigateBack);
Assert.IsTrue(NavigationService.CanNavigateForwards);
NavigationService.Log(p);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(q, NavigationService.CurrentPosition);
Assert.IsTrue(NavigationService.CanNavigateBack);
Assert.IsTrue(NavigationService.CanNavigateForwards);
NavigationService.Log(r);
Assert.AreEqual(3, NavigationService.Count);
Assert.AreEqual(q, NavigationService.CurrentPosition);
Assert.IsTrue(NavigationService.CanNavigateBack);
Assert.IsTrue(NavigationService.CanNavigateForwards);
}
#region setup / tear down
[SetUp]
public void BeforeEachTest()
{
NavigationService.ClearHistory(true);
NavigationService.ResumeLogging();
}
[TearDown]
public void AfterEachTest()
{
NavigationService.ClearHistory(true);
NavigationService.ResumeLogging();
}
/// <summary>
/// Create several <see cref="TestNavigationPoint"/>s
/// for use during tests.
/// </summary>
[TestFixtureSetUp]
public void Init()
{
p = new TestNavigationPoint("p.cs");
p_5 = new TestNavigationPoint("p.cs", 5);
p_6 = new TestNavigationPoint("p.cs", 6);
p_37 = new TestNavigationPoint("p.cs", 37);
q = new TestNavigationPoint("q.cs");
r = new TestNavigationPoint("r.cs");
s = new TestNavigationPoint("s.cs");
t = new TestNavigationPoint("t.cs");
}
[TestFixtureTearDown]
public void Dispose()
{
// TODO: Add tear down code.
}
#endregion
}
}

70
src/Main/Base/Test/Services_Navigation/TestNavigationPoint.cs

@ -0,0 +1,70 @@
/*
* Created by SharpDevelop.
* User: David
* Date: 11/03/2006
* Time: 11:28 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using ICSharpCode.Core;
namespace NavigationServiceTests
{
/// <summary>
/// Description of TestNavigationPoint.
/// </summary>
public class TestNavigationPoint : DefaultNavigationPoint
{
public TestNavigationPoint(string filename) : this(filename, 0) {}
public TestNavigationPoint(string filename, int line): base(filename)
{
this.LineNumber = line;
}
public new int NavigationData {
get {
return (int)base.NavigationData;
}
set {
base.NavigationData = value;
}
}
public int LineNumber {
get {
return this.NavigationData;
}
set {
this.NavigationData = value;
}
}
#region IComparable
public override bool Equals(object obj)
{
TestNavigationPoint b = obj as TestNavigationPoint;
if (b == null) return false;
return this.FileName == b.FileName
&& Math.Abs(this.LineNumber - b.LineNumber) <= 5;
}
public override int GetHashCode()
{
return this.FileName.GetHashCode() ^ this.LineNumber.GetHashCode();
}
#endregion
public override void JumpTo()
{
// simulate the case where jumping triggers a call to log an intermediate position
NavigationService.Log(new TestNavigationPoint(this.FileName, -500));
// simulate changing something outside the NavigationService's model
CurrentTestPosition = this;
}
public static INavigationPoint CurrentTestPosition = null;
}
}

8
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/Gui/ToolBarSplitButton.cs

@ -50,6 +50,8 @@ namespace ICSharpCode.Core
void CreateDropDownItems() void CreateDropDownItems()
{ {
ToolStripItem[] itemsToAdd = null;
DropDownItems.Clear(); DropDownItems.Clear();
foreach (object item in subItems) foreach (object item in subItems)
{ {
@ -65,7 +67,10 @@ namespace ICSharpCode.Core
else else
{ {
ISubmenuBuilder submenuBuilder = (ISubmenuBuilder)item; ISubmenuBuilder submenuBuilder = (ISubmenuBuilder)item;
DropDownItems.AddRange(submenuBuilder.BuildSubmenu(codon, caller)); itemsToAdd = submenuBuilder.BuildSubmenu(codon, caller);
if (itemsToAdd!=null) {
DropDownItems.AddRange(itemsToAdd);
}
} }
} }
} }
@ -121,6 +126,7 @@ namespace ICSharpCode.Core
private void UpdateButtonImage() private void UpdateButtonImage()
{ {
//LoggingService.Info("UpdatingButtonImage: buttonEnabled=="+buttonEnabled.ToString());
Image = buttonEnabled ? imgButtonEnabled : imgButtonDisabled; Image = buttonEnabled ? imgButtonEnabled : imgButtonDisabled;
} }

BIN
src/Main/StartUp/Project/Resources/BitmapResources.resources

Binary file not shown.

3
src/Main/StartUp/Project/SharpDevelopMain.cs

@ -258,6 +258,9 @@ namespace ICSharpCode.SharpDevelop
AddInTree.ConditionEvaluators.Add("TextContent", new ICSharpCode.SharpDevelop.DefaultEditor.Conditions.TextContentConditionEvaluator()); AddInTree.ConditionEvaluators.Add("TextContent", new ICSharpCode.SharpDevelop.DefaultEditor.Conditions.TextContentConditionEvaluator());
AddInTree.ConditionEvaluators.Add("BrowserLocation", new ICSharpCode.SharpDevelop.BrowserDisplayBinding.BrowserLocationConditionEvaluator()); AddInTree.ConditionEvaluators.Add("BrowserLocation", new ICSharpCode.SharpDevelop.BrowserDisplayBinding.BrowserLocationConditionEvaluator());
AddInTree.ConditionEvaluators.Add("RefactoringProviderSupports", new Refactoring.RefactoringProviderSupportsConditionEvaluator()); AddInTree.ConditionEvaluators.Add("RefactoringProviderSupports", new Refactoring.RefactoringProviderSupportsConditionEvaluator());
// TODO: is there a way to automate ConditionEvaluator registration via reflection? or to specify it in the .addin files?
AddInTree.ConditionEvaluators.Add("CanNavigateBack", new CanNavigateBackConditionEvaluator());
AddInTree.ConditionEvaluators.Add("CanNavigateForward", new CanNavigateForwardConditionEvaluator());
AddInTree.Doozers.Add("DialogPanel", new DialogPanelDoozer()); AddInTree.Doozers.Add("DialogPanel", new DialogPanelDoozer());
AddInTree.Doozers.Add("DisplayBinding", new DisplayBindingDoozer()); AddInTree.Doozers.Add("DisplayBinding", new DisplayBindingDoozer());

6
src/SharpDevelop.Tests.sln

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.1.0.1340 # SharpDevelop 2.1.0.1472
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}"
ProjectSection(SolutionItems) = postProject ProjectSection(SolutionItems) = postProject
EndProjectSection EndProjectSection
@ -224,6 +224,10 @@ Global
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.Build.0 = Release|Any CPU {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.Build.0 = Release|Any CPU
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.ActiveCfg = Release|Any CPU {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B3EFF50A-ADBF-4FCD-ACE3-081AF1B37F1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B3EFF50A-ADBF-4FCD-ACE3-081AF1B37F1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B3EFF50A-ADBF-4FCD-ACE3-081AF1B37F1D}.Release|Any CPU.Build.0 = Release|Any CPU
{B3EFF50A-ADBF-4FCD-ACE3-081AF1B37F1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

2
src/SharpDevelop.sln

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.1.0.1298 # SharpDevelop 2.1.0.1472
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}"
ProjectSection(SolutionItems) = postProject ProjectSection(SolutionItems) = postProject
EndProjectSection EndProjectSection

Loading…
Cancel
Save