Examples of IModelChange


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

Examples of org.eclipse.ecf.sync.IModelChange

      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

Examples of org.eclipse.ecf.sync.IModelChange

    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

Examples of org.eclipse.ecf.sync.IModelChange

    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

Examples of org.eclipse.ecf.sync.IModelChange

    // 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
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.