01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui;
11:
12: /**
13: * Manages a list of entries to keep a history of locations on editors,
14: * enabling the user to go back and forward without losing context.
15: *
16: * The history is a list of <code>INavigationLocation</code> and a pointer
17: * to the current location. Whenever the back or forward action runs the
18: * history restores the previous or next location.
19: *
20: * The back and/or forward actions should not change the content of the history
21: * in any way.
22: *
23: * If the user steps N times in one direction (back or forward) and then N times to
24: * the oposite direction, the editor and location should be exactly the same as before.
25: *
26: * Clients must guarantee that the current location is
27: * always in the history, which can be done either by marking
28: * a new location or by updating the current location.
29: *
30: * Not intended to be implemented by clients.
31: *
32: * @since 2.1
33: */
34: public interface INavigationHistory {
35: /**
36: * Mark the current location into the history. This message
37: * should be sent by clients whenever significant changes
38: * in location are detected.
39: *
40: * The location is obtained by calling <code>INavigationLocationProvider.createNavigationLocation</code>
41: */
42: public void markLocation(IEditorPart part);
43:
44: /**
45: * Returns the current location.
46: *
47: * @return the current location
48: */
49: public INavigationLocation getCurrentLocation();
50:
51: /**
52: * Returns all entries in the history.
53: *
54: * @return all entries in the history
55: */
56: public INavigationLocation[] getLocations();
57: }
|