Package com.puppetlabs.geppetto.forge

Examples of com.puppetlabs.geppetto.forge.Forge


      moduleInfos.put(vn.toString(), vn);
    }

    private VersionedName[] getModuleChoices(String toBeEdited) {

      Forge forge = getEditor().getForge();

      Map<String, VersionedName> modules = new HashMap<String, VersionedName>();
      IProject current = getCurrentProject();
      Diagnostic chain = new Diagnostic();
      ModuleName always = null;
      if(toBeEdited != null)
        try {
          always = ModuleName.fromString(toBeEdited);
        }
        catch(IllegalArgumentException e) {
          // Keep always as null since a match is impossible
        }

      for(IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {

        try {
          if(current == null || project.getName().equals(current.getName()))
            continue;

          if(!project.hasNature(XtextProjectHelper.NATURE_ID))
            continue;

          for(File moduleRoot : forge.findModuleRoots(project.getLocation().toFile(), null)) {
            Metadata metadata = forge.createFromModuleDirectory(moduleRoot, false, null, null, chain);
            addDependencyIfNotPresent(metadata, modules, always);
          }
        }
        catch(Exception e) {
          UIPlugin.getInstance().log(e);
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.forge.Forge

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.