1 /*******************************************************************************
2 * Copyright (c) 2007, 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.internal.ui.fix;
13 import org.eclipse.jface.text.IRegion;
15 import org.eclipse.jdt.core.ICompilationUnit;
16 import org.eclipse.jdt.core.dom.CompilationUnit;
18 import org.eclipse.jdt.ui.cleanup.CleanUpContext;
19 import org.eclipse.jdt.ui.cleanup.ICleanUp;
22 * A clean up capable of fixing only a subset of lines
23 * in a compilation unit
27 public interface IMultiLineCleanUp extends ICleanUp {
29 public static class MultiLineCleanUpContext extends CleanUpContext {
31 private final IRegion[] fRegions;
33 public MultiLineCleanUpContext(ICompilationUnit unit, CompilationUnit ast, IRegion[] regions) {
39 * The regions of the lines which should be cleaned up. A region
40 * spans at least one line but can span multiple line if the lines
43 * @return the regions or <b>null</b> if none available
45 public IRegion[] getRegions() {