Hi greg:

   we can't completely delete the else block. For the build type is maven,
just we need to keep CoreUtil.getProject( projectName ).exists().  Is it ok?

    private boolean checkExistProject( String projectName,
NewLiferayPluginProjectOp op )
    {
        if ( "ant".equals( op.getProjectProvider().content().getShortName()
))
        {
            return CoreUtil.getProject( projectName + "-" +
op.getPluginType().content().toString() ).exists();
        }
        return CoreUtil.getProject( projectName ).exists();
    }


On Mon, Jan 27, 2014 at 5:03 PM, Gregory Amerson
<notifications@github.com>wrote:

> In
> tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/model/internal/ProjectNameValidationService.java:
>
> > @@ -114,6 +115,19 @@ else if( isMavenProject( op ) && ! isValidMavenProjectName( currentProjectName )
> >          return retval;
> >      }
> >
> > +    private boolean checkExistProject( String projectName, NewLiferayPluginProjectOp op )
> > +    {
> > +        if ( "ant".equals( op.getProjectProvider().content().getShortName() ))
> > +        {
> > +            return CoreUtil.getProject( projectName + "-" + op.getPluginType().content().toString() ).exists();
> > +        }
> > +        else
> > +        {
> > +            return CoreUtil.getProject( projectName ).exists();
>
> Maven project should be covered. What happens with you delete the else {}
> block and try to enter a maven project that has a duplicate?
> … <#143d2f0819849500_>
> On Mon, Jan 27, 2014 at 4:31 PM, simon.jiang <notifications@github.com>wrote:
> In
> tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/model/internal/ProjectNameValidationService.java:
> > @@ -114,6 +115,19 @@ else if( isMavenProject( op ) && !
> isValidMavenProjectName( currentProjectName ) > return retval; > } > > +
> private boolean checkExistProject( String projectName,
> NewLiferayPluginProjectOp op ) > + { > + if ( "ant".equals(
> op.getProjectProvider().content().getShortName() )) > + { > + return
> CoreUtil.getProject( projectName + "-" +
> op.getPluginType().content().toString() ).exists(); > + } > + else > + { >
> + return CoreUtil.getProject( projectName ).exists(); I think we need to
> keep these codes because we also need to check maven project. if (
> "ant".equals( op.getProjectProvider().content().getShortName() )) { return
> CoreUtil.getProject( projectName + "-" +
> op.getPluginType().content().toString() ).exists(); } return
> CoreUtil.getProject( projectName ).exists(); — Reply to this email directly
> or view it on GitHub<
> https://github.com/gamerson/liferay-ide/pull/424/files#r9181946> .
>  -- Greg Amerson Liferay Developer Tools Liferay, Inc. www.liferay.com
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/gamerson/liferay-ide/pull/424/files#r9182526>
> .
>