diff --git a/base/org.eclipse.jdt.groovy.core/src/org/codehaus/jdt/groovy/internal/compiler/ast/GroovyCompilationUnitDeclaration.java b/base/org.eclipse.jdt.groovy.core/src/org/codehaus/jdt/groovy/internal/compiler/ast/GroovyCompilationUnitDeclaration.java index 040a8ac1c1..301d8d5a09 100644 --- a/base/org.eclipse.jdt.groovy.core/src/org/codehaus/jdt/groovy/internal/compiler/ast/GroovyCompilationUnitDeclaration.java +++ b/base/org.eclipse.jdt.groovy.core/src/org/codehaus/jdt/groovy/internal/compiler/ast/GroovyCompilationUnitDeclaration.java @@ -2575,7 +2575,7 @@ private void fixupSourceLocationsForTypeDeclaration(GroovyTypeDeclaration typeDe } else { // start and end of the type name; scripts do not have a name, so use start instead typeDeclaration.sourceStart = Math.max(classNode.getNameStart(), classNode.getStart()); - typeDeclaration.sourceEnd = Math.max(classNode.getNameEnd(), classNode.getStart()); // incl. extends/implements? + typeDeclaration.sourceEnd = Math.max(classNode.getNameEnd(), classNode.getStart() - 1); // start and end of the entire declaration including Javadoc and ending at the last close bracket Javadoc doc = findJavadoc(classNode.getLineNumber());