-
Notifications
You must be signed in to change notification settings - Fork 86
/
IMultiLineCleanUp.java
52 lines (44 loc) · 1.5 KB
/
IMultiLineCleanUp.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*******************************************************************************
* Copyright (c) 2007, 2008 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.ui.fix;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.ui.cleanup.CleanUpContext;
import org.eclipse.jdt.ui.cleanup.ICleanUp;
/**
* A clean up capable of fixing only a subset of lines
* in a compilation unit
*
* @since 3.4
*/
public interface IMultiLineCleanUp extends ICleanUp {
public static class MultiLineCleanUpContext extends CleanUpContext {
private final IRegion[] fRegions;
public MultiLineCleanUpContext(ICompilationUnit unit, CompilationUnit ast, IRegion[] regions) {
super(unit, ast);
fRegions= regions;
}
/**
* The regions of the lines which should be cleaned up. A region
* spans at least one line but can span multiple line if the lines
* are successive.
*
* @return the regions or <b>null</b> if none available
*/
public IRegion[] getRegions() {
return fRegions;
}
}
}