Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352103 - CCE when using the string ExternalType not string keyword in reflect package
Summary: CCE when using the string ExternalType not string keyword in reflect package
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 10:41 EDT by Matt Heitz CLA
Modified: 2017-02-23 14:18 EST (History)
0 users

See Also:


Attachments
Patch to check for ParameterizableType (1.46 KB, patch)
2011-07-18 14:43 EDT, Justin Spadea CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.