01: /*******************************************************************************
02: * Copyright (c) 2003, 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.internal.navigator.extensions;
11:
12: import org.eclipse.ui.internal.navigator.TextActionHandler;
13:
14: /**
15: * An INavigatorSiteEditor is used to edit (i.e., rename) elements in a NavigatorViewer.
16: * <p>
17: * This interface is not intended to be implemented by clients.
18: * </p>
19: * <p>
20: * This interface is experimental and is subject to change.
21: * </p>
22: * <p>
23: * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part of a work in
24: * progress. There is a guarantee neither that this API will work nor that it will remain the same.
25: * Please do not use this API without consulting with the Platform/UI team.
26: * </p>
27: *
28: * @since 3.2
29: */
30: public interface INavigatorSiteEditor {
31: /**
32: * Starts the editing. An editor box will be overlaid on the selected element in the Navigator
33: * tree.
34: *
35: * @param runnable
36: * Runnable to execute when editing ends successfully
37: */
38: public void edit(Runnable runnable);
39:
40: /**
41: * Returns the new text. Returns <code>null</code> if editing was cancelled. Editing is
42: * cancelled when the user pressed the Escape key.
43: *
44: * @return the new text or <code>null</code> if editing was cancelled
45: */
46: public String getText();
47:
48: /**
49: * Set the text handler that handles cut, copy, paste, delete and select all operations within
50: * the editor box.
51: *
52: * @param actionHandler
53: * the text action handler
54: */
55: public void setTextActionHandler(TextActionHandler actionHandler);
56: }
|