Esempio n. 1
0
        /*		static void Log(IWorkbenchWindow window)
         *      {
         *          if (window==null) return;
         *          Log(window.ActiveViewContent);
         *      }
         */


        /// <summary>
        /// Asks an <see cref="IViewContent"/> implementation to build an
        /// <see cref="INavigationPoint"/> and then logs it.
        /// </summary>
        /// <param name="vc"></param>
        public static void Log(IViewContent vc)
        {
            if (vc == null)
            {
                return;
            }
            Log(vc.BuildNavPoint());
        }
Esempio n. 2
0
        // Unit test covered but the test does not yet verify the results.
        public static INavigationPoint Log()
        {
            if (WorkbenchSingleton.Workbench == null)
            {
                return(null);
            }
            IViewContent view = WorkbenchSingleton.Workbench.ActiveViewContent;

            if (view == null)
            {
                return(null);
            }

            return(view.BuildNavPoint());
        }
Esempio n. 3
0
        public static IViewContent JumpToFilePosition(string fileName, int line, int column)
        {
            if (fileName == null || fileName.Length == 0)
            {
                return(null);
            }
            IWorkbenchWindow window = OpenFile(fileName);

            if (window == null)
            {
                return(null);
            }
            IViewContent content = window.ViewContent;

            if (content is IPositionable)
            {
                // TODO: enable jumping to a particular view
                window.SwitchView(0);
                ((IPositionable)content).JumpTo(Math.Max(0, line), Math.Max(0, column));
            }
            NavigationService.Log(content.BuildNavPoint());
            return(content);
        }
Esempio n. 4
0
		/*		static void Log(IWorkbenchWindow window)
		{
			if (window==null) return;
			Log(window.ActiveViewContent);
		}
		 */

		
		/// <summary>
		/// Asks an <see cref="IViewContent"/> implementation to build an
		/// <see cref="INavigationPoint"/> and then logs it.
		/// </summary>
		/// <param name="vc"></param>
		public static void Log(IViewContent vc)
		{
			if (vc==null) return;
			Log(vc.BuildNavPoint());
		}