Examples of ISafeRunnable


Examples of org.eclipse.core.runtime.ISafeRunnable

            } catch (Throwable t) {
                ProjectUIPlugin.log("Shutting down rendering - " + t, null);
            }
            getMap().getEditManagerInternal().setEditFeature(null, null);
            try {
                PlatformGIS.run(new ISafeRunnable(){

                    public void handleException( Throwable exception ) {
                        ProjectUIPlugin.log("error saving map: " + getMap().getName(), exception); //$NON-NLS-1$
                    }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    /**
     * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
     */
    @SuppressWarnings("unchecked")
    public void run( IAction action ) {
        PlatformGIS.run(new ISafeRunnable(){

            public void handleException(Throwable e) {
                ProjectUIPlugin.log("", e); //$NON-NLS-1$
            }

View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    }
  }
 
  for (int i= 0; i < listeners.size(); i++) {
    final ITypeHierarchyChangedListener listener= (ITypeHierarchyChangedListener)listeners.get(i);
    SafeRunner.run(new ISafeRunnable() {
      public void handleException(Throwable exception) {
        Util.log(exception, "Exception occurred in listener of Type hierarchy change notification"); //$NON-NLS-1$
      }
      public void run() throws Exception {
        listener.typeHierarchyChanged(TypeHierarchy.this);
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

  }

  public IStatus runInUIThread(IProgressMonitor monitor) {

    if (!commonNavigator.getCommonViewer().getControl().isDisposed()) {
      SafeRunner.run(new ISafeRunnable() {

        public void run() throws Exception {
          IWorkbenchPage page = commonNavigator.getSite()
              .getPage();
          if (page != null) {
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

  public IRegion[] calculateChangedLineRegions(final ITextFileBuffer buffer, final IDocument current,
      final IProgressMonitor monitor) throws CoreException {
    final AtomicReference<IRegion[]> result = new AtomicReference<IRegion[]>();
    final AtomicReference<IStatus> errorStatus = new AtomicReference<IStatus>(OK_STATUS);
    try {
      SafeRunner.run(new ISafeRunnable() {
        @Override public void handleException(Throwable exception) {
          logger.error(exception.getMessage(), exception);
          errorStatus.set(error(errorCalculatingChangedRegions, exception));
          result.set(null);
        }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

        IStructuredSelection sel= (IStructuredSelection) event.getSelection();
        if (sel.isEmpty())
          return;
        if (fCurrentBlock != null && fStatusMonitor.getStatus() != null && fStatusMonitor.getStatus().matches(IStatus.ERROR))
          if (isPerformRevert()) {
            ISafeRunnable runnable= new ISafeRunnable() {
              public void run() throws Exception {
                fCurrentBlock.performRevert();
              }
              public void handleException(Throwable x) {
              }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

      setEnabled(fComboGroup, enabled);
    SpellingEngineDescriptor desc= EditorsUI.getSpellingService().getActiveSpellingEngineDescriptor(fStore);
    String id= desc != null ? desc.getId() : ""; //$NON-NLS-1$
    final ISpellingPreferenceBlock preferenceBlock= (ISpellingPreferenceBlock) fProviderPreferences.get(id);
    if (preferenceBlock != null) {
      ISafeRunnable runnable= new ISafeRunnable() {
        public void run() throws Exception {
          preferenceBlock.setEnabled(enabled);
        }
        public void handleException(Throwable x) {
        }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    }

    Control control= (Control) fProviderControls.get(id);
    if (control == null) {
      final Control[] result= new Control[1];
      ISafeRunnable runnable= new ISafeRunnable() {
        public void run() throws Exception {
          result[0]= fCurrentBlock.createControl(fGroup);
        }
        public void handleException(Throwable x) {
        }
      };
      SafeRunner.run(runnable);
      control= result[0];
      if (control == null) {
        String message= TextEditorMessages.SpellingConfigurationBlock_info_no_preferences;
        EditorsPlugin.log(new Status(IStatus.WARNING, EditorsUI.PLUGIN_ID, IStatus.OK, message, null));
        control= new ErrorPreferences(message).createControl(fGroup);
      } else {
        fProviderControls.put(id, control);
      }
    }
    Dialog.applyDialogFont(control);
    fStackLayout.topControl= control;
    control.pack();
    fGroup.layout();
    fGroup.getParent().layout();

    fStatusMonitor.statusChanged(new StatusInfo());
    ISafeRunnable runnable= new ISafeRunnable() {
      public void run() throws Exception {
        fCurrentBlock.initialize(fStatusMonitor);
      }
      public void handleException(Throwable x) {
      }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

    final ISpellingPreferenceBlock block= (ISpellingPreferenceBlock) fProviderPreferences.get(id);
    if (block == null)
      return true;

    final Boolean[] result= new Boolean[] { Boolean.TRUE };
    ISafeRunnable runnable= new ISafeRunnable() {
      public void run() throws Exception {
        result[0]= Boolean.valueOf(block.canPerformOk());
      }
      public void handleException(Throwable x) {
      }
View Full Code Here

Examples of org.eclipse.core.runtime.ISafeRunnable

  }

  public void performOk() {
    for (Iterator it= fProviderPreferences.values().iterator(); it.hasNext();) {
      final ISpellingPreferenceBlock block= (ISpellingPreferenceBlock) it.next();
      ISafeRunnable runnable= new ISafeRunnable() {
        public void run() throws Exception {
          block.performOk();
        }
        public void handleException(Throwable x) {
        }
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.