Bug 89551 [content assist] Order of completion proposals does not seem correct
build I20050329-2000 1) create p/ZZZ.java package p; public class ZZZ {} 2) create q/X.java package q; public class X { void zzz() { zz<<cursor>> } } 3) do ctrl+space at <<curosr>> location ZZZ is the first proposal and zzz() the second. But in this case zzz() should be the best proposal.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/GenericJavaTypeProposal.java
}
	}
	
	/**
	 * Returns the currently active java editor, or <code>null</code> if it 
	 * cannot be determined.
	 * 
	 * @return  the currently active java editor, or <code>null</code>
	 */
	private JavaEditor getJavaEditor() {
		IEditorPart part= JavaPlugin.getActivePage().getActiveEditor();
		if (part instanceof JavaEditor)
			return (JavaEditor) part;
		else
			return null;
	}
	/*
	 * @see ICompletionProposal#getSelection(IDocument)
	 */
	public Point getSelection(IDocument document) {
		if (fSelectedRegion == null)
			return super.getSelection(document);
		return new Point(fSelectedRegion.getOffset(), fSelectedRegion.getLength());
	}
	private void openErrorDialog(BadLocationException e) {
		Shell shell= fTextViewer.getTextWidget().getShell();
		MessageDialog.openError(shell, JavaTextMessages.getString("ExperimentalProposal.error.msg"), e.getMessage()); 
	}	
}