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

Bug 358425

Summary: IRUtils.getReferencedPartsFor(part) do not contain the dynamically created part
Product: z_Archived Reporter: Huang Ji Yong <hjiyong>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: greer, jqian, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Huang Ji Yong CLA 2011-09-21 10:21:04 EDT
Steps to reproduce:
Create a new Web Client Project.
Create a new RUI Handler in that project with the following source.
package client;

// RUI Handler
import org.eclipse.edt.rui.history.HistoryHelper;

//
//

handler testRef type RUIhandler{ onConstructionFunction = start, cssFile = "css/testIR.css", title = "testRef"}
	
    function start()
    	if( new HistoryHelper{}.isIE()) // The HistoryHelper is not included in the ref parts
    		syslib.writeStdout("In IE");
    	end
    end
end

The handler use new HistoryHelper{} to reference HistoryHelper, but historyHelper does not contained in the IRUtils.getReferencedPartsFor(part) list.
If we define HistoryHelper as a field, it it included in the list.
Comment 1 Huang Ji Yong CLA 2011-09-28 23:30:13 EDT
*** Bug 358912 has been marked as a duplicate of this bug. ***
Comment 2 Paul Harmon CLA 2011-10-24 12:16:14 EDT
This was fixed with a change to IRUtils.PartsReferenceResolver to fix bug 357247 (on 9/26/2011).
Comment 3 Huang Ji Yong CLA 2011-10-31 04:53:21 EDT
Verified in Build 201110302101