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
 
   9  *     IBM Corporation - initial API and implementation
 
  10  *******************************************************************************/
 
  11 package net.sourceforge.phpdt.internal.ui.viewsupport;
 
  13 import org.eclipse.jface.text.ITextSelection;
 
  14 import org.eclipse.ui.IEditorPart;
 
  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>.
 
  22 public interface ISelectionListenerWithAST {
 
  25          * Called when a selection has changed. The method is called in a post
 
  26          * selection event in an background thread.
 
  29          *            The editor part in which the selection change has occured.
 
  31          *            The new text selection
 
  33          *            The AST tree corresponding to the editor's input. This AST is
 
  34          *            shared and must not be modified.
 
  36         void selectionChanged(IEditorPart part, ITextSelection selection);
 
  37         // void selectionChanged(IEditorPart part, ITextSelection selection,
 
  38         // CompilationUnit astRoot);