Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317511

Summary: Faulty logic in HandleFactory.createOpenable
Product: [WebTools] JSDT Reporter: Chris Jaun <cmjaun>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 Flags: thatnitind: review+
Version: 3.2   
Target Milestone: 3.2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Chris Jaun CLA 2010-06-21 16:12:59 EDT
if (this.lastPkgFragmentRootPath == null
				|| !(resourcePath.startsWith(this.lastPkgFragmentRootPath)
					&& (rootPathLength = this.lastPkgFragmentRootPath.length()) > 0
					&& resourcePath.charAt(rootPathLength) == '/')) {

The above check is faulty because in JSDT, unlike JDT, it is possible to have a library container as a child of a source folder.

The lastPkgFragmentRootPath was getting screwed up and resulting in the incorrect creation of package fragments.
Comment 1 Chris Jaun CLA 2010-06-21 16:13:51 EDT
Created attachment 172365 [details]
patch
Comment 2 Chris Jaun CLA 2010-06-29 09:52:11 EDT
Patch checked in.