1 /*******************************************************************************
2 * Copyright (c) 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.ui.cleanup;
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IProgressMonitor;
16 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
20 * A clean up fix calculates a {@link CompilationUnitChange} which can be applied on a document to
21 * fix one or more problems in a compilation unit.
25 public interface ICleanUpFix {
28 * Calculates and returns a {@link CompilationUnitChange} which can be applied on a document to
29 * fix one or more problems in a compilation unit.
31 * @param progressMonitor the progress monitor or <code>null</code> if none
32 * @return a compilation unit change change which should not be empty
33 * @throws CoreException if something went wrong while calculating the change
35 public CompilationUnitChange createChange(IProgressMonitor progressMonitor) throws CoreException;