* @param element
* the element to open
*/
private void openTypeHierarchy( SchemaObject element )
{
HierarchyView view = ( HierarchyView ) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.findView( HierarchyView.ID );
if ( view == null )
{
try
{
view = ( HierarchyView ) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(
HierarchyView.ID );
}
catch ( PartInitException e )
{
PluginUtils.logError( Messages.getString( "OpenTypeHierarchyAction.ErrorOpeningView" ), e ); //$NON-NLS-1$
ViewUtils
.displayErrorMessageDialog(
Messages.getString( "OpenTypeHierarchyAction.Error" ), Messages.getString( "OpenTypeHierarchyAction.ErrorOpeningView" ) ); //$NON-NLS-1$ //$NON-NLS-2$
}
}
if ( view != null )
{
view.setInput( element );
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop( view );
}
}