KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > navigator > extensions > INavigatorSiteEditor


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.internal.navigator.extensions;
12
13 import org.eclipse.ui.internal.navigator.TextActionHandler;
14
15
16 /**
17  * An INavigatorSiteEditor is used to edit (i.e., rename) elements in a NavigatorViewer.
18  * <p>
19  * This interface is not intended to be implemented by clients.
20  * </p>
21  * <p>
22  * This interface is experimental and is subject to change.
23  * </p>
24  * <p>
25  * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part of a work in
26  * progress. There is a guarantee neither that this API will work nor that it will remain the same.
27  * Please do not use this API without consulting with the Platform/UI team.
28  * </p>
29  *
30  * @since 3.2
31  */

32 public interface INavigatorSiteEditor {
33     /**
34      * Starts the editing. An editor box will be overlaid on the selected element in the Navigator
35      * tree.
36      *
37      * @param runnable
38      * Runnable to execute when editing ends successfully
39      */

40     public void edit(Runnable JavaDoc runnable);
41
42     /**
43      * Returns the new text. Returns <code>null</code> if editing was cancelled. Editing is
44      * cancelled when the user pressed the Escape key.
45      *
46      * @return the new text or <code>null</code> if editing was cancelled
47      */

48     public String JavaDoc getText();
49
50     /**
51      * Set the text handler that handles cut, copy, paste, delete and select all operations within
52      * the editor box.
53      *
54      * @param actionHandler
55      * the text action handler
56      */

57     public void setTextActionHandler(TextActionHandler actionHandler);
58 }
59
Popular Tags