Examples of WaveletOperationVisitor


Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationVisitor

    final WaveletOperationContext newContext = new WaveletOperationContext(
        convertGooglewaveToGmail(op.getContext().getCreator()),
        op.getContext().getTimestamp(), op.getContext().getVersionIncrement(),
        op.getContext().getHashedVersion());
    final WaveletOperation[] result = { null };
    op.acceptVisitor(new WaveletOperationVisitor() {
        void setResult(WaveletOperation x) {
          Preconditions.checkState(result[0] == null,
              "%s: More than one result: %s, %s", op, result[0], x);
          result[0] = x;
        }
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationVisitor

  // TODO(ohler): currently unused; consider deleting
  public static Set<String> findAttachmentIds(List<WaveletOperation> history) {
    final Set<String> out = Sets.newHashSet();
    for (WaveletOperation op : history) {
      op.acceptVisitor(new WaveletOperationVisitor() {
          @Override public void visitNoOp(NoOp op) {}
          @Override public void visitVersionUpdateOp(VersionUpdateOp op) {
            throw new AssertionError("Unexpected visitVersionUpdateOp(" + op + ")");
          }
          @Override public void visitAddParticipant(AddParticipant op) {}
View Full Code Here

Examples of org.waveprotocol.wave.model.operation.wave.WaveletOperationVisitor

    return this.getClass().getSimpleName() + "(" + docConverters.size() + " entries in map)";
  }

  public WaveletOperation convertAndApply(final WaveletOperation op) {
    final WaveletOperation[] result = { null };
    op.acceptVisitor(new WaveletOperationVisitor() {
        void setResult(WaveletOperation x) {
          Preconditions.checkState(result[0] == null,
              "%s: More than one result: %s, %s", op, result[0], x);
          result[0] = 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.