]>
Commit | Line | Data |
---|---|---|
1b2798f6 EK |
1 | /******************************************************************************* |
2 | * Copyright (c) 2000, 2008 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.jdt.internal.ui.viewsupport; | |
12 | ||
13 | import org.eclipse.jface.text.ITextSelection; | |
14 | ||
15 | import org.eclipse.ui.IEditorPart; | |
16 | ||
17 | import org.eclipse.jdt.core.dom.CompilationUnit; | |
18 | ||
19 | /** | |
20 | * Listener to be informed on text selection changes in an editor (post selection), including the corresponding AST. | |
21 | * The AST is shared and must not be modified. | |
22 | * Listeners can be registered in a <code>SelectionListenerWithASTManager</code>. | |
23 | */ | |
24 | public interface ISelectionListenerWithAST { | |
25 | ||
26 | /** | |
27 | * Called when a selection has changed. The method is called in a post selection event in an background | |
28 | * thread. | |
29 | * | |
30 | * @param part The editor part in which the selection change has occurred. | |
31 | * @param selection The new text selection | |
32 | * @param astRoot The AST tree corresponding to the editor's input. This AST is shared and must | |
33 | * not be modified. | |
34 | */ | |
35 | void selectionChanged(IEditorPart part, ITextSelection selection, CompilationUnit astRoot); | |
36 | ||
37 | } |