Skip to main content



      Home
Home » Archived » Visual Editor (VE) » EMF examples break VE (Bugzilla 79078)
EMF examples break VE (Bugzilla 79078) [message #72407] Mon, 22 November 2004 12:05 Go to next message
Eclipse UserFriend
Hi all,

Bug 79078 was filed against EMF last Friday. Apparently, our Java model
example breaks VE. I've taken a quick look, and the problem seems to be
the following registration in its plugin.xml:

<extension point = "org.eclipse.emf.ecore.extension_parser">
<parser
type="java"
class="org.eclipse.emf.java.util.JavaResourceFactoryImpl"/ >
</extension>

This is globally registering our custom Java resource factory against
the "java" file extension.

I'm seeing the following exception in /.metadata/.log:

!ENTRY org.eclipse.ve.java.core 4 0 Nov 22, 2004 10:57:34.516
!MESSAGE Exception thrown.
!STACK 0
java.lang.ClassCastException: org.eclipse.emf.java.util.JavaResourceImpl
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.createJavaInstances(JavaSourceTranslator.java:705)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.buildCompositionModel(JavaSourceTranslator.java:774)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.decodeDocument(JavaSourceTranslator.java:881)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.loadModel(JavaSourceTranslator.java:656)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setup.run(JavaVisualEditorPart.java:1444)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

Here, createJavaInstances() is obtaining the resource of a model object
(URI=platform:/resource/Test/MyFrame.java), and casting it to
XMIResource. It's not expecting a JavaResourceImpl.

So, it would seem that VE isn't happy when .java files are parsed using
custom non-XMI resource implementation. Are you just expecting it to be
handled by the default XMIResourceImpl, or registering a different
subclass of XMIResourceFactoryImpl()? I didn't find that any VE
registration against an extension, but I *did* see a registration of
JavaXMIFactoryImpl() against the "java" *scheme*. Some background on
VE's needs and expectations in this realm would be most helpful.

My first instinct is that it might not be best to depend upon the global
registry like this. The safer thing to do might be to properly
initialize the registry local to your resource set, so as to suit your
needs.

Obviously, the fact that we're breaking you makes us all look bad.
Hopefully, we can resolve this quite quickly.

Thanks,
Dave
Re: EMF examples break VE (Bugzilla 79078) [message #73147 is a reply to message #72407] Mon, 29 November 2004 16:22 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We already resolved it in our 1.0.2 builds.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=71473

What I did was to override the extension map in my own resource set. I
really didn't like that, but after talking with Ed that is the only
thing we could come up with.

It is too late now, but shouldn't the scheme be higher priority than the
extension? But unfortunately you probably can't change that now because
someone may rely on it.

--
Thanks,
Rich Kulp
Re: EMF examples break VE (Bugzilla 79078) [message #603484 is a reply to message #72407] Mon, 29 November 2004 16:22 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We already resolved it in our 1.0.2 builds.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=71473

What I did was to override the extension map in my own resource set. I
really didn't like that, but after talking with Ed that is the only
thing we could come up with.

It is too late now, but shouldn't the scheme be higher priority than the
extension? But unfortunately you probably can't change that now because
someone may rely on it.

--
Thanks,
Rich Kulp
Previous Topic:Listview bean
Next Topic:where can i get the guide?
Goto Forum:
  


Current Time: Sat May 10 01:19:23 EDT 2025

Powered by FUDForum. Page generated in 0.03092 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top