-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update deleteByClassification.groovy and notDeleteByName.groovy
- Loading branch information
1 parent
312d0d9
commit c13da04
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* notDeleteByName.groovy | ||
* | ||
* Delete all annotations whose Name DO NOT correspond to the specified one. | ||
*/ | ||
|
||
// Define what Names to NOT delete | ||
def nameToNotDelete = ["DH", "VH"] | ||
|
||
// Find objects to delete | ||
toRemove = getAnnotationObjects().findAll { !nameToNotDelete.contains(it.getName())} | ||
|
||
// remove selected objects | ||
removeObjects(toRemove, true) |