/** * When the IProject is closing, perform any cleanup that needs to be done. When this method is * called, if the helper has cached any resources from the IProject, it should release those * resources. If you do not allocate resources in your helper, then this method should be a * no-op. */ public void closing() { closing(getProject()); }
/** * When the IProject is being deleted, perform any cleanup that needs to be done. When this * method is called, if the helper has cached any resources from the IProject, it should release * those resources. If you do not allocate resources in your helper, then this method should be * a no-op. */ public void deleting() { deleting(getProject()); }
/** * Notifies this IWorkbenchContext that the Validation Framework is shutting down. There will be * calls to closing(IProject) and possibly deleting(IProject) following this call, but the * resources may already be closed by the time that those methods are called, so EVERYTHING * should be cleaned up in this method. The parameter passed in is the project which is about to * shut down. This method will be called once for every IProject in the workbench. The IProject * may, or may not, be closed. */ public void shutdown() { // Default is to assume that no resources were allocated; therefore, // no cleanup needs to be done. shutdown(getProject()); }
/** * Get the collection of files from the project that are relevant for the * validator with the given class name. * * @param validatorClassName The name of the validator class. * @return The collection of files relevant for the validator class specified. */ public Collection getFiles(String validatorClassName) { IProject project = getProject(); List files = new ArrayList(); getFiles(files, project, validatorClassName); return files; }
/** * Get the IFile for the given filename. * * @param filename The name of the file to retrieve. * @return An IFile representing the file specified or null if it can't be resolved. */ public IFile getFile(String filename) { // System.out.println("file name = " + filename); IResource res = getProject().findMember(filename, true); // true means include phantom resources if (res instanceof IFile) { return (IFile) res; } return null; }