Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362630 - Exceptions occur when importing wrong FormField to RUIHandler
Summary: Exceptions occur when importing wrong FormField to RUIHandler
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-02 02:49 EDT by fahua jin CLA
Modified: 2017-02-23 14:14 EST (History)
2 users (show)

See Also:


Attachments
The sample EGL file. (2.16 KB, application/octet-stream)
2011-11-02 02:50 EDT, fahua jin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2011-11-02 02:49:52 EDT
Build Identifier: 0.7.0.v201111012101

There're two FormField part definitions in EDT, one is org.eclipse.edt.mof.egl.FormField, and another is org.eclipse.edt.rui.mvc.FormField. In the attached handler, it should import the formfield defined in the mvc. But I incautiously import the formfield in the mof package, it gives me very confuse error message.

1) Please download & import the attached H1.egl to the workspace.
2) No error decorator in the project icon, while you can see two errors in the problems view.
Description	Resource	Path	Location	Type
Problems occurred during build. Please see log for details.	Test		Unknown	EDT Build Problem
Description	Resource	Path	Location	Type
The project was not generated because an unexpected error was reported by the EDT builder.	Test		Unknown	EDT Generation Problem


------------
Exception in the log file.
------------

!ENTRY org.eclipse.edt.ide.core 1 0 2011-11-02 14:43:00.531
!MESSAGE EDT Build Failure
!STACK 0
org.eclipse.edt.compiler.internal.core.builder.BuildException: java.lang.ClassCastException: org.eclipse.edt.mof.impl.EClassImpl cannot be cast to org.eclipse.edt.mof.egl.Type
	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:94)
	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.mof.impl.EClassImpl cannot be cast to org.eclipse.edt.mof.egl.Type
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofBase.setUpEglTypedElement(Egl2MofBase.java:1856)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofMember.visit(Egl2MofMember.java:126)
	at org.eclipse.edt.compiler.core.ast.ClassDataDeclaration.accept(ClassDataDeclaration.java:88)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.handleContents(Egl2MofPart.java:679)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.defaultHandleVisitPart(Egl2MofPart.java:384)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofPart.visit(Egl2MofPart.java:199)
	at org.eclipse.edt.compiler.core.ast.Handler.accept(Handler.java:55)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.convert(Egl2Mof.java:160)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.createIRFromBoundAST(AbstractProcessingQueue.java:245)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.processCompiledPart(AbstractProcessingQueue.java:221)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.level03Compile(AbstractProcessingQueue.java:164)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:169)
	... 17 more



Reproducible: Always
Comment 1 fahua jin CLA 2011-11-02 02:50:57 EDT
Created attachment 206309 [details]
The sample EGL file.
Comment 2 Matt Heitz CLA 2011-11-02 09:46:45 EDT
This bug belongs on the IDE Core component.  EDT Builds is for problems that happen when compiling, downloading, or installing EDT.
Comment 3 Brian Svihovec CLA 2011-11-02 16:02:01 EDT
I think we should start the investigation the Mof Model, since the exception is happening in org.eclipse.edt.compiler.internal.egl2mof.Egl2MofBase.setUpEglTypedElement(Egl2MofBase.java:1856)

NOTE: This defect is slightly related to Bug 362628.
Comment 4 fahua jin CLA 2011-11-03 03:39:56 EDT
Upgrade the defect severity to major because it always happens when using the MVC and organize import function.
Comment 5 Paul Harmon CLA 2011-11-03 10:29:34 EDT
I have updated Egl2MofBase to fix the class cast exception.
Comment 6 fahua jin CLA 2011-11-04 01:28:38 EDT
(In reply to comment #5)
> I have updated Egl2MofBase to fix the class cast exception.

Paul, did u release the code? I still can see the exception in the build of 0.7.0.v201111032101.
Comment 7 fahua jin CLA 2011-11-04 02:18:41 EDT
Reopen the defect, and please resolve the defect after releasing the code.
Comment 8 Paul Harmon CLA 2011-11-04 10:00:13 EDT
change has been released
Comment 9 fahua jin CLA 2011-11-07 02:41:26 EST
Verified in 0.7.0.v201111060901.