refactory: added UI removed from core plugin.
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpdt / internal / ui / viewsupport / ISelectionListenerWithAST.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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 net.sourceforge.phpdt.internal.ui.viewsupport;
12
13 import org.eclipse.jface.text.ITextSelection;
14 import org.eclipse.ui.IEditorPart;
15
16 /**
17  * Listener to be informed on text selection changes in an editor (post
18  * selection), including the corresponding AST. The AST is shared and must not
19  * be modified. Listeners can be registered in a
20  * <code>SelectionListenerWithASTManager</code>.
21  */
22 public interface ISelectionListenerWithAST {
23
24         /**
25          * Called when a selection has changed. The method is called in a post
26          * selection event in an background thread.
27          * 
28          * @param part
29          *            The editor part in which the selection change has occured.
30          * @param selection
31          *            The new text selection
32          * @param astRoot
33          *            The AST tree corresponding to the editor's input. This AST is
34          *            shared and must not be modified.
35          */
36         void selectionChanged(IEditorPart part, ITextSelection selection);
37         // void selectionChanged(IEditorPart part, ITextSelection selection,
38         // CompilationUnit astRoot);
39
40 }