Package org.jboss.forge.addon.projects.facets

Examples of org.jboss.forge.addon.projects.facets.MetadataFacet


         }

         if (project != null)
         {
            UIContext uiContext = context.getUIContext();
            MetadataFacet metadataFacet = project.getFacet(MetadataFacet.class);
            metadataFacet.setProjectName(named.getValue());
            metadataFacet.setProjectVersion(version.getValue());
            metadataFacet.setTopLevelPackage(topLevelPackage.getValue());

            if (finalName.hasValue())
            {
               PackagingFacet packagingFacet = project.getFacet(PackagingFacet.class);
               packagingFacet.setFinalName(finalName.getValue());
View Full Code Here


  private ConnectionProfileManager manager;

  @Override
  public void initializeUI(UIBuilder builder) throws Exception {
    Project project = getSelectedProject(builder.getUIContext());
    MetadataFacet facet = project.getFacet(MetadataFacet.class);
    String topLevelPackage = facet.getTopLevelPackage();
    targetPackage.setDefaultValue(topLevelPackage);
    ArrayList<String> profileNames = new ArrayList<String>();
    profileNames.add("");
    profileNames.addAll(manager.loadConnectionProfiles().keySet());
    connectionProfile.setValueChoices(profileNames);
View Full Code Here

         }

         if (project != null)
         {
            UIContext uiContext = context.getUIContext();
            MetadataFacet metadataFacet = project.getFacet(MetadataFacet.class);
            metadataFacet.setProjectName(named.getValue());
            metadataFacet.setProjectVersion(version.getValue());
            metadataFacet.setTopLevelPackage(topLevelPackage.getValue());
            uiContext.setSelection(project.getProjectRoot());
            uiContext.setAttribute(Project.class, project);
         }
         else
            result = Results.fail("Could not create project of type: [" + value + "]");
View Full Code Here

   public void initializeUI(UIBuilder builder) throws Exception
   {
      Project project = Projects.getSelectedProject(projectFactory, builder.getUIContext());
      if (project != null)
      {
         MetadataFacet facet = project.getFacet(MetadataFacet.class);
         Coordinate c = facet.getOutputDependency().getCoordinate();
         coordinate.setDefaultValue(AddonId.from(c.getGroupId() + ":" + c.getArtifactId(), c.getVersion())
                  .toCoordinates());
      }

      coordinate.setCompleter(new UICompleter<String>()
View Full Code Here

      }
      addons.setValueChoices(choices);
      Project project = Projects.getSelectedProject(projectFactory, builder.getUIContext());
      if (project != null)
      {
         MetadataFacet facet = project.getFacet(MetadataFacet.class);
         String name = facet.getProjectGroupName() + ":" + facet.getProjectName();
         AddonId selectedAddonId = AddonId.from(name, facet.getProjectVersion());
         if (choices.contains(selectedAddonId))
         {
            addons.setDefaultValue(Collections.singleton(selectedAddonId));
         }
      }
View Full Code Here

   {
      Project project = getSelectedProject(builder.getUIContext());
      final String topLevelPackage;
      if (project != null)
      {
         MetadataFacet facet = project.getFacet(MetadataFacet.class);
         topLevelPackage = facet.getTopLevelPackage();
         groupId.setDefaultValue(topLevelPackage);
         name.setDefaultValue(facet.getProjectName());
         version.setDefaultValue(facet.getProjectVersion());
      }
      else
      {
         topLevelPackage = null;
      }
View Full Code Here

      }
      addons.setValueChoices(choices);
      Project project = getSelectedProject(builder.getUIContext());
      if (project != null)
      {
         MetadataFacet facet = project.getFacet(MetadataFacet.class);
         String name = facet.getTopLevelPackage() + ":" + facet.getProjectName();
         AddonId selectedAddonId = AddonId.from(name, facet.getProjectVersion());
         if (choices.contains(selectedAddonId))
         {
            addons.setDefaultValue(Collections.singleton(selectedAddonId));
         }
      }
View Full Code Here

   {
      Project project = Projects.getSelectedProject(projectFactory, builder.getUIContext());
      final String topLevelPackage;
      if (project != null)
      {
         MetadataFacet facet = project.getFacet(MetadataFacet.class);
         topLevelPackage = facet.getProjectGroupName();
         groupId.setDefaultValue(topLevelPackage);
         name.setDefaultValue(facet.getProjectName());
         version.setDefaultValue(facet.getProjectVersion());
      }
      else
      {
         topLevelPackage = null;
      }
View Full Code Here

         }

         if (project != null)
         {
            UIContext uiContext = context.getUIContext();
            MetadataFacet metadataFacet = project.getFacet(MetadataFacet.class);
            metadataFacet.setProjectName(named.getValue());
            metadataFacet.setProjectVersion(version.getValue());
            metadataFacet.setTopLevelPackage(topLevelPackage.getValue());

            if (finalName.hasValue())
            {
               PackagingFacet packagingFacet = project.getFacet(PackagingFacet.class);
               packagingFacet.setFinalName(finalName.getValue());
View Full Code Here

         }

         if (project != null)
         {
            UIContext uiContext = context.getUIContext();
            MetadataFacet metadataFacet = project.getFacet(MetadataFacet.class);
            metadataFacet.setProjectName(named.getValue());
            metadataFacet.setProjectVersion(version.getValue());
            metadataFacet.setTopLevelPackage(topLevelPackage.getValue());

            if (finalName.hasValue())
            {
               PackagingFacet packagingFacet = project.getFacet(PackagingFacet.class);
               packagingFacet.setFinalName(finalName.getValue());
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.projects.facets.MetadataFacet

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.