[forge-issues] [JBoss JIRA] (FORGE-1540) Have Project extends MutableFaceted<ProjectFacet> instead of Faceted<ProjectFacet>

Lincoln Baxter III (JIRA) issues at jboss.org
Fri Jan 31 16:45:29 EST 2014


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

Lincoln Baxter III commented on FORGE-1540:
-------------------------------------------

I think the real solution here is to add the .uninstall() method to FacetFactory.
                
> Have Project extends MutableFaceted<ProjectFacet> instead of Faceted<ProjectFacet>
> ----------------------------------------------------------------------------------
>
>                 Key: FORGE-1540
>                 URL: https://issues.jboss.org/browse/FORGE-1540
>             Project: Forge
>          Issue Type: Enhancement
>          Components: Plugin API
>    Affects Versions: 2.0.0.Final
>            Reporter: Max Barkley
>            Priority: Minor
>
> In order to try and uninstall a facet from a project I must check if it is an instance of MutableFaceted and then cast like so:
> {code}
> if (project instanceof MutableFaceted) {
>   ((MutableFaceted<ProjectFacet>) project).uninstall(someFacet);
> }
> {code}
> But as far as I can tell, every Project implementation implements MutableFaceted, so it would be nice if Project extended MutableFaceted so that I could avoid casting.
> Alternatively, if there is a good reason for having Project implementations which are not MutableFaceted, perhaps there could be a MutableProject interface for convenience:
> {code}
> public interface MutableProject extends Project, MutableFaceted<ProjectFacet> {}
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the forge-issues mailing list