How do I delete code from the repository?
VAJ version 2.0 and above has three repository functions called "purge", "restore" and "compact."
"Purge" marks projects, packages, classes/interfaces and methods as "garbage". If you decide to get them back, you can "restore" these marked objects. They still exist in the repository. You cannot purge versions of objects that are referenced in your workspace.
There's a trick with "purge", though.
If you purge a project, you ONLY purge the project object from the repository. It does not affect any of the packages, class/interfaces or methods referenced in that project.
If you purge a package, all versions of objects referenced in that package are purged (as long as those versions aren't used somewhere else, like in a different version of the package.)
- Add everything you want to keep to your workspace (this makes sure you don't accidentally purge something you wanted, as its in the workspace and VAJ won't let you purge it.)
- Make sure everything in your workspace is versioned
- Bring up repository explorer (Window->Repository Explorer)
- Purge versions of projects you don't want any more (purge is on the popup menu for packages and projects in the repository explorer)
- Purge versions of packages you don't want any more
- Compact the repository (Admin->Compact repository)
The compact may give you time to get that Columbian coffee directly from Columbia, so give it some time...
- Compact creates a new repository containing everthing except the items you purge.
- The old repository is still available in case you accidentally delete something you need. It's under c:IBMVJavaide epositoryivj.bak. You can repository import things from this if you need to.
- Purge/compact is a bit more involved for the Enterprise Edition of VisualAge for Java. See the VisualAge for Java Enterprise Team Support redbook at http://www.redbooks.ibm.com/abstracts/sg245245.html.