]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/ui/org/eclipse/jdt/ui/cleanup/ICleanUpFix.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-after / ui / org / eclipse / jdt / ui / cleanup / ICleanUpFix.java
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
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.jdt.ui.cleanup;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IProgressMonitor;
15
16 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
17
18
19 /**
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.
22  * 
23  * @since 3.5
24  */
25 public interface ICleanUpFix {
26
27         /**
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.
30          * 
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
34          */
35         public CompilationUnitChange createChange(IProgressMonitor progressMonitor) throws CoreException;
36
37 }