Bug 30757

Summary: Out of memory exception during hierarchy scoped search
Product: [Eclipse Project] JDT Reporter: Erich Gamma <erich_gamma>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Erich Gamma CLA 2003-01-31 18:04:03 EST
JUnit set-up in a fresh workspace (started with the default settings)
1) select junit.samples.money.Money.add(IMoney)
2) execute Navigate>Go to>Referring Tests
->you get an out of memory exception.
The same scenario works for other methods. I'm pretty sure that this worked in 
M3.


Thread [ModalContext] (Suspended (exception OutOfMemoryError))
	MatchingOpenable.locateMatchesInCompilationUnit(char[]) line: 327
	MatchingOpenable.locateMatches() line: 180
	MatchLocator.locateMatches(JavaProject) line: 1224
	MatchLocator.locateMatches(String[], IWorkspace, IWorkingCopy[]) line: 
529
	SearchEngine.search(IWorkspace, ISearchPattern, IJavaSearchScope, 
IJavaSearchResultCollector) line: 430
	SearchEngine.search(IWorkspace, IJavaElement, int, IJavaSearchScope, 
IJavaSearchResultCollector) line: 362
	TestMethodSelectionDialog.doSearchTestMethods(IJavaElement, IType, 
IProgressMonitor) line: 177
	TestMethodSelectionDialog.access$0(TestMethodSelectionDialog, 
IJavaElement, IType, IProgressMonitor) line: 174
	TestMethodSelectionDialog$1.run(IProgressMonitor) line: 164
	ModalContext$ModalContextThread.run() line: 95
Comment 1 Philipe Mulet CLA 2003-02-03 04:28:29 EST
Where can we find the description of a JUnit set-up (could be the problem 
here<g>) ?
Comment 2 Erich Gamma CLA 2003-02-03 05:54:24 EST
This is set-up is created with the JDT example project wizard.

The code is in org.eclipse.jdt.ui.examples.projects
Theplug-in adds an example wizard in the New dialog:
New>Examples>Java
Comment 3 Jerome Lanneluc CLA 2003-02-11 13:10:57 EST
Improved memory management during search (by releasing 
CompilationUnitDeclarations as soon as we're done with it).
Comment 4 David Audel CLA 2003-03-11 06:38:48 EST
Verified.