Java 类org.eclipse.jface.action.IStatusLineManager 实例源码

项目:libraries    文件:GuiIconsView.java   
private IObjectReceiver<IGuiIconDescription> createMessageReceiver(final Composite composite) {
  final IActionBars bars = getViewSite().getActionBars();
  final Label messageLabel = createLabel(composite);
  final IStatusLineManager statusLineManager = bars.getStatusLineManager();
  return new IObjectReceiver<IGuiIconDescription>() {

    @Override
    public void set(final IGuiIconDescription description) {
      final String message = description == null
          ? "" //$NON-NLS-1$
          : description.getConstant().getName();
      messageLabel.setText(message);
      statusLineManager.setMessage(message);
    }
  };
}
项目:tlaplus    文件:UIHelper.java   
/**
 * Tries to set the given message on the workbench's status line. This is a
 * best effort method which fails to set the status line if there is no
 * active editor present from where the statuslinemanager can be looked up.
 * 
 * @param msg
 *            The message to be shown on the status line
 */
public static void setStatusLineMessage(final String msg) {
    IStatusLineManager statusLineManager = null;
    ISelectionProvider selectionService = null;

    // First try to get the StatusLineManager from the IViewPart and only
    // resort back to the editor if a view isn't active right now.
    final IWorkbenchPart workbenchPart = getActiveWindow().getActivePage().getActivePart();
    if (workbenchPart instanceof IViewPart) {
        final IViewPart viewPart = (IViewPart) workbenchPart;
        statusLineManager = viewPart.getViewSite().getActionBars().getStatusLineManager();
        selectionService = viewPart.getViewSite().getSelectionProvider();
    } else if (getActiveEditor() != null) {
        final IEditorSite editorSite = getActiveEditor().getEditorSite();
        statusLineManager = editorSite.getActionBars().getStatusLineManager();
        selectionService = editorSite.getSelectionProvider();
    }

    if (statusLineManager != null && selectionService != null) {
        statusLineManager.setMessage(msg);
        selectionService.addSelectionChangedListener(new StatusLineMessageEraser(statusLineManager,
                selectionService));
    }
}
项目:tlaplus    文件:TLAMultiPageEditorActionBarContributor.java   
public void contributeToStatusLine(IStatusLineManager statusLineManager)
{
    if (this.activeEditor instanceof ITextEditor)
    {
        if (statusLineManager.find(cursorPositionStatusField.getId()) == null)
        {
            // add the cursor position if not already there
            statusLineManager.add(cursorPositionStatusField);
        }
    } else
    {
        // remove cursor position if the active editor is not a text editor
        statusLineManager.remove(cursorPositionStatusField);
    }
    // must update to show changes in UI
    statusLineManager.update(true);
}
项目:datahierarchy    文件:DataHierarchyView.java   
@Override
public void selectionChanged(SelectionChangedEvent event) {
    IStatusLineManager manager = getViewSite().getActionBars().getStatusLineManager();
    ISelection selection = event.getSelection();
    if (selection.isEmpty()) {
        manager.setMessage(null);
    }
    if (selection instanceof IStructuredSelection) {
        IStructuredSelection ssel = (IStructuredSelection) selection;
        Object obj = ssel.getFirstElement();
        manager.setMessage(getLabelProvider().getImage(obj), getLabelProvider().getDecription(obj));
        SelectionChangedEvent myEvent = new SelectionChangedEvent(this, ssel);
        for (ISelectionChangedListener listener : listeners) {
            listener.selectionChanged(myEvent);
        }
    }
}
项目:PDFReporter-Studio    文件:ASPropertyWidget.java   
private IStatusLineManager getStatusLineManager() {
    IWorkbench wb = PlatformUI.getWorkbench();
    IWorkbenchWindow win = wb.getActiveWorkbenchWindow();

    IWorkbenchPage page = win.getActivePage();

    IWorkbenchPart part = page.getActivePart();
    if (part == null)
        return null;
    IWorkbenchPartSite site = part.getSite();
    IActionBars actionBars = null;
    if (site instanceof IEditorSite)
        actionBars = ((IEditorSite) site).getActionBars();
    else if (site instanceof IViewSite)
        actionBars = ((IViewSite) site).getActionBars();
    if (actionBars == null)
        return null;
    return actionBars.getStatusLineManager();
}
项目:PDFReporter-Studio    文件:ADataInput.java   
private IStatusLineManager getStatusLineManager() {
    IWorkbench wb = PlatformUI.getWorkbench();
    IWorkbenchWindow win = wb.getActiveWorkbenchWindow();

    IWorkbenchPage page = win.getActivePage();
    if (page == null)
        return null;
    IWorkbenchPart part = page.getActivePart();
    if (part == null)
        return null;
    IWorkbenchPartSite site = part.getSite();
    IActionBars actionBars = null;
    if (site instanceof IEditorSite)
        actionBars = ((IEditorSite) site).getActionBars();
    else if (site instanceof IViewSite)
        actionBars = ((IViewSite) site).getActionBars();
    if (actionBars == null)
        return null;

    return actionBars.getStatusLineManager();
}
项目:APICloud-Studio    文件:StatusLineMessageTimerManager.java   
static IStatusLineManager getStatusLineManager()
{
    try
    {
        IWorkbenchPartSite site = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
                .getActivePart().getSite();
        return ((IViewSite) site).getActionBars().getStatusLineManager();
    }
    catch (Exception e)
    {
        // try to get the IStatusLineManager through an active editor
        try
        {
            return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()
                    .getEditorSite().getActionBars().getStatusLineManager();
        }
        catch (Exception e1)
        {
        }
    }
    return null;
}
项目:APICloud-Studio    文件:FindHelper.java   
private static IWorkbenchPage getActivePage(IStatusLineManager statusLineManager)
{

    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();

    if (window == null)
    {
        if (statusLineManager != null)
        {
            statusLineManager.setErrorMessage(Messages.FindHelper_Error_workbench_window_null);
        }
        return null;
    }
    IWorkbenchPage activePage = window.getActivePage();
    if (activePage == null)
    {
        if (statusLineManager != null)
        {
            statusLineManager.setErrorMessage(Messages.FindHelper_Error_active_page_null);
        }
    }

    return activePage;
}
项目:APICloud-Studio    文件:CommonTextEditorActionContributor.java   
@Override
public void contributeToStatusLine(IStatusLineManager statusLineManager) {
    commandsMenuContributionItem = new CommandsMenuContributionItem();
    statusLineManager.add(commandsMenuContributionItem);
    super.contributeToStatusLine(statusLineManager);

    inputPositionStatsContributionItem = new StatusLineContributionItem(ITextEditorActionConstants.STATUS_CATEGORY_INPUT_POSITION, true, 24);
    IContributionItem[] contributionItems = statusLineManager.getItems();
    for (IContributionItem contributionItem : contributionItems) {
        String id = contributionItem.getId();

        if (ITextEditorActionConstants.STATUS_CATEGORY_INPUT_POSITION.equals(id)) {
            statusLineManager.remove(contributionItem);
            statusLineManager.add(inputPositionStatsContributionItem);
        }
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:PropertiesFileEditorActionContributor.java   
@Override
public void setActiveEditor(IEditorPart part) {
    super.setActiveEditor(part);

    IActionBars actionBars= getActionBars();
    IStatusLineManager manager= actionBars.getStatusLineManager();
    manager.setMessage(null);
    manager.setErrorMessage(null);

    ITextEditor textEditor= null;
    if (part instanceof ITextEditor)
        textEditor= (ITextEditor)part;

    actionBars.setGlobalActionHandler(JdtActionConstants.OPEN, getAction(textEditor, JdtActionConstants.OPEN));
    actionBars.setGlobalActionHandler("org.eclipse.jdt.internal.ui.actions.OpenHyperlink", getAction(textEditor, ITextEditorActionConstants.OPEN_HYPERLINK)); //$NON-NLS-1$
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:PropertiesFileEditorActionContributor.java   
@Override
public void setActiveEditor(IEditorPart part) {
    super.setActiveEditor(part);

    IActionBars actionBars= getActionBars();
    IStatusLineManager manager= actionBars.getStatusLineManager();
    manager.setMessage(null);
    manager.setErrorMessage(null);

    ITextEditor textEditor= null;
    if (part instanceof ITextEditor)
        textEditor= (ITextEditor)part;

    actionBars.setGlobalActionHandler(JdtActionConstants.OPEN, getAction(textEditor, JdtActionConstants.OPEN));
    actionBars.setGlobalActionHandler("org.eclipse.jdt.internal.ui.actions.OpenHyperlink", getAction(textEditor, ITextEditorActionConstants.OPEN_HYPERLINK)); //$NON-NLS-1$
}
项目:smarthome-cep-demonstrator    文件:SmarthomeEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:SimQRI    文件:MetamodelEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:gemoc-studio-modeldebugging    文件:TracingannotationsEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:neoscada    文件:ProtocolEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:DetailViewEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:VisualInterfaceEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:DeploymentEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:SetupEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:ProfileEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:OsgiEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:WorldEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:MemoryEditor.java   
/**
 * <!-- 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 ( "" );
        }
    }
}
项目:neoscada    文件:RecipeEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:InfrastructureEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:SecurityEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:GlobalizeEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:ComponentEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:ItemEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:neoscada    文件:ConfigurationEditor.java   
/**
 * <!-- 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$
        }
    }
}
项目:gemoc-studio    文件:GexpressionsEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:gemoc-studio    文件:FsmEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:time4sys    文件:NfpEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:time4sys    文件:GqamEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:time4sys    文件:TraceEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:time4sys    文件:AnalysisEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:time4sys    文件:ConstraintsEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:time4sys    文件:DesignEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:time4sys    文件:GrmEditor.java   
/**
 * <!-- 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("");
        }
    }
}
项目:time4sys    文件:Time4sysEditor.java   
/**
 * <!-- 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("");
        }
    }
}