|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2006, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2006, 2010 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 58-70
Link Here
|
| 58 |
import org.eclipse.jdt.core.IType; |
58 |
import org.eclipse.jdt.core.IType; |
| 59 |
import org.eclipse.jdt.core.JavaCore; |
59 |
import org.eclipse.jdt.core.JavaCore; |
| 60 |
import org.eclipse.jdt.core.JavaModelException; |
60 |
import org.eclipse.jdt.core.JavaModelException; |
|
|
61 |
import org.eclipse.jdt.core.SourceRange; |
| 61 |
import org.eclipse.jdt.core.ToolFactory; |
62 |
import org.eclipse.jdt.core.ToolFactory; |
| 62 |
import org.eclipse.jdt.core.compiler.IProblem; |
63 |
import org.eclipse.jdt.core.compiler.IProblem; |
| 63 |
import org.eclipse.jdt.core.compiler.IScanner; |
64 |
import org.eclipse.jdt.core.compiler.IScanner; |
| 64 |
import org.eclipse.jdt.core.compiler.ITerminalSymbols; |
65 |
import org.eclipse.jdt.core.compiler.ITerminalSymbols; |
| 65 |
import org.eclipse.jdt.core.compiler.InvalidInputException; |
66 |
import org.eclipse.jdt.core.compiler.InvalidInputException; |
| 66 |
import org.eclipse.jdt.core.dom.CompilationUnit; |
67 |
import org.eclipse.jdt.core.dom.CompilationUnit; |
| 67 |
import org.eclipse.jdt.core.SourceRange; |
|
|
| 68 |
|
68 |
|
| 69 |
import org.eclipse.jdt.ui.PreferenceConstants; |
69 |
import org.eclipse.jdt.ui.PreferenceConstants; |
| 70 |
|
70 |
|
|
Lines 611-622
Link Here
|
| 611 |
|
611 |
|
| 612 |
if (captionLine < lastLine) { |
612 |
if (captionLine < lastLine) { |
| 613 |
int postOffset= document.getLineOffset(captionLine + 1); |
613 |
int postOffset= document.getLineOffset(captionLine + 1); |
| 614 |
IRegion postRegion= new Region(postOffset, offset + length - postOffset); |
614 |
int postLength= offset + length - postOffset; |
| 615 |
|
615 |
if (postLength > 0) { |
| 616 |
if (preRegion == null) |
616 |
IRegion postRegion= new Region(postOffset, postLength); |
| 617 |
return new IRegion[] { postRegion }; |
617 |
if (preRegion == null) |
| 618 |
|
618 |
return new IRegion[] { postRegion }; |
| 619 |
return new IRegion[] { preRegion, postRegion }; |
619 |
return new IRegion[] { preRegion, postRegion }; |
|
|
620 |
} |
| 620 |
} |
621 |
} |
| 621 |
|
622 |
|
| 622 |
if (preRegion != null) |
623 |
if (preRegion != null) |