Examples of ISafeRunnable


Examples of org.eclipse.core.runtime.ISafeRunnable

                changeId, oldValue, newValue);
    Runnable notifier = new Runnable() {
      public void run() {
        for (int i = 0; i < listeners.length; i++) {
          final IPropertyChangeListener listener = (IPropertyChangeListener) listeners[i];
          ISafeRunnable safetyWrapper = new ISafeRunnable() {

            public void run() throws Exception {
              listener.propertyChange(event);
            }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

   * @param elementAdapter
   * @since 3.3
   */
  private void removeElementAdapter(
      final IWorkingSetElementAdapter elementAdapter) {
    SafeRunner.run(new ISafeRunnable() {

      public void handleException(Throwable exception) {
        StatusManager.getManager().handle(
            StatusUtil.newStatus(PlatformUI.PLUGIN_ID, exception));
      }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

   *
   * @param updater
   * @since 3.3
   */
  private void removeUpdater(final IWorkingSetUpdater updater) {
    SafeRunner.run(new ISafeRunnable() {

      public void handleException(Throwable exception) {
        StatusManager.getManager().handle(
            StatusUtil.newStatus(PlatformUI.PLUGIN_ID, exception));
      }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

      if (isDeclarative()) {
        decorator = new DeclarativeDecorator(definingElement,
            getIconLocation());
      } else {

        Platform.run(new ISafeRunnable() {
          public void run() {
            try {
              decorator = (ILightweightLabelDecorator) WorkbenchPlugin
                  .createExtension(definingElement,
                      DecoratorDefinition.ATT_CLASS);
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

        return false;
      }
    }

    // Initialize the delegate.
    final ISafeRunnable runnable = new ISafeRunnable() {
      public final void handleException(final Throwable exception) {
        // Do nothing.
      }

      public final void run() {
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

   *
   * @param part
   *            The part to dispose; must not be <code>null</code>.
   */
  private void disposePart(final IWorkbenchPart part) {
    SafeRunner.run(new ISafeRunnable() {
      public void run() {
        if (part.getSite() instanceof MultiPageEditorSite) {
          MultiPageEditorSite partSite = (MultiPageEditorSite) part
              .getSite();
          partSite.dispose();
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    for (Iterator i = callbackRefs.iterator(); i.hasNext();) {
      final IElementReference callbackRef = (IElementReference) i.next();
      final Map parms = Collections.unmodifiableMap(callbackRef
          .getParameters());
      ISafeRunnable run = new ISafeRunnable() {
        public void handleException(Throwable exception) {
          WorkbenchPlugin.log("Failed to update callback: "  //$NON-NLS-1$
              + callbackRef.getCommandId(), exception);
        }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    // Get the additions
    final ContributionRoot ciList = new ContributionRoot(this, restriction,
        cache.getNamespace());

    ISafeRunnable run = new ISafeRunnable() {

      public void handleException(Throwable exception) {
        // TODO Auto-generated method stub

      }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

        super.initDelegate();
    final IActionDelegate actionDelegate = getDelegate();
    if (actionDelegate instanceof IObjectActionDelegate
        && activePart != null) {
      final IObjectActionDelegate objectActionDelegate = (IObjectActionDelegate) actionDelegate;
      final ISafeRunnable runnable = new ISafeRunnable() {
        public void run() throws Exception {
          objectActionDelegate.setActivePart(ObjectPluginAction.this,
              activePart);
        }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    public void setActivePart(IWorkbenchPart targetPart) {
        activePart = targetPart;
        IActionDelegate delegate = getDelegate();
        if (delegate instanceof IObjectActionDelegate && activePart != null) {
      final IObjectActionDelegate objectActionDelegate = (IObjectActionDelegate) delegate;
      final ISafeRunnable runnable = new ISafeRunnable() {
        public void run() throws Exception {
          objectActionDelegate.setActivePart(ObjectPluginAction.this,
              activePart);
        }
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.