Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.IMark


          return false;
      }

      /* Dragged Mark */
      else if (draggedObject instanceof IMark) {
        IMark draggedMark = (IMark) draggedObject;
        if (!isValidDrop(draggedMark, dropTarget))
          return false;
      }
    }

View Full Code Here


      }
    }

    /* Do not allow Re-Ordering over IMarks (when sorting or grouping) */
    if ((fExplorer.isSortByNameEnabled() || fExplorer.isGroupingEnabled()) && dropTarget instanceof IMark) {
      IMark target = (IMark) dropTarget;
      if (target.getParent().getChildren().contains(dragSource))
        return false;
    }

    /* Do not allow dropping in Child of Drag-Folder */
    if (ModelUtils.hasChildRelation(dragSource, dropTarget))
View Full Code Here

      return false;

    /* Do not allow Re-Ordering of Entities if sort by name */
    if (fExplorer.isSortByNameEnabled()) {
      if (dropTarget instanceof IMark) {
        IMark target = (IMark) dropTarget;
        if (target.getParent().getChildren().contains(dragSource))
          return false;
      }
    }

    /* Do not allow Re-Ordering over IFolder (when sorting or grouping) */
    if ((fExplorer.isSortByNameEnabled() || fExplorer.isGroupingEnabled()) && dropTarget instanceof IFolder && (loc == LOCATION_AFTER || loc == LOCATION_BEFORE)) {
      IFolder target = (IFolder) dropTarget;
      if (target.getParent().getChildren().contains(dragSource))
        return false;
    }

    return true;
  }
View Full Code Here

              parent = ((IMark) dropTarget).getParent();
            else
              parent = null;

            /* Determine Position */
            final IMark position = (IMark) ((dropTarget instanceof IMark) ? dropTarget : null);

            /* Open Dialog to add new BookMark (asyncly!) */
            JobRunner.runInUIThread(getViewer().getControl(), new Runnable() {
              public void run() {
                new NewBookMarkAction(getViewer().getControl().getShell(), parent, position, urls.get(0)).run(null);
View Full Code Here

        parentFolder = dropFolder.getParent();
    }

    /* Target is a Mark */
    else if (dropTarget instanceof IMark) {
      IMark dropMark = (IMark) dropTarget;
      parentFolder = dropMark.getParent();
    }

    /* Require a Parent-Folder */
    if (parentFolder == null)
      return;
View Full Code Here

        to.addFolder(folder, null, null);
      }

      /* Reparent Mark */
      else if (child instanceof IMark) {
        IMark mark = (IMark) child;
        mark.setParent(to);
        to.addMark(mark, null, null);
      }
    }
  }
View Full Code Here

        return folder.getParent();
      }

      /* Parent Folder of Mark */
      else if (element instanceof IMark) {
        IMark mark = (IMark) element;
        return mark.getParent();
      }
    }

    return null;
  }
View Full Code Here

          Set<Entry<IMark, IFolder>> entries = reparentedMarks.entrySet();
          Set<IFolder> parentsToUpdate = new HashSet<IFolder>();
          try {
            fViewer.getControl().getParent().setRedraw(false);
            for (Entry<IMark, IFolder> entry : entries) {
              IMark reparentedMark = entry.getKey();
              IFolder oldParent = entry.getValue();

              /* Reparent while keeping the Selection */
              ISelection selection = fViewer.getSelection();
              fViewer.remove(oldParent, new Object[] { reparentedMark });
              fViewer.refresh(reparentedMark.getParent(), false);
              fViewer.setSelection(selection);

              /* Remember to update parents */
              parentsToUpdate.add(oldParent);
              parentsToUpdate.add(reparentedMark.getParent());
            }
          } finally {
            fViewer.getControl().getParent().setRedraw(true);
          }

View Full Code Here

      return hasChildRelation(parent, folder.getParent());
    }

    else if (entityToCheck instanceof IMark) {
      IMark mark = (IMark) entityToCheck;
      if (mark.getParent().equals(parent))
        return true;

      return hasChildRelation(parent, mark.getParent());
    }

    return false;
  }
View Full Code Here

  private void onNewsMarksUpdated(final Set<? extends MarkEvent> events) {
    JobRunner.runInUIThread(fParent, new Runnable() {
      public void run() {
        final IEditorPart activeFeedView = fEditorSite.getPage().getActiveEditor();
        for (MarkEvent event : events) {
          final IMark mark = event.getEntity();
          if (mark.getId().equals(fInput.getMark().getId())) {
            setPartName(mark.getName());
            if (activeFeedView == FeedView.this)
              OwlUI.updateWindowTitle(new IMark[] { fInput.getMark() });

            break;
          }
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.IMark

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.