[forge-issues] [JBoss JIRA] (FORGE-1897) Show the file extension of a project type when creating a new project

Daniel Cunha (soro) (JIRA) issues at jboss.org
Sat Feb 28 09:34:49 EST 2015


    [ https://issues.jboss.org/browse/FORGE-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045026#comment-13045026 ] 

Daniel Cunha (soro) commented on FORGE-1897:
--------------------------------------------

[~gastaldi],

http://img.ctrlv.in/img/15/02/28/54f1d0e53b6f6.png

What I did?
I added the getExtension in ProjectType interface.
So, in AbstractProjectType I set the default value for null:
 @Override
   public String getExtension()
   {
      return null;
   }

In each implementation, I need set this method. So..
I need to change my convert:
type.setItemLabelConverter(new Converter<ProjectType, String>()
      {
         @Override
         public String convert(ProjectType source)
         {
            if (source == null)
            {
               return null;
            }

            if (source.getExtension() == null)
            {
               return source.getType();
            }

            return source.getType().concat(" (").concat(source.getExtension()).concat(")");
         }
      });

That seem good?

> Show the file extension of a project type when creating a new project
> ---------------------------------------------------------------------
>
>                 Key: FORGE-1897
>                 URL: https://issues.jboss.org/browse/FORGE-1897
>             Project: Forge
>          Issue Type: Enhancement
>          Components: Projects
>    Affects Versions: 2.6.0.Final
>            Reporter: George Gastaldi
>            Assignee: Daniel Cunha (soro)
>             Fix For: 2.x Future
>
>
> When {{Project:New}} wizard is run, it would be nice to show next to each Project Type entry the file extension that is targeted to (WAR. POM, JAR, etc..).



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the forge-issues mailing list