Examples of XMLCatalogIdResolver


Examples of org.eclipse.wst.xml.core.internal.modelquery.XMLCatalogIdResolver

         * deprecated SSE URIResolver and required by the Common URI
         * Resolver.
         */
        URIResolver idResolver = null;
        if (resolver != null) {
          idResolver = new XMLCatalogIdResolver(resolver.getFileBaseLocation(), resolver);
        }
        else {
          /*
           * 203649 - this block may be necessary due to ordering of
           * setting the resolver into the model
           */
          String baseLocation = null;
          String modelsBaseLocation = model.getBaseLocation();
          if (modelsBaseLocation != null) {
            File file = new Path(modelsBaseLocation).toFile();
            if (file.exists()) {
              baseLocation = file.getAbsolutePath();
            }
            else {
              IPath basePath = new Path(model.getBaseLocation());
              IResource derivedResource = null;
              if (basePath.segmentCount() > 1)
                derivedResource = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
              else
                derivedResource = ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0));
              IPath derivedPath = derivedResource.getLocation();
              if (derivedPath != null) {
                baseLocation = derivedPath.toString();
              }
              else {
                URI uri = derivedResource.getLocationURI();
                if (uri != null) {
                  baseLocation = uri.toString();
                }
              }
            }
            if(baseLocation == null) {
              baseLocation = modelsBaseLocation;
            }
          }
          idResolver = new XMLCatalogIdResolver(baseLocation, null);
        }
        CMDocumentCache documentCache = new CMDocumentCache();
        ModelQuery modelQuery = new HTMLModelQueryImpl(documentCache, idResolver);
        modelQuery.setEditMode(ModelQuery.EDIT_MODE_UNCONSTRAINED);
        modelQueryAdapter = new ModelQueryAdapterImpl(documentCache, modelQuery, idResolver);
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.modelquery.XMLCatalogIdResolver

        }
      }
      else {
        baseLocation = model.getBaseLocation();
      }
      modelQueryAdapter.setIdResolver(new XMLCatalogIdResolver(baseLocation, model.getResolver()));
    }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.modelquery.XMLCatalogIdResolver

         * deprecated SSE URIResolver and required by the Common URI
         * Resolver.
         */
        URIResolver idResolver = null;
        if (resolver != null) {
          idResolver = new XMLCatalogIdResolver(resolver.getFileBaseLocation(), resolver);
        }
        else {
          /*
           * 203649 - this block may be necessary due to ordering of
           * setting the resolver into the model
           */
          String baseLocation = null;
          String modelsBaseLocation = model.getBaseLocation();
          if (modelsBaseLocation != null) {
            File file = new Path(modelsBaseLocation).toFile();
            if (file.exists()) {
              baseLocation = file.getAbsolutePath();
            }
            else {
              IPath basePath = new Path(model.getBaseLocation());
              IResource derivedResource = null;
              if (basePath.segmentCount() > 1)
                derivedResource = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
              else
                derivedResource = ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0));
              IPath derivedPath = derivedResource.getLocation();
              if (derivedPath != null) {
                baseLocation = derivedPath.toString();
              }
              else {
                URI uri = derivedResource.getLocationURI();
                if (uri != null) {
                  baseLocation = uri.toString();
                }
              }
            }
            if(baseLocation == null) {
              baseLocation = modelsBaseLocation;
            }
          }
          idResolver = new XMLCatalogIdResolver(baseLocation, null);
        }

        ModelQuery modelQuery = createModelQuery(model, idResolver);
        modelQuery.setEditMode(ModelQuery.EDIT_MODE_UNCONSTRAINED);
        modelQueryAdapterImpl = new JSPModelQueryAdapterImpl(new CMDocumentCache(), modelQuery, idResolver);
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.modelquery.XMLCatalogIdResolver

      }
    }
    else {
      baseLocation = model.getBaseLocation();
    }
    modelQueryAdapterImpl.setIdResolver(new XMLCatalogIdResolver(baseLocation, model.getResolver()));
  }
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.