* @return the <code>ShowInContext</code> to show or <code>null</code>
*/
private ShowInContext getContext(IWorkbenchPart sourcePart) {
IShowInSource source = getShowInSource(sourcePart);
if (source != null) {
ShowInContext context = source.getShowInContext();
if (context != null) {
return context;
}
} else if (sourcePart instanceof IEditorPart) {
Object input = ((IEditorPart) sourcePart).getEditorInput();
ISelectionProvider sp = sourcePart.getSite().getSelectionProvider();
ISelection sel = sp == null ? null : sp.getSelection();
return new ShowInContext(input, sel);
}
return null;
}