當前位置: 首頁>>代碼示例>>Java>>正文


Java StatusManager類代碼示例

本文整理匯總了Java中org.eclipse.ui.statushandlers.StatusManager的典型用法代碼示例。如果您正苦於以下問題:Java StatusManager類的具體用法?Java StatusManager怎麽用?Java StatusManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StatusManager類屬於org.eclipse.ui.statushandlers包,在下文中一共展示了StatusManager類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: findFactory

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
public static KeyProviderFactory findFactory ( final String id )
{
    for ( final IConfigurationElement ele : Platform.getExtensionRegistry ().getConfigurationElementsFor ( EXTP_KEY_PROVIDER_FACTORY ) )
    {
        if ( !ELE_FACTORY.equals ( ele.getName () ) )
        {
            continue;
        }

        try
        {
            return (KeyProviderFactory)ele.createExecutableExtension ( ATTR_CLASS );
        }
        catch ( final CoreException e )
        {
            StatusManager.getManager ().handle ( e, Activator.PLUGIN_ID );
        }
    }

    return null;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:Helper.java

示例2: createFactories

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
public static Collection<KeyProviderFactory> createFactories ()
{
    final Collection<KeyProviderFactory> result = new LinkedList<KeyProviderFactory> ();

    for ( final IConfigurationElement ele : Platform.getExtensionRegistry ().getConfigurationElementsFor ( EXTP_KEY_PROVIDER_FACTORY ) )
    {
        if ( !ELE_FACTORY.equals ( ele.getName () ) )
        {
            continue;
        }

        try
        {
            result.add ( (KeyProviderFactory)ele.createExecutableExtension ( ATTR_CLASS ) );
        }
        catch ( final CoreException e )
        {
            StatusManager.getManager ().handle ( e, Activator.PLUGIN_ID );
        }
    }

    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:24,代碼來源:Helper.java

示例3: setVisible

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
@Override
public void setVisible ( final boolean visible )
{
    super.setVisible ( visible );
    if ( visible )
    {
        try
        {
            getContainer ().run ( false, false, new IRunnableWithProgress () {

                @Override
                public void run ( final IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException
                {
                    setMergeResult ( PreviewPage.this.mergeController.merge ( wrap ( monitor ) ) );
                }
            } );
        }
        catch ( final Exception e )
        {
            final Status status = new Status ( IStatus.ERROR, Activator.PLUGIN_ID, Messages.PreviewPage_StatusErrorFailedToMerge, e );
            StatusManager.getManager ().handle ( status );
            ErrorDialog.openError ( getShell (), Messages.PreviewPage_TitleErrorFailedToMerge, Messages.PreviewPage_MessageErrorFailedToMerge, status );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:26,代碼來源:PreviewPage.java

示例4: run

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
@Override
public void run ()
{
    try
    {
        final IViewPart viewPart = getViewSite ().getWorkbenchWindow ().getActivePage ().showView ( ChartConfiguratorView.VIEW_ID );
        if ( viewPart instanceof ChartConfiguratorView )
        {
            ( (ChartConfiguratorView)viewPart ).setChartConfiguration ( getConfiguration () );
        }
    }
    catch ( final PartInitException e )
    {
        StatusManager.getManager ().handle ( e.getStatus (), StatusManager.BLOCK );
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:17,代碼來源:AbstractChartView.java

示例5: create

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
private StyleGenerator create ( final IConfigurationElement ele )
{
    if ( ele == null )
    {
        return null;
    }

    try
    {
        final Object o = ele.createExecutableExtension ( Messages.PreferenceSelectorStyleGenerator_2 );
        if ( o instanceof StyleGenerator )
        {
            return (StyleGenerator)o;
        }
        logger.warn ( "Class referenced in 'generatorClass' did not implement {}", StyleGenerator.class ); //$NON-NLS-1$
        return null;
    }
    catch ( final CoreException e )
    {
        StatusManager.getManager ().handle ( e, Activator.PLUGIN_ID );
        return null;
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:24,代碼來源:PreferenceSelectorStyleGenerator.java

示例6: createButton

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
private void createButton ( final Composite parent )
{
    this.wrapper = new Composite ( parent, SWT.NONE );
    final GridLayout layout = new GridLayout ( 1, true );
    layout.marginHeight = layout.marginWidth = 0;
    this.wrapper.setLayout ( layout );

    this.startButton = new Button ( this.wrapper, SWT.PUSH );
    this.startButton.setLayoutData ( new GridData ( SWT.CENTER, SWT.CENTER, true, true ) );
    this.startButton.setText ( Messages.DetailsPart_startButton_label );
    this.startButton.addSelectionListener ( new SelectionAdapter () {
        @Override
        public void widgetSelected ( final SelectionEvent e )
        {
            try
            {
                start ();
            }
            catch ( final Exception ex )
            {
                logger.error ( "Failed to start chart", ex ); //$NON-NLS-1$
                StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, ex ), StatusManager.BLOCK );
            }
        }
    } );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:27,代碼來源:DetailsPart.java

示例7: getFilterTabs

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
protected List<FilterTab> getFilterTabs ()
{
    final List<FilterTab> result = new LinkedList<FilterTab> ();

    result.add ( new QueryByExampleTab () );
    result.add ( new FreeFormTab () );

    for ( final IConfigurationElement ele : Platform.getExtensionRegistry ().getConfigurationElementsFor ( EXTP_FILTER_TAB ) )
    {
        if ( !"filterTab".equals ( ele.getName () ) )
        {
            continue;
        }

        try
        {
            result.add ( (FilterTab)ele.createExecutableExtension ( "class" ) );
        }
        catch ( final CoreException e )
        {
            StatusManager.getManager ().handle ( e.getStatus () );
        }
    }

    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:27,代碼來源:EventHistorySearchDialog.java

示例8: FactoryImpl

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
public FactoryImpl ()
{
    this.prefs = Preferences.userNodeForPackage ( FactoryImpl.class ).node ( "files" );

    try
    {
        for ( final String child : this.prefs.childrenNames () )
        {
            final Preferences childNode = this.prefs.node ( child );
            final String fileName = childNode.get ( "file", null );
            if ( fileName != null )
            {
                this.files.add ( fileName );
            }
        }
    }
    catch ( final BackingStoreException e )
    {
        StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, e ) );
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:FactoryImpl.java

示例9: init

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
@Override
public void init ( final Realm realm )
{
    this.realm = realm;
    this.list = new WritableList ();

    for ( final String name : this.names )
    {
        try
        {
            this.list.add ( new SunMSCAPIProvider ( this.realm, name ) );
        }
        catch ( final Exception e )
        {
            StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, e ) );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:19,代碼來源:FactoryImpl.java

示例10: performFinish

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
@Override
public boolean performFinish ()
{
    try
    {
        getContainer ().run ( true, true, new IRunnableWithProgress () {

            public void run ( final IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException
            {
                doExport ( monitor );
            }
        } );
        return true;
    }
    catch ( final Exception e )
    {
        StatusManager.getManager ().handle ( new Status ( IStatus.ERROR, Activator.PLUGIN_ID, Messages.ExportWizard_ErrorMessage, e ) );
        return false;
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:21,代碼來源:ExportEventsWizard.java

示例11: triggerDataUpdate

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
/**
 * Trigger the controller to update the data from the registration manager
 * <p>
 * This method can be called from any thread and must synchronized to the UI
 * </p>
 */
@Override
public void triggerDataUpdate ()
{
    try
    {
        Display.getDefault ().asyncExec ( new Runnable () {
            @Override
            public void run ()
            {
                handleDataUpdate ();
            };
        } );
    }
    catch ( final Exception e )
    {
        StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, e ) );
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:25,代碼來源:SymbolController.java

示例12: runUpdate

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
private void runUpdate ( final boolean ignoreParents )
{
    logger.debug ( "Running update: {}", this.nameHierarchy );
    try
    {
        if ( this.onUpdate != null )
        {
            this.onUpdate.execute ( this.scriptContext );
        }
    }
    catch ( final Exception e )
    {
        StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, e ), StatusManager.LOG );
        errorLog ( "Failed to run update", e );
    }
    notifySummaryListeners ();

    // propagate update
    if ( !ignoreParents && this.parentController != null )
    {
        this.parentController.runUpdate ( false );
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:24,代碼來源:SymbolController.java

示例13: execute

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
public void execute ( final ScriptExecutor scriptExecutor, final Map<String, Object> scriptObjects ) throws Exception
{
    if ( scriptExecutor == null )
    {
        return;
    }

    try
    {
        scriptExecutor.execute ( this.scriptContext, scriptObjects );
    }
    catch ( final Exception e )
    {
        StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, e ), StatusManager.LOG );
        throw new InvocationTargetException ( e );
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:18,代碼來源:SymbolController.java

示例14: fireScriptEvent

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
private void fireScriptEvent ( final ScriptExecutor script, final Object event, final String eventName )
{
    this.controller.debugLog ( String.format ( "%s: %s", eventName, event ) ); //$NON-NLS-1$

    final Map<String, Object> scriptObjects = new LinkedHashMap<String, Object> ( 1 );
    scriptObjects.put ( "event", event ); //$NON-NLS-1$
    try
    {
        this.controller.execute ( script, scriptObjects );
    }
    catch ( final Exception e )
    {
        this.controller.errorLog ( "Failed to handle event: " + eventName, e ); //$NON-NLS-1$
        if ( !Boolean.getBoolean ( "org.eclipse.scada.vi.ui.draw2d.suppressErrors" ) ) //$NON-NLS-1$
        {
            StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, "Failed to handle event", e ), StatusManager.SHOW );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:20,代碼來源:FigureController.java

示例15: execute

import org.eclipse.ui.statushandlers.StatusManager; //導入依賴的package包/類
@SuppressWarnings ( "unchecked" )
@Override
public Object execute ( final ExecutionEvent event ) throws ExecutionException
{
    final String detailViewId = event.getParameter ( "org.eclipse.scada.vi.details.showDetailDialog.id" );
    final Map<String, String> parameters = (Map<String, String>)event.getObjectParameterForExecution ( "org.eclipse.scada.vi.details.showDetailDialog.parameters" );

    try
    {
        if ( this.useWaitShell )
        {
            openWithWaitShell ( getShell (), detailViewId, parameters );
        }
        else
        {
            open ( getShell (), detailViewId, parameters );
        }
    }
    catch ( final Exception e )
    {
        StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, "Failed to open detail view", e ), StatusManager.SHOW );
    }

    return null;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:26,代碼來源:ShowDetailDialog.java


注:本文中的org.eclipse.ui.statushandlers.StatusManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。