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;
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;
/**
if (fCurrentJob != null) {
fCurrentJob.cancel();
}
- final IJavaElement input = getJavaElement();
- if (input == null) {
- return;
- }
fCurrentJob = new Job("SelectionListenerWithASTManager Job") {// JavaUIMessages.SelectionListenerWithASTManager_job_title)
// {
monitor = new NullProgressMonitor();
}
synchronized (fJobLock) {
- return calculateASTandInform(input, selection, monitor);
+ return calculateASTandInform(/*input,*/ selection, monitor);
}
}
};
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;