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

Bug 352158

Summary: Language Compliance Libraries no longer build
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jqian, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
archived project file none

Description Kathy Carroll CLA 2011-07-14 15:06:52 EDT
Build Identifier: 0.7.0

The language compliance variation libraries will not build in my workspace which has just been synched up.  Jing's machine which has EDT code from several days ago will build the variation files (ie boolean001 and boolean002).

I get a EDT Build Failure:

org.eclipse.edt.compiler.internal.core.builder.BuildException: java.lang.ClassCastException: org.eclipse.edt.compiler.binding.EnumerationDataBinding cannot be cast to org.eclipse.edt.compiler.binding.IAnnotationBinding
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:187)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:152)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.processParts(AbstractBuilder.java:99)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.build(AbstractBuilder.java:136)
	at org.eclipse.edt.ide.core.internal.builder.Builder.cleanBuild(Builder.java:167)
	at org.eclipse.edt.ide.core.internal.builder.Builder.build(Builder.java:91)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassCastException: org.eclipse.edt.compiler.binding.EnumerationDataBinding cannot be cast to org.eclipse.edt.compiler.binding.IAnnotationBinding
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofMember.processSettings(Egl2MofMember.java:464)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.processSettings(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofMember.visit(Egl2MofMember.java:262)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.NestedFunction.accept(NestedFunction.java:89)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.handleContents(Egl2MofPart.java:580)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.defaultHandleVisitPart(Egl2MofPart.java:345)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.visit(Egl2MofPart.java:169)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.Interface.accept(Interface.java:40)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.convert(Egl2Mof.java:160)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.createIRFromBoundAST(AbstractProcessingQueue.java:250)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.processCompiledPart(AbstractProcessingQueue.java:226)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.level03Compile(AbstractProcessingQueue.java:165)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:169)
	... 17 more


Reproducible: Always

Steps to Reproduce:
1. From the EGL prespective, open navigation and error logn view
2. Import the exising project in the attached archive file
3. Create the src folder
4. Clear out the error view
5. Clean the project
6. Want to have primitivesTypes folder undder eglbin directory
7. Error view has the details about the Build Exception
Comment 1 Kathy Carroll CLA 2011-07-14 15:07:31 EDT
Created attachment 199695 [details]
archived project file
Comment 2 Paul Harmon CLA 2011-07-14 17:00:02 EDT
I have checked in a change to EGL2MofMember for this problem.

The reason this just started failing is because Joe Vincens recently changed the name of the XML annotation to XMLType. Because of this, the binding code is now resolving the reference to @XML to the enumeration entry egl.ui.jasper.ExportFormat.xml. The IR generator code was assuming that this would be an AnnotationBinding instead of an EnumerationBinding, so was throwing a class cast exception.

You should now see validation errors in the annotation settings for @XML (instead of getting a build failure). You will need to change @XML to @XMLType in your .egl file(s).
Comment 3 Kathy Carroll CLA 2011-07-15 09:06:21 EDT
Thanks. Fix works for me.
Comment 4 Lisa Lasher CLA 2011-10-11 16:19:03 EDT
Closing this defect.