Package org.eclipse.wst.xml.core.internal.contentmodel.util

Examples of org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache$Entry


    Thread.sleep(StsTestUtil.WAIT_TIME);
    cEditor.setActivePage(page.getId());
    assertNotNull("Could not load overview page.", page.getMasterPart());

    IDOMDocument document = cEditor.getDomDocument();
    CMDocumentCache cache = ModelQueryUtil.getCMDocumentCache(document);
    final String siUri = ConfigCoreUtils.getSelectedSchemaLocation(document, IntegrationSchemaConstants.URI);
    final String siJmsUri = ConfigCoreUtils.getSelectedSchemaLocation(document, IntJmsSchemaConstants.URI);
    final String siStreamUri = ConfigCoreUtils.getSelectedSchemaLocation(document, IntStreamSchemaConstants.URI);
    final CountDownLatch latch = new CountDownLatch(3);
    if (cache.getStatus(siUri) == CMDocumentCache.STATUS_LOADED) {
      latch.countDown();
    }
    if (cache.getStatus(siJmsUri) == CMDocumentCache.STATUS_LOADED) {
      latch.countDown();
    }
    if (cache.getStatus(siStreamUri) == CMDocumentCache.STATUS_LOADED) {
      latch.countDown();
    }

    cache.addListener(new CMDocumentCacheListener() {

      public void cacheUpdated(CMDocumentCache cache, String uri, int oldStatus, int newStatus,
          CMDocument cmDocument) {
        if (newStatus == CMDocumentCache.STATUS_LOADED && oldStatus != CMDocumentCache.STATUS_LOADED) {
          if (uri.equals(siUri) || uri.equals(siJmsUri) || uri.equals(siStreamUri)) {
View Full Code Here


    Thread.sleep(StsTestUtil.WAIT_TIME);
    cEditor.setActivePage(page.getId());
    assertNotNull("Could not load overview page.", page.getMasterPart());

    IDOMDocument document = cEditor.getDomDocument();
    CMDocumentCache cache = ModelQueryUtil.getCMDocumentCache(document);

    final String batchUri = ConfigCoreUtils.getSelectedSchemaLocation(document, BatchSchemaConstants.URI);
    IFile file = cEditor.getResourceFile();

    ProjectClasspathExtensibleUriResolver resolver = new ProjectClasspathExtensibleUriResolver();
    final String resolvedBatchUri = resolver.resolve(file, null, batchUri, batchUri);

    final CountDownLatch latch = new CountDownLatch(1);
    if (cache.getStatus(resolvedBatchUri) == CMDocumentCache.STATUS_LOADED) {
      latch.countDown();
    }
    cache.addListener(new CMDocumentCacheListener() {
      public void cacheUpdated(CMDocumentCache cache, String uri, int oldStatus, int newStatus,
          CMDocument cmDocument) {
        if (newStatus == CMDocumentCache.STATUS_LOADED && oldStatus != CMDocumentCache.STATUS_LOADED) {
          if (uri.equals(resolvedBatchUri)) {
            latch.countDown();
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache$Entry

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.