Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7919691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:57:00+00:00 2026-06-03T15:57:00+00:00

I like to use the navigation history provided by Eclipse in my RCP Application.

  • 0

I like to use the navigation history provided by Eclipse in my RCP Application. Unfortunately this feature isn’t well documented. In fact I only found this Wiki entry: http://wiki.eclipse.org/FAQ_How_do_I_hook_my_editor_to_the_Back_and_Forward_buttons%3F

It mentions that every editor can be marked in the navigation history, without having to specify a location. This is exactly what I want.

Regardless of whether the specific editor has any support for navigation history, markLocation will work. If the editor doesn’t implement INavigationLocationProvider, a history entry will be added, allowing the user to jump back to that editor but without returning to any particular location.

I added the following lines of code to my application in order to add a navigation entry each time a new Editor is opened.

IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart editor = page.openEditor( input, MyEditor.ID );
page.getNavigationHistory().markLocation( editor );

My problem is that the code doesn’t work. The toolbar icons for the commands org.eclipse.ui.navigate.backwardHistory and org.eclipse.ui.navigate.forwardHistory stay grayed out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:57:02+00:00Added an answer on June 3, 2026 at 3:57 pm

    I have found the solution. In order to use the Navigation History in your Eclipse RCP application you have to add the following lines of code to your ApplicationActionBarAdvisor.

    /**
     * Fills the cool bar with the main toolbars for the window.
     * <p>
     * The default implementation does nothing. Subclasses may override.
     * </p>
     * 
     * @param coolBar
     *            the cool bar manager
     */
    protected void fillCoolBar( ICoolBarManager coolBar ) {
        IToolBarManager navigation = new ToolBarManager( SWT.FLAT );
    
        IAction backward = getAction( IWorkbenchCommandConstants.NAVIGATE_BACKWARD_HISTORY );
        IAction forward = getAction( IWorkbenchCommandConstants.NAVIGATE_FORWARD_HISTORY );
    
        navigation.add( backward );
        navigation.add( forward );
    
        coolBar.add( navigation );
    }
    
    /**
     * Instantiates the actions used in the fill methods. Use
     * {@link #register(IAction)} to register the action with the key binding
     * service and add it to the list of actions to be disposed when the window
     * is closed.
     * 
     * @param window
     *            the window containing the action bars
     */
    protected void makeActions( IWorkbenchWindow window ) {
        IAction backward = ActionFactory.BACKWARD_HISTORY.create( window );
        backward.setId( IWorkbenchCommandConstants.NAVIGATE_BACKWARD_HISTORY );
        IAction forward = ActionFactory.FORWARD_HISTORY.create( window );
        forward.setId( IWorkbenchCommandConstants.NAVIGATE_FORWARD_HISTORY );
    
        register( backward );
        register( forward );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use the HTML5 window.history feature to implement full AJAX navigation
I use safe navigation operator to avoid NPEs like this myInstance?.field1 myInstance?.field2 myInstance?.field3 To
I made an totally custom navigation bar and would like to use the exact
I usually use like this $ find -name testname.c ./dir1/dir2/testname.c $ vi ./dir1/dir2/testname.c it's
I want to implement a jQuery Mobile application without browser history navigation (feel free
I really like this Nivo Slider: http://nivo.dev7studios.com/demos/4/ However, instead of the thumbnails for navigation,
I would like to use images for navigation names and change the image for
I am building an ASP.NET application and would like to use a master page
I would like to be able to get the navigation history from my users
I normally use ajax navigation by using # in <a> in some links like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.