1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for 204919: [Editor] CCE using incremental search

This commit is contained in:
Anton Leherbauer 2007-10-04 08:05:50 +00:00
parent b44e94c0e1
commit 4c3164b783

View file

@ -44,6 +44,7 @@ import org.eclipse.jface.text.source.projection.IProjectionPosition;
import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
import org.eclipse.jface.text.source.projection.ProjectionViewer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.ui.texteditor.IDocumentProvider;
@ -93,8 +94,11 @@ public class DefaultCFoldingStructureProvider implements ICFoldingStructureProvi
*/
private final class SelectionListener implements ISelectionChangedListener {
public void selectionChanged(SelectionChangedEvent event) {
ITextSelection selection= (ITextSelection)event.getSelection();
fCursorPosition= selection.getOffset();
ISelection s= event.getSelection();
if (s instanceof ITextSelection) {
ITextSelection selection= (ITextSelection)event.getSelection();
fCursorPosition= selection.getOffset();
}
}
}