/**
   * Calls {@link ManifestUpdater#updateManifest(IProject)} on the current project
   *
   * @param aMonitor Progress monitor
   * @throws CoreException An error occurred during manipulation
   */
  protected void updateManifest(final IProgressMonitor aMonitor) throws CoreException {

    IProgressMonitor monitor = aMonitor;
    if (aMonitor == null) {
      monitor = new NullProgressMonitor();

    } else if (aMonitor.isCanceled()) {
      // Work cancelled
      return;
    }

    // Do the job
    final IStatus result = pManifestUpdater.updateManifest(getProject(), monitor);

    // Store the manipulation time
    getProject()
        .setSessionProperty(PROJECT_LAST_MANIPULATION, Long.valueOf(System.currentTimeMillis()));

    // Log the result
    if (result.isOK()) {
      // No problem : full success
      Activator.logInfo(getProject(), "Manipulation done");

    } else {
      // Errors have already been logged, so just pop a dialog
      StatusManager.getManager().handle(result, StatusManager.SHOW);
    }
  }
  /*
   * (non-Javadoc)
   *
   * @see
   * org.eclipse.core.resources.IncrementalProjectBuilder#clean(org.eclipse
   * .core.runtime.IProgressMonitor)
   */
  @Override
  protected void clean(final IProgressMonitor aMonitor) throws CoreException {

    super.clean(aMonitor);

    // Remove the iPOJO-Component Manifest entry
    try {
      pManifestUpdater.removeManifestEntry(getProject());

    } catch (final CoreException ex) {
      Activator.logError(getProject(), "Something went wrong while cleaning the manifest file", ex);
    }
  }