Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.ISafeRunnable


      IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(
          IResourceActivation.IRESOURCEACTIVATOR_ID );
      for( IConfigurationElement e : config ) {
        final Object o = e.createExecutableExtension( "class" );
        if( o instanceof IResourceActivation ) {
          ISafeRunnable runnable = new ISafeRunnable()
          {
            public void handleException( Throwable exception )
            {
              exception.printStackTrace();
            }
View Full Code Here


     
      for (IConfigurationElement e : config)
      {
        final Object o = e.createExecutableExtension("class");
        if (o instanceof IDesignerListener) {
          ISafeRunnable runnable = new ISafeRunnable() {
            public void handleException(Throwable exception) {
              exception.printStackTrace();
            }

            public void run() throws Exception {
View Full Code Here

        IConfigurationElement[] config =
                Platform.getExtensionRegistry().getConfigurationElementsFor(STRATEGY_EXTENSION_ID);
        for (IConfigurationElement configElement : config) {
            final Object obj = configElement.createExecutableExtension("strategy_class");
            if (obj instanceof IMetricCalculationStrategy) {
                ISafeRunnable runnable = new ISafeRunnable() {

                    public void handleException(Throwable exception) {
                    // TODO exception handling
                    }
View Full Code Here

                currentContribution.contributeMenuAction(ad, menu, true);
                // Update action for the current selection and part.
                if (ad.getAction() instanceof ObjectPluginAction) {
                    final ObjectPluginAction action = (ObjectPluginAction) ad
                            .getAction();
                    ISafeRunnable runnable = new ISafeRunnable() {
            public void handleException(Throwable exception) {
              WorkbenchPlugin.log("Failed to update action "  //$NON-NLS-1$
                  + action.getId(), exception);
            }
View Full Code Here

  private void fireServiceChange(final String property,
      final Object oldValue, final Object newValue) {
    Object[] listeners = serviceListeners.getListeners();
    for (int i = 0; i < listeners.length; i++) {
      final IPropertyChangeListener listener = (IPropertyChangeListener) listeners[i];
      SafeRunner.run(new ISafeRunnable() {
        public void handleException(Throwable exception) {
          WorkbenchPlugin.log(exception);
        }

        public void run() throws Exception {
View Full Code Here

//        System.out.println( "View Checking extension: " + o.toString() );
       
        if (o instanceof IRegistryClientView) {

          // define a runnable here...
          ISafeRunnable runnable = new ISafeRunnable() {
            public void handleException(Throwable exception) {
              exception.printStackTrace();
            }

            public void run() throws Exception {
View Full Code Here

        final Object o = e.createExecutableExtension("class");

        if (o instanceof IRegistryClient) {

          ISafeRunnable runnable = new ISafeRunnable() {
            public void handleException(Throwable exception) {
              exception.printStackTrace();
            }

            public void run() throws Exception {
View Full Code Here

        final Object o = e.createExecutableExtension("class");

        if (o instanceof IRegistryClientView) {

          // define a runnable here...
          ISafeRunnable runnable = new ISafeRunnable() {
            public void handleException(Throwable exception) {
              exception.printStackTrace();
            }

            public void run() throws Exception {
View Full Code Here

   */
  private void notifyListeners(final OperationHistoryEvent event) {
    if (event.getOperation() instanceof IAdvancedUndoableOperation) {
      final IAdvancedUndoableOperation advancedOp = (IAdvancedUndoableOperation) event
          .getOperation();
      SafeRunner.run(new ISafeRunnable() {
        public void handleException(Throwable exception) {
          if (DEBUG_OPERATION_HISTORY_UNEXPECTED) {
            Tracing
                .printTrace(
                    "OPERATIONHISTORY", //$NON-NLS-1$
                    "Exception during notification callback " + exception); //$NON-NLS-1$
          }
        }

        public void run() throws Exception {
          advancedOp.aboutToNotify(event);
        }
      });
    }
    final Object[] listenerArray = listeners.getListeners();
    for (int i = 0; i < listenerArray.length; i++) {
      final IOperationHistoryListener listener = (IOperationHistoryListener) listenerArray[i];
      SafeRunner.run(new ISafeRunnable() {
        public void handleException(Throwable exception) {
          if (DEBUG_OPERATION_HISTORY_UNEXPECTED) {
            Tracing
                .printTrace(
                    "OPERATIONHISTORY", //$NON-NLS-1$
View Full Code Here

    }

    final Object[] listeners = getListeners();
    for (int i = 0; i < listeners.length; i++) {
      final ICommandListener listener = (ICommandListener) listeners[i];
      SafeRunner.run(new ISafeRunnable() {
        public void handleException(Throwable exception) {
        }

        public void run() throws Exception {
          listener.commandChanged(commandEvent);
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.ISafeRunnable

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.