]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/ui/org/eclipse/jdt/internal/ui/fix/IMultiLineCleanUp.java
46ce9521a49a4377ec7505d81411c8aec00b896f
[ifi-stolz-refaktor.git] / case-study / jdt-after / ui / org / eclipse / jdt / internal / ui / fix / IMultiLineCleanUp.java
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
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.jdt.internal.ui.fix;
12
13 import org.eclipse.jface.text.IRegion;
14
15 import org.eclipse.jdt.core.ICompilationUnit;
16 import org.eclipse.jdt.core.dom.CompilationUnit;
17
18 import org.eclipse.jdt.ui.cleanup.CleanUpContext;
19 import org.eclipse.jdt.ui.cleanup.ICleanUp;
20
21 /**
22  * A clean up capable of fixing only a subset of lines
23  * in a compilation unit
24  *
25  * @since 3.4
26  */
27 public interface IMultiLineCleanUp extends ICleanUp {
28
29         public static class MultiLineCleanUpContext extends CleanUpContext {
30
31                 private final IRegion[] fRegions;
32
33                 public MultiLineCleanUpContext(ICompilationUnit unit, CompilationUnit ast, IRegion[] regions) {
34                         super(unit, ast);
35                         fRegions= regions;
36                 }
37
38                 /**
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
41                  * are successive.
42                  *
43                  * @return the regions or <b>null</b> if none available
44                  */
45                 public IRegion[] getRegions() {
46                         return fRegions;
47                 }
48         }
49 }