Package org.eclipse.core.commands.operations

Examples of org.eclipse.core.commands.operations.OperationStatus


        {
            page.openEditor(input, SearchEditor.ID);
        }
        catch (Exception x)
        {
            final IStatus status = new OperationStatus(IStatus.ERROR,
                WorkbenchCorePlugin.PLUGIN_ID, -2, "Editor could not be opened.", x);
            Utils.showError(status);
        }
    }
View Full Code Here


            return (IAttributeEditor) element.createExecutableExtension(ATT_CLASS);
        }
        catch (CoreException e)
        {
            WorkbenchCorePlugin.getDefault().getLog().log(
                new OperationStatus(IStatus.ERROR, WorkbenchCorePlugin.PLUGIN_ID, -2,
                    "Error while initializing attribute editor: "
                        + element.getDeclaringExtension().getContributor().getName(), e));
        }

        return null;
View Full Code Here

            }
            catch (Throwable e)
            {
                if (plugin != null)
                {
                    IStatus status = new OperationStatus(IStatus.ERROR, plugin
                        .getBundle().getSymbolicName(), -1, "Resource disposal failed.",
                        e);

                    plugin.getLog().log(status);
                }
            }
        }

        resources.clear();

        for (ListenerPair p : listeners)
        {
            try
            {
                if (p.registrar instanceof IPreferenceStore)
                {
                    ((IPreferenceStore) p.registrar)
                        .removePropertyChangeListener((IPropertyChangeListener) p.listener);
                }
                else if (p.registrar instanceof IAttributeEventProvider)
                {
                    ((IAttributeEventProvider) p.registrar)
                        .removeAttributeListener((IAttributeListener) p.listener);
                }
                else if (p.registrar instanceof IPostSelectionProvider)
                {
                    ((IPostSelectionProvider) p.registrar)
                        .removePostSelectionChangedListener((ISelectionChangedListener) p.listener);
                }
                else
                {
                    throw new RuntimeException("Unhandled registrar: " + p.registrar);
                }
            }
            catch (Throwable t)
            {
                if (plugin != null)
                {
                    IStatus status = new OperationStatus(IStatus.ERROR, plugin
                        .getBundle().getSymbolicName(), -1, "Listener disposal failed.",
                        t);

                    plugin.getLog().log(status);
                }
View Full Code Here

TOP

Related Classes of org.eclipse.core.commands.operations.OperationStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.