Community
Participate
Working Groups
Create the following two .java files, then try to open Bar.java in the Java editor. The "Decoration Calculation" system task goes into an infinite loop, consuming the CPU and forcing you to kill the process. Foo.java -------- public class Foo extends Bar{ } Bar.java -------- public class Bar extends Foo { abstract Foo getFoo(); }
Moving to JDT/UI
Markus, can you have a look?
I cannot reproduce in 3.1.1. Do you have other plugins (not from the eclipse sdk) installed which provide more label decorators? Can you provide steps to reproduce in a clean eclipse install?
Oops, sorry. I can reproduce now.
Moving to JDT/Core. We call IType#newSupertypeHierarchy(IProgressMonitor) on Bar. The infinite cycle occurs in the first loop here: ClassScope.checkForInheritedMemberTypes(SourceTypeBinding) line: 662 ClassScope.connectTypeHierarchy() line: 955 CompilationUnitScope.connectTypeHierarchy() line: 266 LookupEnvironment.completeTypeBindings(CompilationUnitDeclaration, boolean) line: 251 HierarchyResolver.resolve(Openable[], HashSet, IProgressMonitor) line: 642 HierarchyResolver.resolve(IGenericType) line: 477 IndexBasedHierarchyBuilder(HierarchyBuilder).buildSupertypes() line: 113 IndexBasedHierarchyBuilder.build(boolean) line: 132 TypeHierarchy.compute() line: 320 TypeHierarchy.refresh(IProgressMonitor) line: 1255 CreateTypeHierarchyOperation.executeOperation() line: 90 CreateTypeHierarchyOperation(JavaModelOperation).run(IProgressMonitor) line: 720 CreateTypeHierarchyOperation(JavaModelOperation).runOperation(IProgressMonitor) line: 779 SourceType.newSupertypeHierarchy(WorkingCopyOwner, IProgressMonitor) line: 701 SourceType.newSupertypeHierarchy(IProgressMonitor) line: 653 SuperTypeHierarchyCache.getTypeHierarchy(IType, IProgressMonitor) line: 120 SuperTypeHierarchyCache.getTypeHierarchy(IType) line: 80 SuperTypeHierarchyCache.getMethodOverrideTester(IType) line: 89 OverrideIndicatorLabelDecorator.getOverrideIndicators(IMethod) line: 162 OverrideIndicatorLabelDecorator.computeAdornmentFlags(Object) line: 129 OverrideIndicatorLabelDecorator.decorate(Object, IDecoration) line: 261 LightweightDecoratorDefinition.decorate(Object, IDecoration) line: 249 LightweightDecoratorManager$LightweightRunnable.run() line: 66 SafeRunner.run(ISafeRunnable) line: 37 Platform.run(ISafeRunnable) line: 785 LightweightDecoratorManager.decorate(Object, DecorationBuilder, LightweightDecoratorDefinition) line: 323 LightweightDecoratorManager.getDecorations(Object, DecorationBuilder) line: 309 DecorationScheduler$1.run(IProgressMonitor) line: 292 Worker.run() line: 58
+1 for 3.2RC1
Added TypeHierarchyTests testCycle()
Verified for 3.2RC1 with build I20060413-1718