Examples of IDocumentSynchronizationStrategyFactory


Examples of org.eclipse.ecf.sync.doc.IDocumentSynchronizationStrategyFactory

    assertNotNull(factories);
    assertTrue(factories.length == 2);
  }
 
  public void testGetColaSyncFactory() throws Exception {
    IDocumentSynchronizationStrategyFactory  factory = getColaSyncStrategyFactory();
    assertNotNull(factory);
    IModelSynchronizationStrategy strategy = factory.createDocumentSynchronizationStrategy(IDFactory.getDefault().createStringID("cola"), true);
    assertNotNull(strategy);
  }
View Full Code Here

Examples of org.eclipse.ecf.sync.doc.IDocumentSynchronizationStrategyFactory

public class SimulatedClientTests extends TestCase {

  private static final String COLA = "cola";

  public void testSharedDocClient() throws Exception {
    IDocumentSynchronizationStrategyFactory factory = Activator
        .getDefault().getColaSynchronizationStrategyFactory();

    assertNotNull(factory);
    ID channelId = IDFactory.getDefault().createStringID(COLA);

    String text = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
   
    SharedDocClient client1 = new SharedDocClient("client1",factory
        .createDocumentSynchronizationStrategy(channelId, true),text);
   
    SharedDocClient client2 = new SharedDocClient("client2",factory
        .createDocumentSynchronizationStrategy(channelId, false),text);
   
    client1.setOtherQueue(client2.getQueue());
    client2.setOtherQueue(client1.getQueue());
   
View Full Code Here

Examples of org.eclipse.ecf.sync.doc.IDocumentSynchronizationStrategyFactory

      serviceTracker = new ServiceTracker(context,IDocumentSynchronizationStrategyFactory.class.getName(),null);
      serviceTracker.open();
    }
    ServiceReference [] refs = serviceTracker.getServiceReferences();
    if (refs == null) return null;
    IDocumentSynchronizationStrategyFactory result = null;
    for(int i =0; i < refs.length; i++) {
      String prop = (String) refs[i].getProperty(IServiceConstants.SYNCSTRATEGY_PROVIDER_PROPETY);
      if (prop != null && prop.equals(serviceProvider)) {
        result = (IDocumentSynchronizationStrategyFactory) serviceTracker.getService(refs[i]);
      }
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.