Examples of LoggingSafeRunnable


Examples of org.rssowl.core.util.LoggingSafeRunnable

  @Override
  public boolean preShutdown() {
    final boolean res[] = new boolean[] { true };

    /* Pre-Shutdown Controller */
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        res[0] = Controller.getDefault().preUIShutdown();
      }
    });

View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

  /**
   * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#postWindowOpen()
   */
  @Override
  public void postWindowOpen() {
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {

        /* Retrieve Preferences */
        fPreferences = Owl.getPreferenceService().getGlobalScope();

View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

   * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowShellClose()
   */
  @Override
  public boolean preWindowShellClose() {
    final boolean[] res = new boolean[] { true };
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {

        /* Check if Prefs tell to move to tray */
        if (fPreferences.getBoolean(DefaultPreferences.TRAY_ON_CLOSE)) {
          fMinimizeFromClose = true;
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

      protected IStatus run(IProgressMonitor monitor) {
        fBatchInProcess.set(false);
        fForceQuickUpdate.set(false);

        /* Update all saved searches */
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            if (!Controller.getDefault().isShuttingDown())
              updateSavedSearches(true);
          }
        });
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

    return Status.OK_STATUS;
  }

  private synchronized void synchronizedSafeRunInBackground(final IProgressMonitor monitor) {
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        runInBackground(monitor);
      }
    });
  }
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

      }
    });
  }

  private synchronized void synchronizedSafeRunInUI(final IProgressMonitor monitor) {
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        runInUI(monitor);
      }
    });
  }
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

      protected IStatus run(IProgressMonitor monitor) {
        fBatchInProcess.set(false);
        fForceQuickUpdate.set(false);

        /* Update all saved searches */
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            updateSavedSearches(true);
          }
        });

View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

   */
  public void startup() {

    /* Create Relations and Import Default Feeds if required */
    if (!Owl.TESTING) {
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {

          /* First check wether this action is required */
          IPreference firstStartToken = fPrefsDAO.load(FIRST_START_TOKEN);
          if (firstStartToken != null)
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

        if (task == null)
          return Status.OK_STATUS;

        /* Perform the Operation if not yet Cancelled */
        if (!monitor.isCanceled()) {
          SafeRunner.run(new LoggingSafeRunnable() {
            public void run() throws Exception {
              IStatus status = task.run(monitor);

              /* Log anything that is an Error or Warning */
              if (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.WARNING)
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

    fShutdownHook = new Thread() {
      @Override
      public void run() {

        /* Shutdown UI */
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            Controller.getDefault().shutdown(true);
          }
        });

        /* Shutdown Core */
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            Owl.getPersistenceService().shutdown(true);
          }
        });
      }
    };
    fShutdownHook.setPriority(Thread.MAX_PRIORITY);
    Runtime.getRuntime().addShutdownHook(fShutdownHook);

    /* Activate the Core Bundle */
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        startCore();
      }
    });

    /* Propagate startup to Controller */
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        Controller.getDefault().startup();
      }
    });

    /* Propagate post-ui startup to Controller */
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        Display.getDefault().asyncExec(new Runnable() {
          public void run() {
            Controller.getDefault().postUIStartup();
          }
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.