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

Bug 352103

Summary: CCE when using the string ExternalType not string keyword in reflect package
Product: z_Archived Reporter: Matt Heitz <mheitz>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to check for ParameterizableType none

Description Matt Heitz CLA 2011-07-14 10:41:28 EDT
When I use the keyword for a type, such as "string", the code in egl.lang.reflect can be compiled.  But when I replace the keyword with the name for the type's ExternalType, the build fails.  An example type and the exception stack trace are below.


package egl.lang.reflect;

import egl.lang.EglString;

record ParameterizableType type Annotation {
	targets = [ElementKind.ExternalTypePart],
	@PartType{"org.eclipse.edt.mof.egl.ParameterizableType"},
	@Stereotype
}
	name EglString;
//	name string;
	parameterizedType TypeRef;
end 



Caused by: java.lang.ClassCastException: org.eclipse.edt.mof.egl.impl.ParameterizableTypeImpl incompatible with org.eclipse.edt.mof.EType
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofMember.setUpMofTypedElement(Egl2MofMember.java:407)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.setUpMofTypedElement(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofMember.visit(Egl2MofMember.java:146)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.StructureItem.accept(StructureItem.java:123)
	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:97)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.Record.accept(Record.java:85)
	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
Comment 1 Justin Spadea CLA 2011-07-18 14:43:35 EDT
Created attachment 199856 [details]
Patch to check for ParameterizableType

I'm not entirely familiar with ParameterizableType/ParameterizedType, so I've attached a patch rather than just committing the fix. Someone who knows better should review it.
Comment 2 Matt Heitz CLA 2011-08-04 13:28:09 EDT
This is no longer an issue.  Tim says I should use the keywords, so that's what I've done.  I didn't review the patch.
Comment 3 Matt Heitz CLA 2011-08-30 13:55:29 EDT
Hurray.