KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > INavigationHistory


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui;
12
13 /**
14  * Manages a list of entries to keep a history of locations on editors,
15  * enabling the user to go back and forward without losing context.
16  *
17  * The history is a list of <code>INavigationLocation</code> and a pointer
18  * to the current location. Whenever the back or forward action runs the
19  * history restores the previous or next location.
20  *
21  * The back and/or forward actions should not change the content of the history
22  * in any way.
23  *
24  * If the user steps N times in one direction (back or forward) and then N times to
25  * the oposite direction, the editor and location should be exactly the same as before.
26  *
27  * Clients must guarantee that the current location is
28  * always in the history, which can be done either by marking
29  * a new location or by updating the current location.
30  *
31  * Not intended to be implemented by clients.
32  *
33  * @since 2.1
34  */

35 public interface INavigationHistory {
36     /**
37      * Mark the current location into the history. This message
38      * should be sent by clients whenever significant changes
39      * in location are detected.
40      *
41      * The location is obtained by calling <code>INavigationLocationProvider.createNavigationLocation</code>
42      */

43     public void markLocation(IEditorPart part);
44
45     /**
46      * Returns the current location.
47      *
48      * @return the current location
49      */

50     public INavigationLocation getCurrentLocation();
51
52     /**
53      * Returns all entries in the history.
54      *
55      * @return all entries in the history
56      */

57     public INavigationLocation[] getLocations();
58 }
59
Popular Tags