Bug 308898 - [reconciling] ASTProvider creates same AST twice when opening class file editor
Summary: [reconciling] ASTProvider creates same AST twice when opening class file editor
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-04-12 13:18 EDT by Markus Keller CLA
Modified: 2010-04-13 09:22 EDT (History)
1 user (show)

See Also:


Attachments
Fix (1.66 KB, patch)
2010-04-13 09:22 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2010-04-12 13:18:35 EDT
HEAD (but I guess that's already been the case in 3.5)

The ASTProvider creates the same AST twice when opening a class file editor.
To reproduce:
- make sure the Outline is visible in the target
- set a breakpoint in ASTProvider#getAST(..) at the line that calls createAST(..) (line 479)
- open java.lang.String (with source attachment)

Thread [Worker-6] (Suspended (breakpoint at line 479 in ASTProvider))	
	ASTProvider.getAST(ITypeRoot, SharedASTProvider$WAIT_FLAG, IProgressMonitor) line: 479	
	SharedASTProvider.getAST(ITypeRoot, SharedASTProvider$WAIT_FLAG, IProgressMonitor) line: 126	
	ClassFileEditor$3.run(IProgressMonitor) line: 687	
	Worker.run() line: 54
	
Thread [Worker-8] (Suspended (breakpoint at line 479 in ASTProvider))	
	ASTProvider.getAST(ITypeRoot, SharedASTProvider$WAIT_FLAG, IProgressMonitor) line: 479	
	SharedASTProvider.getAST(ITypeRoot, SharedASTProvider$WAIT_FLAG, IProgressMonitor) line: 126	
	OverrideIndicatorLabelDecorator.getOverrideIndicators(IMethod) line: 161	
	OverrideIndicatorLabelDecorator.computeAdornmentFlags(Object) line: 136	
	OverrideIndicatorLabelDecorator.decorate(Object, IDecoration) line: 272	
	LightweightDecoratorDefinition.decorate(Object, IDecoration) line: 269	
	LightweightDecoratorManager$LightweightRunnable.run() line: 81	
	SafeRunner.run(ISafeRunnable) line: 42	
	LightweightDecoratorManager.decorate(Object, DecorationBuilder, LightweightDecoratorDefinition) line: 365	
	LightweightDecoratorManager.getDecorations(Object, DecorationBuilder) line: 347	
	DecorationScheduler$1.ensureResultCached(Object, boolean, IDecorationContext) line: 371	
	DecorationScheduler$1.run(IProgressMonitor) line: 331	
	Worker.run() line: 54
Comment 1 Dani Megert CLA 2010-04-13 09:22:04 EDT
Good catch!

>HEAD (but I guess that's already been the case in 3.5)
It's even in 3.4 :-(
Comment 2 Dani Megert CLA 2010-04-13 09:22:43 EDT
Created attachment 164703 [details]
Fix