/* (non-Javadoc)
   * @see org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal#getAdditionalProposalInfo()
   */
  public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
    StringBuffer result = new StringBuffer();

    IStatus status = getFixStatus();
    if (status != null && !status.isOK()) {
      result.append("<b>"); // $NON-NLS-1$
      if (status.getSeverity() == IStatus.WARNING) {
        result.append(CorrectionMessages.FixCorrectionProposal_WarningAdditionalProposalInfo);
      } else if (status.getSeverity() == IStatus.ERROR) {
        result.append(CorrectionMessages.FixCorrectionProposal_ErrorAdditionalProposalInfo);
      }
      result.append("</b>"); // $NON-NLS-1$
      result.append(status.getMessage());
      result.append("<br><br>"); // $NON-NLS-1$
    }

    String info = fFix.getAdditionalProposalInfo();
    if (info != null) {
      result.append(info);
    } else {
      result.append(super.getAdditionalProposalInfo(monitor));
    }

    return result.toString();
  }
  /* (non-Javadoc)
   * @see org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal#createTextChange()
   */
  protected TextChange createTextChange() throws CoreException {
    CompilationUnitChange createChange = fFix.createChange(null);
    createChange.setSaveMode(TextFileChange.LEAVE_DIRTY);

    if (fFix instanceof ILinkedFix) {
      setLinkedProposalModel(((ILinkedFix) fFix).getLinkedPositions());
    }

    return createChange;
  }
 public FixCorrectionProposal(
     IProposableFix fix,
     ICleanUp cleanUp,
     int relevance,
     Image image,
     IInvocationContext context) {
   super(fix.getDisplayString(), context.getCompilationUnit(), null, relevance, image);
   fFix = fix;
   fCleanUp = cleanUp;
   fCompilationUnit = context.getASTRoot();
 }
 public IStatus getFixStatus() {
   return fFix.getStatus();
 }