1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

check the continuation line.

This commit is contained in:
Alain Magloire 2004-03-01 17:24:56 +00:00
parent 9bd8b6fb3a
commit 8adf0dd949

View file

@ -47,6 +47,16 @@ public class MakefileAnnotationHover implements IAnnotationHover {
try {
IRegion info = document.getLineInformation(lineNumber);
String line = document.get(info.getOffset(), info.getLength());
int numberOfLines = document.getNumberOfLines();
while (line != null && line.endsWith("\\")) { //$NON-NLS-1$
line = line.substring(0, line.length() - 1);
lineNumber++;
if (lineNumber < numberOfLines) {
info = document.getLineInformation(lineNumber);
String l = document.get(info.getOffset(), info.getLength());
line += "\n" + l; //$NON-NLS-1$
}
}
if (line != null && line.indexOf('$') != -1 && line.length() > 1) {
IWorkingCopyManager fManager = MakeUIPlugin.getDefault().getWorkingCopyManager();
IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());