Class ProjectOperations
java.lang.Object
org.netbeans.spi.project.support.ProjectOperations
Allows gathering information for various project operations.
- Since:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptionstatic List
<org.openide.filesystems.FileObject> getDataFiles
(Project prj) Return list of files that are considered source files and folders for the given project.static List
<org.openide.filesystems.FileObject> getMetadataFiles
(Project prj) Return list of files that are considered metadata files and folders for the given project.static boolean
Test whether the copy operation is supported on the given project.static boolean
Test whether the delete operation is supported on the given project.static boolean
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.
-
Method Details
-
getMetadataFiles
Return list of files that are considered metadata files and folders for the given project. Returns meaningful values only if some of theis*Supported
methods returntrue
.- Parameters:
prj
- project to test- Returns:
- list of metadata files/folders
- See Also:
-
getDataFiles
Return list of files that are considered source files and folders for the given project. Returns meaningful values only if some of theis*Supported
methods returntrue
.- Parameters:
prj
- project to test- Returns:
- list of data files/folders
- See Also:
-
isDeleteOperationSupported
Test whether the delete operation is supported on the given project.- Parameters:
prj
- project to test- Returns:
true
if the project has aDeleteOperationImplementation
,false
otherwise
-
notifyDeleting
Notification that the project is about to be deleted. Should be called immediately before the project is deleted. The project is supposed to do all required cleanup to allow the project to be deleted.- Parameters:
prj
- project to notify- Throws:
IOException
- is some error occurs- See Also:
-
notifyDeleted
Notification that the project has been deleted. Should be called immediately after the project is deleted.- Parameters:
prj
- project to notify- Throws:
IOException
- is some error occurs- See Also:
-
isCopyOperationSupported
Test whether the copy operation is supported on the given project.- Parameters:
prj
- project to test- Returns:
true
if the project has aCopyOperationImplementation
,false
otherwise
-
notifyCopying
Notification that the project is about to be copyied. Should be called immediatelly before the project is copied. The project is supposed to do all required cleanup to allow the project to be copied.- Parameters:
prj
- project to notify- Throws:
IOException
- is some error occurs- See Also:
-
notifyCopied
public static void notifyCopied(Project original, Project nue, File originalPath, String name) throws IOException Notification that the project has been copied. Should be called immediatelly after the project is copied. The project is supposed to do all necessary fixes to the project's structure to form a valid project. Both original and newly created project (copy) are notified, in this order.- Parameters:
original
- original projectnue
- new project (copy)originalPath
- the project folder of the original project (for consistency with notifyMoved)name
- new name of the project- Throws:
IOException
- is some error occurs- See Also:
-
notifyMoving
Notification that the project is about to be moved. Should be called immediately before the project is moved.MoveOrRenameOperationImplementation.notifyRenaming()
may be called instead. The project is supposed to do all required cleanup to allow the project to be moved.- Parameters:
prj
- project to notify- Throws:
IOException
- is some error occurs- See Also:
-
notifyMoved
public static void notifyMoved(Project original, Project nue, File originalPath, String name) throws IOException Notification that the project has been moved. Should be called immediatelly after the project is moved.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.- Parameters:
original
- original projectnue
- moved projectoriginalPath
- the project folder of the original projectname
- new name of the project- Throws:
IOException
- is some error occurs- See Also:
-
isMoveOperationSupported
Tests whether the move or rename operations are supported on the given project.- Parameters:
prj
- project to test- Returns:
true
if the project has aMoveOperationImplementation
,false
otherwise
-