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

Bug 357413

Summary: Do not generate a project if the EDT compiler threw an exception
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Justin Spadea <jspadea>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jspadea
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
CVS Patch. lasher: iplog+

Description Brian Svihovec CLA 2011-09-12 15:58:49 EDT
Import the project /org.eclipse.edt.rui.samples_0.7.0 from Kan-CVS.

When the project is being built, the compiler will terminate suddenly after a ClassCastException is thrown, leaving objects in the IR caches that are incomplete (e.g. ProxyPart).  NOTE: The CCE occurs for ValidationDemo and the ProxyParts are related to ToCElement.

When the Generation Builder runs, an unsupported operation exception is thrown for the ProxyParts that are passed to the Generators.
Comment 1 Brian Svihovec CLA 2011-09-12 16:07:18 EDT
Created attachment 203188 [details]
CVS Patch.
Comment 2 Brian Svihovec CLA 2011-09-12 16:07:56 EDT
I have attached a patch that will keep the Generation Builder from running if the EDT Builder encounters an unexpected runtime exception for the current project, or any projects on the current project's EGLPath.  

I added a new type of EDT Problem, called EDT Build Problem, which is created whenever the builder handles an unexpected exception.  The Generation builder now detects this new type of problem and will not run if the problem is present.

NOTE: I had originally tried having the Generation Builder just check the Build State of the projects, instead of adding a new problem type, but this resulted in the wrong type of messages being reported for the current project if a dependent project contained the runtime exception.  In this situation, both the dependent project and the current project will have invalid build states, so both projects were reporting that they were not generated due to an unexpected build problem.  With a new problem type, we are now able to report that the dependent project was not generated because it contains an unexpected build problem, and that the current project was not generated because a dependent project contains an unexpected build problem.
Comment 3 Justin Spadea CLA 2011-09-13 10:44:10 EDT
I've applied your patch with one change: I made Builder.isWorthBuilding() also create a marker of type BUILD_PROBLEM instead of just PROBLEM.
Comment 4 Lisa Lasher CLA 2011-11-09 14:17:00 EST
This defect was fixed at least 2 months ago, so I am closing.