Examples of PPImportedNamesAdapter


Examples of com.puppetlabs.geppetto.pp.dsl.adapters.PPImportedNamesAdapter

    ppFinder.configure(model);
    resource = model.eResource();
    searchPath = searchPathProvider.get(resource);

    // clear names remembered in the past
    PPImportedNamesAdapter importedNames = PPImportedNamesAdapterFactory.eINSTANCE.adapt(resource);
    importedNames.clear();

    IResourceDescriptions descriptionIndex = indexProvider.getResourceDescriptions(resource);
    IResourceDescription descr = descriptionIndex.getResourceDescription(resource.getURI());

    if(descr == null) {
View Full Code Here

Examples of com.puppetlabs.geppetto.pp.dsl.adapters.PPImportedNamesAdapter

   * @see org.eclipse.xtext.resource.impl.DefaultResourceDescription#getImportedNames()
   */
  @Override
  public Iterable<QualifiedName> getImportedNames() {
    Iterable<QualifiedName> superResult = super.getImportedNames();
    PPImportedNamesAdapter adapter = PPImportedNamesAdapterFactory.eINSTANCE.adapt(getResource());
    if(adapter != null) {
      Collection<QualifiedName> imported = adapter.getNames();
      if(imported.isEmpty())
        return superResult;
      return Iterables.concat(superResult, ImmutableSet.copyOf(imported));
    }
    return superResult;
View Full Code Here

Examples of com.puppetlabs.geppetto.pp.dsl.adapters.PPImportedNamesAdapter

      File importingModuleDir = getContainerHandle(r.getURI(), descriptionIndex, validationContainerManager);
      if(importingModuleDir == null)
        continue;

      // get the imports recorded during linking
      PPImportedNamesAdapter importedAdapter = PPImportedNamesAdapterFactory.eINSTANCE.adapt(r);
      for(IEObjectDescription desc : importedAdapter.getResolvedDescriptions()) {
        // get the container (e.g. a module) of the the desc
        File moduleDir = getContainerHandle(desc.getEObjectURI(), descriptionIndex, validationContainerManager);
        if(moduleDir == null)
          continue;
        ModuleExport me = exports.get(desc);
        if(me == null)
          me = searchMissing(importingModuleDir, moduleDir, exports, desc);
        result.addImport(importingModuleDir, moduleDir, me);
      }
      // get the ambiguities recording during linking
      for(IEObjectDescription desc : importedAdapter.getAmbiguousDescriptions()) {
        // get the container (e.g. a module) of the the desc
        File moduleDir = getContainerHandle(desc.getEObjectURI(), descriptionIndex, validationContainerManager);
        if(moduleDir == null)
          continue;
        ModuleExport me = exports.get(desc);
        if(me == null)
          me = searchMissing(importingModuleDir, moduleDir, exports, desc);
        result.addAmbiguity(importingModuleDir, moduleDir, me);
      }
      // TODO: RECORD BOTH NAME FILE, AND LOCATIONS FOR THAT NAME
      result.addUnresolved(importingModuleDir, r.getURI(), importedAdapter.getUnresolved(), fQualifiedToString);
      // result.addAllUnresolvedNames(
      // importingModuleDir,
      // Iterables.transform(importedAdapter.getUnresolvedNames(), new
      // Function<QualifiedName, String>() {
      //
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.