Re: Java Project API/SPI

Pavel Buzek <[email protected]> Wed, 23 Jul 2003 17:33:56 +0200
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Message-ID <[email protected]>
this is not a blocker but I think it would improve the API (BTW: this is 
not my idea, I just like it):

Would not it also make sense to rename JavaProject to JavaNature? IMO 
this name would make more sense. Now you have multiple *Project classes 
for one project (Project, IdeProject, JavaProject, WebProject, etc.) 
while all except 'Project' actually represent the installed natures.

-pavel

Jan Pokorsky wrote:
> Java Project API refinements:
> 
> In order to make the api classes less overcrowded with methods and to 
> prevent future compatibility issues I would propose to split following 
> classes to API and SPI part:
> 
> 1. ProjectPath:
> http://www.netbeans.org/download/prj40_prototype/javadoc/JavaProjectAPI/org/netbeans/api/java/project/ProjectPath.html 
> 
> 
>   API: the class should be final. Just static methods would remain.
>   SPI: introduce
> public abstract class AbstractProjectPath {
>   public abstract PathResource handleCreateResource(FileObject filebase)
>        throws IOException;
>   public abstract ClassPath getPath(ProjectMember object, Object type);
> }
> 
> where handleCreateResource() is moved from api.ProjectPath and 
> spi.AbstractProjectPath.getPath() replaces 
> api.ProjectPath.findPath(ProjectMember, Object)
> 
> 2. JavaProject:
> http://www.netbeans.org/download/prj40_prototype/javadoc/JavaProjectAPI/org/netbeans/api/java/project/JavaProject.html 
> 
> 
>   API: the class should be final. Remove needless support methods like 
> fireXXX, listenerAttached.
>   SPI: introduce public abstract class BasicJavaProject containing all 
> support methods and those neccessary for proper functionality of the 
> api.JavaProject.
> 
> 
> Comments and objections are welcome.
> 
> Jan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>