if (javaElement != null && javaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT) {  try { IViewPart view= wbPage.showView(JavaUI.ID_PACKAGES); if (view instanceof IPackagesViewPart) ((IPackagesViewPart)view).selectAndReveal(javaElement); } catch (PartInitException ex) { ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message")); } } else {
if (javaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT) gotoPackagesView(javaElement, wbPage); else {
	private void show(IMarker marker) {		IResource resource= marker.getResource();		if (resource == null || !resource.exists())			return;		IWorkbenchPage wbPage= JavaPlugin.getActivePage();		IJavaElement javaElement= SearchUtil.getJavaElement(marker);//		if (javaElement == null) {//			beep();//			return;//		}		if (javaElement != null && javaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT) {			// Goto packages view			try {				IViewPart view= wbPage.showView(JavaUI.ID_PACKAGES);				if (view instanceof IPackagesViewPart)					((IPackagesViewPart)view).selectAndReveal(javaElement);			} catch (PartInitException ex) {				ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.openEditor.title"), SearchMessages.getString("Search.Error.openEditor.message")); //$NON-NLS-2$ //$NON-NLS-1$			}		} else {			if (SearchUI.reuseEditor())				showWithReuse(marker, resource, javaElement, wbPage);			else				showWithoutReuse(marker, javaElement, wbPage);		}	}