diff --git a/src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs b/src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs index 26651ed9d9..e65eb5bc93 100644 --- a/src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs +++ b/src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs @@ -217,23 +217,20 @@ namespace ICSharpCode.SharpDevelop OnHistoryChanged(); } -/* // untested + // Unit test covered but the test does not yet verify the results. 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; + if (WorkbenchSingleton.Workbench == null) { + return null; + } + IViewContent view = WorkbenchSingleton.Workbench.ActiveViewContent; + if (view == null) { + return null; + } + + return view.BuildNavPoint(); } -*/ + /// /// Gets a of the that /// are currently in the collection. @@ -452,3 +449,4 @@ namespace ICSharpCode.SharpDevelop + diff --git a/src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs b/src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs index c9a5dc8101..7f00160e9a 100644 --- a/src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs +++ b/src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs @@ -632,3 +632,4 @@ namespace NavigationServiceTests #endregion } } +