|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Create in-memory projects from disk directories. Instances should be registered into default lookup.
Method Summary | |
boolean |
isProject(FileObject projectDirectory)
Test whether a given directory probably refers to a project recognized by this factory without actually trying to create it. |
Project |
loadProject(FileObject projectDirectory,
ProjectState state)
Create a project that resides on disk. |
void |
saveProject(Project project)
Save a project to disk. |
Method Detail |
public boolean isProject(FileObject projectDirectory)
Should be as fast as possible as it might be called sequentially on a lot of directories.
Need not be definite; it is permitted to return null or throw an exception
from loadProject(org.openide.filesystems.FileObject, org.netbeans.spi.project.ProjectState)
even when returning true
from this
method, in case the directory looked like a project directory but in fact
had something wrong with it.
Will be called inside read access.
projectDirectory
- a directory which might refer to a project
public Project loadProject(FileObject projectDirectory, ProjectState state) throws IOException
Will be called inside read access.
Do not do your own caching! The project manager caches projects for you, properly.
Do not attempt to recognize subdirectories of your project directory (just return null), unless they are distinct nested projects.
projectDirectory
- some directory on diskstate
- a callback permitting the project to indicate when it is modified
IOException
public void saveProject(Project project) throws IOException, ClassCastException
Will be called inside write access.
project
- a project created with this factory's loadProject(org.openide.filesystems.FileObject, org.netbeans.spi.project.ProjectState)
method
IOException
- if there is a problem saving
ClassCastException
- if this factory did not create this project
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |