Package org.eclipse.ecf.sync

Examples of org.eclipse.ecf.sync.IModelChange


  private void processRemoteMessage(byte[] msg) {
    if (msg != null) {
      try {
        synchronized (this.getClass()) {
          IModelChange change = syncStrategy.deserializeRemoteChange(msg);
          System.out.println(name + ";received="+change);
          IDocumentChange[] documentChanges = (IDocumentChange[]) syncStrategy
              .transformRemoteChange(change);
          for (int i = 0; i < documentChanges.length; i++) {
            applyChangeToLocalDocument(false, documentChanges[i]);
View Full Code Here


      String text = fDocument.get();
      String newText = ">";
      text = text.concat(newText);

      fDocument.set(text);
      IModelChange change = new DocumentChangeMessage(i + 150, newText.length(),  newText);

      IModelChangeMessage[] changes = initiator.registerLocalChange(change);

      getReceiverQueue().put(changes);
     
View Full Code Here

    sendMessage(receiverID, bytes);
  }

  void sendResourceChangeMessage(IResource resource, int kind) {
    try {
      IModelChange change = ResourceChangeMessage.createResourceChange(
          resource, kind);
      IModelChangeMessage[] messages = ResourcesSynchronizationStrategy
          .getInstance().registerLocalChange(change);
      for (int i = 0; i < messages.length; i++) {
        send(messages[i].serialize());
View Full Code Here

    sharedProjects.remove(msg.getProjectName());
    detachListener();
  }

  private void handleResourceChangeMessage(byte[] data) throws Exception {
    IModelChange remoteChange = ResourcesSynchronizationStrategy
        .getInstance().deserializeRemoteChange(data);
    final IModelChange[] remoteChanges = ResourcesSynchronizationStrategy
        .getInstance().transformRemoteChange(remoteChange);

    // create a scheduling rule to lock the projects
View Full Code Here

    // we are only interested in non-derived resources
    if (!resource.isDerived() && checkDelta(delta)) {
      for (Iterator it = channels.values().iterator(); it.hasNext();) {
        ResourcesShare share = (ResourcesShare) it.next();
        if (share.isSharing(projectName)) {
          IModelChange change = ResourceChangeMessage
              .createResourceChange(resource, delta.getKind());
          if (change != null) {
            List changes = (List) resourceChanges.get(share);
            if (changes == null) {
              changes = new ArrayList();
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.sync.IModelChange

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.