public final class ProjectOperations extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<FileObject> |
getDataFiles(Project prj)
Return list of files that are considered source files and folders for the given project.
|
static List<FileObject> |
getMetadataFiles(Project prj)
Return list of files that are considered metadata files and folders for the given project.
|
static boolean |
isCopyOperationSupported(Project prj)
Test whether the copy operation is supported on the given project.
|
static boolean |
isDeleteOperationSupported(Project prj)
Test whether the delete operation is supported on the given project.
|
static boolean |
isMoveOperationSupported(Project prj)
Tests whether the move or rename operations are supported on the given project.
|
static void |
notifyCopied(Project original,
Project nue,
File originalPath,
String name)
Notification that the project has been copied.
|
static void |
notifyCopying(Project prj)
Notification that the project is about to be copyied.
|
static void |
notifyDeleted(Project prj)
Notification that the project has been deleted.
|
static void |
notifyDeleting(Project prj)
Notification that the project is about to be deleted.
|
static void |
notifyMoved(Project original,
Project nue,
File originalPath,
String name)
Notification that the project has been moved.
|
static void |
notifyMoving(Project prj)
Notification that the project is about to be moved.
|
public static List<FileObject> getMetadataFiles(Project prj)
is*Supported methods
return true.prj - project to testDataFilesProviderImplementation.getMetadataFiles()public static List<FileObject> getDataFiles(Project prj)
is*Supported methods
return true.prj - project to testDataFilesProviderImplementation.getDataFiles()public static boolean isDeleteOperationSupported(Project prj)
prj - project to testtrue if the project has a DeleteOperationImplementation,
false otherwisepublic static void notifyDeleting(Project prj) throws IOException
prj - project to notifyIOException - is some error occursDeleteOperationImplementation.notifyDeleting()public static void notifyDeleted(Project prj) throws IOException
prj - project to notifyIOException - is some error occursDeleteOperationImplementation.notifyDeleted()public static boolean isCopyOperationSupported(Project prj)
prj - project to testtrue if the project has a CopyOperationImplementation,
false otherwisepublic static void notifyCopying(Project prj) throws IOException
prj - project to notifyIOException - is some error occursCopyOperationImplementation.notifyCopying()public static void notifyCopied(Project original, Project nue, File originalPath, String name) throws IOException
original - original projectnue - new project (copy)originalPath - the project folder of the original project (for consistency with notifyMoved)name - new name of the projectIOException - is some error occursCopyOperationImplementation.notifyCopied(org.netbeans.api.project.Project, java.io.File, java.lang.String)public static void notifyMoving(Project prj) throws IOException
MoveOrRenameOperationImplementation.notifyRenaming() may be called instead.
The project is supposed to do all required cleanup to allow the project to be moved.prj - project to notifyIOException - is some error occursMoveOperationImplementation.notifyMoving()public static void notifyMoved(Project original, Project nue, File originalPath, String name) throws IOException
MoveOrRenameOperationImplementation.notifyRenamed(java.lang.String) may be called instead.
The project is supposed to do all necessary fixes to the project's structure to
form a valid project.
Both original and moved project are notified, in this order.original - original projectnue - moved projectoriginalPath - the project folder of the original projectname - new name of the projectIOException - is some error occursMoveOperationImplementation.notifyMoved(org.netbeans.api.project.Project, java.io.File, java.lang.String)public static boolean isMoveOperationSupported(Project prj)
prj - project to testtrue if the project has a MoveOperationImplementation,
false otherwise