/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setStatusLineManager(ISelection selection) { IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); if (statusLineManager != null) { if (selection instanceof IStructuredSelection) { Collection<?> collection = ((IStructuredSelection)selection).toList(); switch (collection.size()) { case 0: { statusLineManager.setMessage(getString("_UI_NoObjectSelected")); break; } case 1: { String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); break; } default: { statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); break; } } } else { statusLineManager.setMessage(""); } } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setStatusLineManager ( ISelection selection ) { IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? contentOutlineStatusLineManager : getActionBars ().getStatusLineManager (); if ( statusLineManager != null ) { if ( selection instanceof IStructuredSelection ) { Collection<?> collection = ( (IStructuredSelection)selection ).toList (); switch ( collection.size () ) { case 0: { statusLineManager.setMessage ( getString ( "_UI_NoObjectSelected" ) ); //$NON-NLS-1$ break; } case 1: { String text = new AdapterFactoryItemDelegator ( adapterFactory ).getText ( collection.iterator ().next () ); statusLineManager.setMessage ( getString ( "_UI_SingleObjectSelected", text ) ); //$NON-NLS-1$ break; } default: { statusLineManager.setMessage ( getString ( "_UI_MultiObjectSelected", Integer.toString ( collection.size () ) ) ); //$NON-NLS-1$ break; } } } else { statusLineManager.setMessage ( "" ); //$NON-NLS-1$ } } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setStatusLineManager ( ISelection selection ) { IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? contentOutlineStatusLineManager : getActionBars ().getStatusLineManager (); if ( statusLineManager != null ) { if ( selection instanceof IStructuredSelection ) { Collection<?> collection = ( (IStructuredSelection)selection ).toList (); switch ( collection.size () ) { case 0: { statusLineManager.setMessage ( getString ( "_UI_NoObjectSelected" ) ); break; } case 1: { String text = new AdapterFactoryItemDelegator ( adapterFactory ).getText ( collection.iterator ().next () ); statusLineManager.setMessage ( getString ( "_UI_SingleObjectSelected", text ) ); break; } default: { statusLineManager.setMessage ( getString ( "_UI_MultiObjectSelected", Integer.toString ( collection.size () ) ) ); break; } } } else { statusLineManager.setMessage ( "" ); } } }