Examples of ISafeRunnable


Examples of org.eclipse.core.runtime.ISafeRunnable

    if (formatterFactory == null) {
      IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(extensionName);
      for (int i = 0; i < elements.length; i++) {
        final IConfigurationElement element = elements[i];
        if (element.getName().equals("processor")) { //$NON-NLS-1$
          SafeRunner.run(new ISafeRunnable() {
            public void run() throws Exception {
              final Object object = element.createExecutableExtension("class"); //$NON-NLS-1$
              if (object instanceof IFormatterProcessorFactory) {
                formatterFactory = (IFormatterProcessorFactory) object;
              }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

            final ViewerFilter[] result = new ViewerFilter[1];
            final String message = String
                    .format("The org.erlide.ui.erlangElementFilters plug-in extension \"%s\" specifies a viewer filter class which does not exist.",
                            getId());
            final ISafeRunnable code = new SafeRunnable(message) {
                /*
                 * @see org.eclipse.core.runtime.ISafeRunnable#run()
                 */
                @Override
                public void run() throws Exception {
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

      throw new IllegalStateException();
    }
    final Object[] listeners = this.listenerList.getListeners();
    for (final Object listener : listeners) {
      SafeRunner.run(
        new ISafeRunnable() {
          public void handleException(final Throwable exception) {
          }
         
          public void run() {
            ((IElementChangeListener) listener).elementChanged(event);
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

                    start = System.currentTimeMillis();
                }
                // wrap callbacks with Safe runnable for subsequent listeners to
                // be called
                // when some are causing grief
                SafeRunner.run(new ISafeRunnable() {

                    @Override
                    public void handleException(final Throwable exception) {
                        // CCorePlugin.log(exception, "Exception occurred in
                        // listener of C
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

            return;
        }
        final ISourceFile workingCopy = documentProvider.getWorkingCopy(editor
                .getEditorInput());
        if (workingCopy != null) {
            SafeRunner.run(new ISafeRunnable() {
                @Override
                public void run() throws CoreException {
                    workingCopy.reconcile(force, mon);
                }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

        status = Status.CANCEL_STATUS;
        try {
            final List<INavigatorDropHandler> handlers = ExtensionUtils.getExtensions(
                    EXTENSION_POINT_ID, INavigatorDropHandler.class);
            for (final INavigatorDropHandler handler : handlers) {
                final ISafeRunnable runnable = new ISafeRunnable() {

                    @Override
                    public void handleException(final Throwable exception) {
                        ErlLogger.error(exception);
                    }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

            final IConfigurationElement[] config = Platform.getExtensionRegistry()
                    .getConfigurationElementsFor(EXTENSION_POINT_ID);
            for (final IConfigurationElement e : config) {
                final Object o = e.createExecutableExtension("class");
                if (o instanceof INavigatorDropHandler) {
                    final ISafeRunnable runnable = new ISafeRunnable() {

                        @Override
                        public void handleException(final Throwable exception) {
                            ErlLogger.error("Exception in client");
                        }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    currentPage.setContainer(this);
    // Ensure that the page control has been created
    // (this allows lazy page control creation)
    if (currentPage.getControl() == null) {
      final boolean[] failed = { false };
      SafeRunnable.run(new ISafeRunnable() {
        public void handleException(Throwable e) {
          failed[0] = true;
        }

        public void run() {
          createPageControl(currentPage, pageContainer);
        }
      });
      if (failed[0]) {
        return false;
      }
      // the page is responsible for ensuring the created control is
      // accessable
      // via getControl.
      Assert.isNotNull(currentPage.getControl());
    }
    // Force calculation of the page's description label because
    // label can be wrapped.
    final Point[] size = new Point[1];
    final Point failed = new Point(-1, -1);
    SafeRunnable.run(new ISafeRunnable() {
      public void handleException(Throwable e) {
        size[0] = failed;
      }

      public void run() {
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    protected void activate() {
        if( active )
            return;
       
        PlatformGIS.run(new ISafeRunnable(){

            public void handleException( Throwable exception ) {
                SelectPlugin.log("error activating table", exception); //$NON-NLS-1$
            }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

        if( selectedLayer==null && layer == null ){
            map.getEditManager().addListener(editManagerListener);
            return;
        }
       
        PlatformGIS.run(new ISafeRunnable(){

            public void handleException( Throwable exception ) {
                SelectPlugin.log("error selecting layer", exception); //$NON-NLS-1$
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.