X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/viewsupport/SelectionListenerWithASTManager.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/viewsupport/SelectionListenerWithASTManager.java index 6741cba..279fc49 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/viewsupport/SelectionListenerWithASTManager.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/viewsupport/SelectionListenerWithASTManager.java @@ -13,8 +13,6 @@ package net.sourceforge.phpdt.internal.ui.viewsupport; import java.util.HashMap; import java.util.Map; -import net.sourceforge.phpdt.core.IJavaElement; - import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; @@ -22,13 +20,14 @@ import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.util.ListenerList; +//incastrix +//import org.eclipse.jface.util.ListenerList; +import org.eclipse.core.runtime.ListenerList; import org.eclipse.jface.viewers.IPostSelectionProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.ui.IEditorInput; import org.eclipse.ui.texteditor.ITextEditor; /** @@ -131,10 +130,6 @@ public class SelectionListenerWithASTManager { if (fCurrentJob != null) { fCurrentJob.cancel(); } - final IJavaElement input = getJavaElement(); - if (input == null) { - return; - } fCurrentJob = new Job("SelectionListenerWithASTManager Job") {// JavaUIMessages.SelectionListenerWithASTManager_job_title) // { @@ -143,7 +138,7 @@ public class SelectionListenerWithASTManager { monitor = new NullProgressMonitor(); } synchronized (fJobLock) { - return calculateASTandInform(input, selection, monitor); + return calculateASTandInform(/*input,*/ selection, monitor); } } }; @@ -152,16 +147,7 @@ public class SelectionListenerWithASTManager { fCurrentJob.schedule(); } - private IJavaElement getJavaElement() { - IEditorInput editorInput = fPart.getEditorInput(); - if (editorInput != null) - return (IJavaElement) editorInput - .getAdapter(IJavaElement.class); - - return null; - } - - protected IStatus calculateASTandInform(IJavaElement input, + protected IStatus calculateASTandInform(/*IJavaElement input,*/ ITextSelection selection, IProgressMonitor monitor) { if (monitor.isCanceled()) { return Status.CANCEL_STATUS;