Package org.rssowl.core.util

Examples of org.rssowl.core.util.LoggingSafeRunnable


      fLock.writeLock().unlock();
    }
  }

  public void dropDatabase() throws PersistenceException {
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        shutdown();
        if (!new File(getDBFilePath()).delete()) {
          Activator.getDefault().logError("Failed to delete db file", null); //$NON-NLS-1$
        }
View Full Code Here


    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

      }
    });
  }

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

   */
  public void dragStart(final DragSourceEvent event) {

    /* Set normalized selection into Transfer if not in grouping mode */
    if (!fExplorer.isGroupingEnabled()) {
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          LocalSelectionTransfer.getTransfer().setSelection(getNormalizedSelection());
          LocalSelectionTransfer.getTransfer().setSelectionSetTime(event.time & 0xFFFFFFFFL);
          event.doit = true;
        }
View Full Code Here

  /*
   * @see org.eclipse.swt.dnd.DragSourceListener#dragSetData(org.eclipse.swt.dnd.DragSourceEvent)
   */
  public void dragSetData(final DragSourceEvent event) {
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {

        /* Set Selection using LocalSelectionTransfer */
        if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType))
          event.data = LocalSelectionTransfer.getTransfer().getSelection();
View Full Code Here

  /*
   * @see org.eclipse.swt.dnd.DragSourceListener#dragFinished(org.eclipse.swt.dnd.DragSourceEvent)
   */
  public void dragFinished(DragSourceEvent event) {
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        LocalSelectionTransfer.getTransfer().setSelection(null);
        LocalSelectionTransfer.getTransfer().setSelectionSetTime(0);
      }
    });
View Full Code Here

      return false;

    /* Selection Transfer */
    if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
      final boolean[] result = new boolean[] { false };
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
          if (selection instanceof IStructuredSelection) {
            List<?> draggedObjects = ((IStructuredSelection) selection).toList();
            result[0] = isValidDrop((IEntity) target, draggedObjects);
View Full Code Here

  @Override
  public boolean performDrop(final Object data) {

    /* Selection-Transfer */
    if (data instanceof IStructuredSelection) {
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          IStructuredSelection selection = (IStructuredSelection) data;
          List<?> draggedObjects = selection.toList();

          if (getCurrentTarget() instanceof INewsBin && !containsFolderChilds(draggedObjects))
            perfromNewsDrop(draggedObjects);
          else
            perfromFolderChildDrop(draggedObjects);
        }
      });

      return true;
    }

    /* Text-Transfer (check for URLs) */
    else if (data instanceof String) {
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          final List<String> urls = RegExUtils.extractLinksFromText((String) data, false);
          if (urls.size() > 0) {

            /* Determine parent folder */
 
View Full Code Here

      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

    Transfer[] transfers = new Transfer[] { LocalSelectionTransfer.getTransfer(), TextTransfer.getInstance(), URLTransfer.getInstance() };

    /* Drag Support */
    fViewer.addDragSupport(ops, transfers, new DragSourceListener() {
      public void dragStart(final DragSourceEvent event) {
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            LocalSelectionTransfer.getTransfer().setSelection(fViewer.getSelection());
            LocalSelectionTransfer.getTransfer().setSelectionSetTime(event.time & 0xFFFFFFFFL);
            event.doit = true;
          }
        });
      }

      public void dragSetData(final DragSourceEvent event) {
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {

            /* Set Selection using LocalSelectionTransfer */
            if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType))
              event.data = LocalSelectionTransfer.getTransfer().getSelection();

            /* Set Text using Text- or URLTransfer */
            else if (TextTransfer.getInstance().isSupportedType(event.dataType) || URLTransfer.getInstance().isSupportedType(event.dataType))
              setTextData(event);
          }
        });
      }

      public void dragFinished(DragSourceEvent event) {
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            LocalSelectionTransfer.getTransfer().setSelection(null);
            LocalSelectionTransfer.getTransfer().setSelectionSetTime(0);
          }
        });
View Full Code Here

TOP

Related Classes of org.rssowl.core.util.LoggingSafeRunnable

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.