The "One Laptop Per Child" project has a great device ready to ship, but there's no Java on there. Let's think about working together to put Java on OLPC!
Problem with the root of a metamodel instance, again.
At 2:08 PM
on Aug 7, 2008,
Toņi Reina Quintero
wrote:
It seems that man is the only animal that trips twice over the same stone.
Here I am again with the same problem that I had almost two years ago. I
include the question I posted then:
>I have written a metamodel and generated the editor by means of EMF. But
>the
> problem arise when I try to execute the editor and create an instance of
> the
> metamodel.
>
> I choose New Other MyMetamodelModel, the name of the file, and when I'm
> going to choose the model object, althought all the metaclasses defined in
> my metamodel are avalaible, I can't choose anyone, because when I push the
> Finish button, nothing happens.
The problem was that the properties Child, Create Child and Notify of the
root model references were false instead of true.
Right now I'm working with a different model, but I have the same problem
that those days. However, now I have checked the properties and the
containment, and they have the true value.
Here I attach a piece of the model. The root is the DTD class.
I don't know if the proble is due to the abstract class nature of the
referenced Element.
The .ecore model has been implemented with the topcased ecore editor, and
all the stuff has been automatically generated.
Re: Problem with the root of a metamodel instance, again.
Toņi,
If hitting finish seems to do nothing, probably there's an error being
logged in the Error log view that will provide a clue.
Toņi Reina Quintero wrote:
> It seems that man is the only animal that trips twice over the same
> stone.
>
> Here I am again with the same problem that I had almost two years ago.
> I include the question I posted then:
>
>
>> I have written a metamodel and generated the editor by means of EMF.
>> But the
>> problem arise when I try to execute the editor and create an instance
>> of the
>> metamodel.
>>
>> I choose New Other MyMetamodelModel, the name of the file, and when I'm
>> going to choose the model object, althought all the metaclasses
>> defined in
>> my metamodel are avalaible, I can't choose anyone, because when I
>> push the
>> Finish button, nothing happens.
>
> The problem was that the properties Child, Create Child and Notify of
> the root model references were false instead of true.
>
> Right now I'm working with a different model, but I have the same
> problem that those days. However, now I have checked the properties
> and the
> containment, and they have the true value.
>
> Here I attach a piece of the model. The root is the DTD class.
>
> I don't know if the proble is due to the abstract class nature of the
> referenced Element.
>
> The .ecore model has been implemented with the topcased ecore editor,
> and all the stuff has been automatically generated.
>
> Thanks in advance,
> Toņi
> ------------------------------------------------------------------------
>
Toñi,
If hitting finish seems to do nothing, probably there's an error being
logged in the Error log view that will provide a clue.
Toñi Reina Quintero wrote:
It
seems that man is the only animal that trips twice over the same stone.
Here I am again with the same problem that I had almost two years ago.
I include the question I posted then:
I have written a metamodel and generated the
editor by means of EMF. But the
problem arise when I try to execute the editor and create an instance
of the
metamodel.
I choose New Other MyMetamodelModel, the name of the file, and when I'm
going to choose the model object, althought all the metaclasses defined
in
my metamodel are avalaible, I can't choose anyone, because when I push
the
Finish button, nothing happens.
The problem was that the properties Child, Create Child and Notify of
the root model references were false instead of true.
Right now I'm working with a different model, but I have the same
problem that those days. However, now I have checked the properties and
the
containment, and they have the true value.
Here I attach a piece of the model. The root is the DTD class.
I don't know if the proble is due to the abstract class nature of the
referenced Element.
The .ecore model has been implemented with the topcased ecore editor,
and all the stuff has been automatically generated.
2.At 4:48 PM
on Aug 7, 2008,
Toņi Reina Quintero
wrote:
Re: Problem with the root of a metamodel instance, again.
Hi Ed, thanks for answering quickly.
This is a copy of a warning related to the plugin
I've created that appears in the error log view. I hope this can help to detect
the problem
size=2>eclipse.buildId=I20070625-1500
java.version=1.6.0-oem
java.vendor=Sun
Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32,
NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch
x86
Warning
Thu Aug 07 18:55:36 CEST
2008
java.lang.UnsupportedOperationException
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
at
org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at
org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at
org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at
org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at
org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at
org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
at
org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at
org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at
java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at
org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at
org.eclipse.equinox.launcher.Main.run(Main.java:1169)
If
hitting finish seems to do nothing, probably there's an error being logged in
the Error log view that will provide a clue.
Toņi Reina Quintero
wrote:
It seems
that man is the only animal that trips twice over the same stone.
Here I am again with the same problem that I had almost two years
ago. I include the question I posted then:
I have written a metamodel and generated the
editor by means of EMF. But the
problem arise when I try to execute
the editor and create an instance of the
metamodel.
I choose
New Other MyMetamodelModel, the name of the file, and when I'm
going
to choose the model object, althought all the metaclasses defined in
my metamodel are avalaible, I can't choose anyone, because when I push
the
Finish button, nothing happens.
The problem was
that the properties Child, Create Child and Notify of the root model
references were false instead of true.
Right now I'm working with a
different model, but I have the same problem that those days. However, now I
have checked the properties and the
containment, and they have the true
value.
Here I attach a piece of the model. The root is the DTD
class.
I don't know if the proble is due to the abstract class
nature of the referenced Element.
The .ecore model has been
implemented with the topcased ecore editor, and all the stuff has been
automatically generated.
Thanks in advance,
Toņi
src="cid:47D275D764294428AC01C94CC27AD6D4 at lsi dot us dot es">
Re: Problem with the root of a metamodel instance, again.
Toņi,
It sounds like a resource implementation was created that doesn't even
support save. I have a hard time imagining how that would be the case
since all resource implementations except ResourceImpl itself do
implement doSave. Look closely as the extension you're using and what
resource factory is registered for that extension.
Toņi Reina Quintero wrote:
> Hi Ed, thanks for answering quickly.
>
> This is a copy of a warning related to the plugin I've created that
> appears in the error log view. I hope this can help to detect the problem
>
>
> eclipse.buildId=I20070625-1500
> java.version=1.6.0-oem
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
> Command-line arguments: -os win32 -ws win32 -arch x86
>
> Warning
> Thu Aug 07 18:55:36 CEST 2008
>
>
> java.lang.UnsupportedOperationException
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
> at
> org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
> at
> org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253)
> at
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
> at org.eclipse.jface.window.Window.open(Window.java:796)
> at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
>
>
>
> "Ed Merks"
>
> escribiķ en el mensaje de noticias
> news:g7fjbr$n4s$1 at build dot eclipse dot org...
> Toņi,
>
> If hitting finish seems to do nothing, probably there's an error
> being logged in the Error log view that will provide a clue.
>
>
> Toņi Reina Quintero wrote:
>> It seems that man is the only animal that trips twice over the
>> same stone.
>>
>> Here I am again with the same problem that I had almost two years
>> ago. I include the question I posted then:
>>
>>
>>> I have written a metamodel and generated the editor by means of
>>> EMF. But the
>>> problem arise when I try to execute the editor and create an
>>> instance of the
>>> metamodel.
>>>
>>> I choose New Other MyMetamodelModel, the name of the file, and
>>> when I'm
>>> going to choose the model object, althought all the metaclasses
>>> defined in
>>> my metamodel are avalaible, I can't choose anyone, because when
>>> I push the
>>> Finish button, nothing happens.
>>
>> The problem was that the properties Child, Create Child and
>> Notify of the root model references were false instead of true.
>>
>> Right now I'm working with a different model, but I have the same
>> problem that those days. However, now I have checked the
>> properties and the
>> containment, and they have the true value.
>>
>> Here I attach a piece of the model. The root is the DTD class.
>>
>> I don't know if the proble is due to the abstract class nature of
>> the referenced Element.
>>
>> The .ecore model has been implemented with the topcased ecore
>> editor, and all the stuff has been automatically generated.
>>
>> Thanks in advance,
>> Toņi
>> ------------------------------------------------------------------------
>>
Toñi,
It sounds like a resource implementation was created that doesn't even
support save. I have a hard time imagining how that would be the case
since all resource implementations except ResourceImpl itself do
implement doSave. Look closely as the extension you're using and what
resource factory is registered for that extension.
Toñi Reina Quintero wrote:
Hi Ed, thanks for answering quickly.
This is a copy of a warning related
to the plugin I've created that appears in the error log view. I hope
this can help to detect the problem
eclipse.buildId=I20070625-1500
java.version=1.6.0-oem
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86
Warning
Thu Aug 07 18:55:36 CEST 2008
java.lang.UnsupportedOperationException
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
at
org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at
org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
If hitting finish seems to do nothing, probably there's an error being
logged in the Error log view that will provide a clue.
Toñi Reina Quintero wrote:
It
seems that man is the only animal that trips twice over the same stone.
Here I am again with the same problem that I had almost two years ago.
I include the question I posted then:
I have written a metamodel and generated
the editor by means of EMF. But the
problem arise when I try to execute the editor and create an instance
of the
metamodel.
I choose New Other MyMetamodelModel, the name of the file, and when I'm
going to choose the model object, althought all the metaclasses defined
in
my metamodel are avalaible, I can't choose anyone, because when I push
the
Finish button, nothing happens.
The problem was that the properties Child, Create Child and Notify of
the root model references were false instead of true.
Right now I'm working with a different model, but I have the same
problem that those days. However, now I have checked the properties and
the
containment, and they have the true value.
Here I attach a piece of the model. The root is the DTD class.
I don't know if the proble is due to the abstract class nature of the
referenced Element.
The .ecore model has been implemented with the topcased ecore editor,
and all the stuff has been automatically generated.
4.At 12:51 PM
on Aug 8, 2008,
Toņi Reina Quintero
wrote:
Re: Problem with the root of a metamodel instance, again.
How can I checked the extension you have
mentioned?
This is the
DTDResourceFactoryImpl that has been generated by EMF, it has not a doSave
method, I don't know if this is really the problem:
It
sounds like a resource implementation was created that doesn't even support
save. I have a hard time imagining how that would be the case since all
resource implementations except ResourceImpl itself do implement doSave.
Look closely as the extension you're using and what resource factory is
registered for that extension.
Toņi Reina Quintero wrote:
Hi Ed, thanks for answering
quickly.
This is a copy of a warning related to the
plugin I've created that appears in the error log view. I hope this can help
to detect the problem
size=2>eclipse.buildId=I20070625-1500
java.version=1.6.0-oem
java.vendor=Sun
Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32,
NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch
x86
Warning
Thu Aug 07 18:55:36 CEST
2008
size=2>
java.lang.UnsupportedOperationException
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
at
org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at
org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at
org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at
org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at
org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at
org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
at
org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at
org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at
java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at
org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at
org.eclipse.equinox.launcher.Main.run(Main.java:1169)
If
hitting finish seems to do nothing, probably there's an error being logged
in the Error log view that will provide a clue.
Toņi Reina
Quintero wrote:
It seems
that man is the only animal that trips twice over the same stone.
Here I am again with the same problem that I had almost two
years ago. I include the question I posted then:
I have written a metamodel and generated the
editor by means of EMF. But the
problem arise when I try to
execute the editor and create an instance of the
metamodel.
I choose New Other MyMetamodelModel, the name of the file, and
when I'm
going to choose the model object, althought all the
metaclasses defined in
my metamodel are avalaible, I can't choose
anyone, because when I push the
Finish button, nothing happens.
The problem was that the properties Child, Create
Child and Notify of the root model references were false instead of
true.
Right now I'm working with a different model, but I have
the same problem that those days. However, now I have checked the
properties and the
containment, and they have the true value.
Here I attach a piece of the model. The root is the DTD class.
I don't know if the proble is due to the abstract class nature
of the referenced Element.
The .ecore model has been implemented
with the topcased ecore editor, and all the stuff has been automatically
generated.
Thanks in advance,
Toņi
src="cid:97C1F8E19A6E4B4DB4ADFD6FB1DB2F71 at lsi dot us dot es">
Re: Problem with the root of a metamodel instance, again.
Toņi,
What does DTDResourceImpl extend? You didn't set the GenPackage's
Resource Type property to "Basic" did you? That would be my guess. I
assume you'd actually want XMI or XML, otherwise you'll need to
implement your own save and load support.
Toņi Reina Quintero wrote:
> How can I checked the extension you have mentioned? This is the
> DTDResourceFactoryImpl that has been generated by EMF, it has not a
> doSave method, I don't know if this is really the problem:
>
> * *
>
> *package* org.mwacsl.dtd.util;
>
> * *
>
> *import* org.eclipse.emf.common.util.URI;
>
> * *
>
> *import* org.eclipse.emf.ecore.resource.Resource;
>
> * *
>
> *import* org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
>
> /**
>
> *
<!-- begin-user-doc -->
>
> * The
Resource Factory
associated with the package.
>
> *
<!-- end-user-doc -->
>
> * *@see* org.mwacsl.dtd.util.DtdResourceImpl
>
> * *@generated*
>
> */
>
> **
>
> *public* *class* DtdResourceFactoryImpl *extends* ResourceFactoryImpl {
>
> /**
>
> * Creates an instance of the resource factory.
>
> *
<!-- begin-user-doc -->
>
> *
<!-- end-user-doc -->
>
> * *@generated*
>
> */
>
> *public* DtdResourceFactoryImpl() {
>
> *super*();
>
> }
>
> /**
>
> * Creates an instance of the resource.
>
> *
<!-- begin-user-doc -->
>
> *
<!-- end-user-doc -->
>
> * *@generated*
>
> */
>
> *public* Resource createResource(URI uri) {
>
> Resource result = *new* DtdResourceImpl(uri);
>
> *return* result;
>
> }
>
> } //DtdResourceFactoryImpl
>
> "Ed Merks"
>
> escribiķ en el mensaje de noticias
> news:g7fned$bjl$2 at build dot eclipse dot org...
> Toņi,
>
> It sounds like a resource implementation was created that doesn't
> even support save. I have a hard time imagining how that would be
> the case since all resource implementations except ResourceImpl
> itself do implement doSave. Look closely as the extension you're
> using and what resource factory is registered for that extension.
>
> Toņi Reina Quintero wrote:
>> Hi Ed, thanks for answering quickly.
>>
>> This is a copy of a warning related to the plugin I've created
>> that appears in the error log view. I hope this can help to
>> detect the problem
>>
>>
>> eclipse.buildId=I20070625-1500
>> java.version=1.6.0-oem
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
>> Command-line arguments: -os win32 -ws win32 -arch x86
>>
>> Warning
>> Thu Aug 07 18:55:36 CEST 2008
>>
>>
>> java.lang.UnsupportedOperationException
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
>> at
>> org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
>> at
>> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
>> at
>> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
>> at
>> org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
>> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
>> at
>> org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253)
>> at
>> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
>> at
>> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
>> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
>> at
>> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
>> at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
>> at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
>> at org.eclipse.jface.window.Window.open(Window.java:796)
>> at
>> org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
>> at
>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
>> at
>> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
>> at
>> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
>> at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
>> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>> at
>> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
>>
>>
>>
>> "Ed Merks"
>
>> escribiķ en el mensaje de noticias
>> news:g7fjbr$n4s$1 at build dot eclipse dot org...
>> Toņi,
>>
>> If hitting finish seems to do nothing, probably there's an
>> error being logged in the Error log view that will provide a
>> clue.
>>
>>
>> Toņi Reina Quintero wrote:
>>> It seems that man is the only animal that trips twice over
>>> the same stone.
>>>
>>> Here I am again with the same problem that I had almost two
>>> years ago. I include the question I posted then:
>>>
>>>
>>>> I have written a metamodel and generated the editor by
>>>> means of EMF. But the
>>>> problem arise when I try to execute the editor and create
>>>> an instance of the
>>>> metamodel.
>>>>
>>>> I choose New Other MyMetamodelModel, the name of the file,
>>>> and when I'm
>>>> going to choose the model object, althought all the
>>>> metaclasses defined in
>>>> my metamodel are avalaible, I can't choose anyone, because
>>>> when I push the
>>>> Finish button, nothing happens.
>>>
>>> The problem was that the properties Child, Create Child and
>>> Notify of the root model references were false instead of true.
>>>
>>> Right now I'm working with a different model, but I have the
>>> same problem that those days. However, now I have checked
>>> the properties and the
>>> containment, and they have the true value.
>>>
>>> Here I attach a piece of the model. The root is the DTD class.
>>>
>>> I don't know if the proble is due to the abstract class
>>> nature of the referenced Element.
>>>
>>> The .ecore model has been implemented with the topcased
>>> ecore editor, and all the stuff has been automatically
>>> generated.
>>>
>>> Thanks in advance,
>>> Toņi
>>> ------------------------------------------------------------------------
>>>
Toñi,
What does DTDResourceImpl extend? You didn't set the GenPackage's
Resource Type property to "Basic" did you? That would be my guess. I
assume you'd actually want XMI or XML, otherwise you'll need to
implement your own save and load support.
Toñi Reina Quintero wrote:
How can I checked the extension you
have mentioned?
This is the
DTDResourceFactoryImpl that has been generated by EMF, it has not a
doSave method, I don't know if this is really the problem:
It sounds like a resource implementation was created that doesn't even
support save. I have a hard time imagining how that would be the case
since all resource implementations except ResourceImpl itself do
implement doSave. Look closely as the extension you're using and what
resource factory is registered for that extension.
Toñi Reina Quintero wrote:
Hi Ed, thanks for answering
quickly.
This is a copy of a warning
related to the plugin I've created that appears in the error log view.
I hope this can help to detect the problem
eclipse.buildId=I20070625-1500
java.version=1.6.0-oem
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86
Warning
Thu Aug 07 18:55:36 CEST 2008
java.lang.UnsupportedOperationException
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
at
org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at
org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
If hitting finish seems to do nothing, probably there's an error being
logged in the Error log view that will provide a clue.
Toñi Reina Quintero wrote:
It seems that man is the only animal that trips twice over
the same stone.
Here I am again with the same problem that I had almost two years ago.
I include the question I posted then:
I have written a metamodel and
generated the editor by means of EMF. But the
problem arise when I try to execute the editor and create an instance
of the
metamodel.
I choose New Other MyMetamodelModel, the name of the file, and when I'm
going to choose the model object, althought all the metaclasses defined
in
my metamodel are avalaible, I can't choose anyone, because when I push
the
Finish button, nothing happens.
The problem was that the properties Child, Create Child and Notify of
the root model references were false instead of true.
Right now I'm working with a different model, but I have the same
problem that those days. However, now I have checked the properties and
the
containment, and they have the true value.
Here I attach a piece of the model. The root is the DTD class.
I don't know if the proble is due to the abstract class nature of the
referenced Element.
The .ecore model has been implemented with the topcased ecore editor,
and all the stuff has been automatically generated.
6.At 1:56 PM
on Aug 8, 2008,
Toņi Reina Quintero
wrote:
Re: Problem with the root of a metamodel instance, again.
Dear Ed,
I have test the same model with
Eclipse Ganymede and the modelling plugins, and in this case the tree editor
works perfectly. So, maybe this can be a mistake detected in an earlier version
of EMF. The version that comes with ganymede is EMF 2.4.0, while the version I
have installed in my "old Eclipse Europa" is EMF 2.3.0. Do you know any bug
related to this problem?
How can I checked the extension you have
mentioned?
This is the
DTDResourceFactoryImpl that has been generated by EMF, it has not a doSave
method, I don't know if this is really the problem:
It
sounds like a resource implementation was created that doesn't even support
save. I have a hard time imagining how that would be the case since
all resource implementations except ResourceImpl itself do implement
doSave. Look closely as the extension you're using and what resource
factory is registered for that extension.
Toņi Reina Quintero wrote:
Hi Ed, thanks for answering
quickly.
This is a copy of a warning related to the
plugin I've created that appears in the error log view. I hope this can
help to detect the problem
size=2>eclipse.buildId=I20070625-1500
java.version=1.6.0-oem
java.vendor=Sun
Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32,
NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch
x86
Warning
Thu Aug 07 18:55:36 CEST
2008
size=2>
java.lang.UnsupportedOperationException
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
at
org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at
org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at
org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at
org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at
org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at
org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
at
org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at
org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at
java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at
org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at
org.eclipse.equinox.launcher.Main.run(Main.java:1169)
If
hitting finish seems to do nothing, probably there's an error being
logged in the Error log view that will provide a clue.
Toņi
Reina Quintero wrote:
It
seems that man is the only animal that trips twice over the same
stone.
Here I am again with the same problem that I had almost
two years ago. I include the question I posted then:
I have written a metamodel and generated the
editor by means of EMF. But the
problem arise when I try to
execute the editor and create an instance of the
metamodel.
I choose New Other MyMetamodelModel, the name of the file,
and when I'm
going to choose the model object, althought all the
metaclasses defined in
my metamodel are avalaible, I can't
choose anyone, because when I push the
Finish button, nothing
happens.
The problem was that the properties
Child, Create Child and Notify of the root model references were false
instead of true.
Right now I'm working with a different model,
but I have the same problem that those days. However, now I have
checked the properties and the
containment, and they have the true
value.
Here I attach a piece of the model. The root is the DTD
class.
I don't know if the proble is due to the abstract class
nature of the referenced Element.
The .ecore model has been
implemented with the topcased ecore editor, and all the stuff has been
automatically generated.
Thanks in advance,
Toņi
src="cid:21D6C49CB2B14D1FAE24DEC7D8BBA223 at lsi dot us dot es">
Re: Problem with the root of a metamodel instance, again.
Toņi,
The newer EMF might well create registrations in the plugin.xml that
don't work with older versions. Use the debugger to see what kind of
resource implementation is being created in the wizard...
Toņi Reina Quintero wrote:
> Dear Ed,
>
> I have test the same model with Eclipse Ganymede and the modelling
> plugins, and in this case the tree editor works perfectly. So, maybe
> this can be a mistake detected in an earlier version of EMF. The
> version that comes with ganymede is EMF 2.4.0, while the version I
> have installed in my "old Eclipse Europa" is EMF 2.3.0. Do you know
> any bug related to this problem?
>
> "Toņi Reina Quintero"
> escribiķ en el mensaje de noticias
> news:g7htip$mio$1 at build dot eclipse dot org...
> How can I checked the extension you have mentioned? This is the
> DTDResourceFactoryImpl that has been generated by EMF, it has not
> a doSave method, I don't know if this is really the problem:
>
> * *
>
> *package* org.mwacsl.dtd.util;
>
> * *
>
> *import* org.eclipse.emf.common.util.URI;
>
> * *
>
> *import* org.eclipse.emf.ecore.resource.Resource;
>
> * *
>
> *import* org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
>
> /**
>
> *
<!-- begin-user-doc -->
>
> * The
Resource Factory
associated with the package.
>
> *
<!-- end-user-doc -->
>
> * *@see* org.mwacsl.dtd.util.DtdResourceImpl
>
> * *@generated*
>
> */
>
> * *
>
> *public* *class* DtdResourceFactoryImpl *extends*
> ResourceFactoryImpl {
>
> /**
>
> * Creates an instance of the resource factory.
>
> *
<!-- begin-user-doc -->
>
> *
<!-- end-user-doc -->
>
> * *@generated*
>
> */
>
> *public* DtdResourceFactoryImpl() {
>
> *super*();
>
> }
>
> /**
>
> * Creates an instance of the resource.
>
> *
<!-- begin-user-doc -->
>
> *
<!-- end-user-doc -->
>
> * *@generated*
>
> */
>
> *public* Resource createResource(URI uri) {
>
> Resource result = *new* DtdResourceImpl(uri);
>
> *return* result;
>
> }
>
> } //DtdResourceFactoryImpl
>
> "Ed Merks"
>
> escribiķ en el mensaje de noticias
> news:g7fned$bjl$2 at build dot eclipse dot org...
> Toņi,
>
> It sounds like a resource implementation was created that
> doesn't even support save. I have a hard time imagining how
> that would be the case since all resource implementations
> except ResourceImpl itself do implement doSave. Look closely
> as the extension you're using and what resource factory is
> registered for that extension.
>
> Toņi Reina Quintero wrote:
>> Hi Ed, thanks for answering quickly.
>>
>> This is a copy of a warning related to the plugin I've
>> created that appears in the error log view. I hope this can
>> help to detect the problem
>>
>>
>> eclipse.buildId=I20070625-1500
>> java.version=1.6.0-oem
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
>> Command-line arguments: -os win32 -ws win32 -arch x86
>>
>> Warning
>> Thu Aug 07 18:55:36 CEST 2008
>>
>>
>> java.lang.UnsupportedOperationException
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
>> at
>> org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
>> at
>> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
>>
Problem with the root of a metamodel instance, again.
At 2:08 PM on Aug 7, 2008, Toņi Reina Quintero wrote:
Here I am again with the same problem that I had almost two years ago. I
include the question I posted then:
>I have written a metamodel and generated the editor by means of EMF. But
>the
> problem arise when I try to execute the editor and create an instance of
> the
> metamodel.
>
> I choose New Other MyMetamodelModel, the name of the file, and when I'm
> going to choose the model object, althought all the metaclasses defined in
> my metamodel are avalaible, I can't choose anyone, because when I push the
> Finish button, nothing happens.
The problem was that the properties Child, Create Child and Notify of the
root model references were false instead of true.
Right now I'm working with a different model, but I have the same problem
that those days. However, now I have checked the properties and the
containment, and they have the true value.
Here I attach a piece of the model. The root is the DTD class.
I don't know if the proble is due to the abstract class nature of the
referenced Element.
The .ecore model has been implemented with the topcased ecore editor, and
all the stuff has been automatically generated.
Thanks in advance,
Toņi
11 replies so far (
Post your own)
Re: Problem with the root of a metamodel instance, again.
Toņi, If hitting finish seems to do nothing, probably there's an error being logged in the Error log view that will provide a clue. Toņi Reina Quintero wrote: > It seems that man is the only animal that trips twice over the same > stone. > > Here I am again with the same problem that I had almost two years ago. > I include the question I posted then: > > >> I have written a metamodel and generated the editor by means of EMF. >> But the >> problem arise when I try to execute the editor and create an instance >> of the >> metamodel. >> >> I choose New Other MyMetamodelModel, the name of the file, and when I'm >> going to choose the model object, althought all the metaclasses >> defined in >> my metamodel are avalaible, I can't choose anyone, because when I >> push the >> Finish button, nothing happens. > > The problem was that the properties Child, Create Child and Notify of > the root model references were false instead of true. > > Right now I'm working with a different model, but I have the same > problem that those days. However, now I have checked the properties > and the > containment, and they have the true value. > > Here I attach a piece of the model. The root is the DTD class. > > I don't know if the proble is due to the abstract class nature of the > referenced Element. > > The .ecore model has been implemented with the topcased ecore editor, > and all the stuff has been automatically generated. > > Thanks in advance, > Toņi > ------------------------------------------------------------------------ >If hitting finish seems to do nothing, probably there's an error being logged in the Error log view that will provide a clue.
Toñi Reina Quintero wrote:
Re: Problem with the root of a metamodel instance, again.
I've created that appears in the error log view. I hope this can help to detect
the problem
java.version=1.6.0-oem
java.vendor=Sun
Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32,
NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch
x86
Thu Aug 07 18:55:36 CEST
2008
java.lang.UnsupportedOperationException
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964)
at
org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at
org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at
org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
at
org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at
org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at
org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
at
org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at
org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at
java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at
org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at
org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Re: Problem with the root of a metamodel instance, again.
Toņi, It sounds like a resource implementation was created that doesn't even support save. I have a hard time imagining how that would be the case since all resource implementations except ResourceImpl itself do implement doSave. Look closely as the extension you're using and what resource factory is registered for that extension. Toņi Reina Quintero wrote: > Hi Ed, thanks for answering quickly. > > This is a copy of a warning related to the plugin I've created that > appears in the error log view. I hope this can help to detect the problem > > > eclipse.buildId=I20070625-1500 > java.version=1.6.0-oem > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES > Command-line arguments: -os win32 -ws win32 -arch x86 > > Warning > Thu Aug 07 18:55:36 CEST 2008 > > > java.lang.UnsupportedOperationException > at > org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285) > at > org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253) > at > org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964) > at > org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242) > at > org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101) > at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797) > at > org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113) > at > org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369) > at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313) > at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934) > at > org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253) > at > org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742) > at > org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373) > at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616) > at > org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) > at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) > at org.eclipse.jface.window.Window.open(Window.java:796) > at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182) > at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) > at > org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) > at > org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) > at > org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) > at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) > at > org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) > at > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at > org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) > at > org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) > at org.eclipse.equinox.launcher.Main.run(Main.java:1169) > > > > "Ed Merks" > > escribiķ en el mensaje de noticias > news:g7fjbr$n4s$1 at build dot eclipse dot org... > Toņi, > > If hitting finish seems to do nothing, probably there's an error > being logged in the Error log view that will provide a clue. > > > Toņi Reina Quintero wrote: >> It seems that man is the only animal that trips twice over the >> same stone. >> >> Here I am again with the same problem that I had almost two years >> ago. I include the question I posted then: >> >> >>> I have written a metamodel and generated the editor by means of >>> EMF. But the >>> problem arise when I try to execute the editor and create an >>> instance of the >>> metamodel. >>> >>> I choose New Other MyMetamodelModel, the name of the file, and >>> when I'm >>> going to choose the model object, althought all the metaclasses >>> defined in >>> my metamodel are avalaible, I can't choose anyone, because when >>> I push the >>> Finish button, nothing happens. >> >> The problem was that the properties Child, Create Child and >> Notify of the root model references were false instead of true. >> >> Right now I'm working with a different model, but I have the same >> problem that those days. However, now I have checked the >> properties and the >> containment, and they have the true value. >> >> Here I attach a piece of the model. The root is the DTD class. >> >> I don't know if the proble is due to the abstract class nature of >> the referenced Element. >> >> The .ecore model has been implemented with the topcased ecore >> editor, and all the stuff has been automatically generated. >> >> Thanks in advance, >> Toņi >> ------------------------------------------------------------------------ >>It sounds like a resource implementation was created that doesn't even support save. I have a hard time imagining how that would be the case since all resource implementations except ResourceImpl itself do implement doSave. Look closely as the extension you're using and what resource factory is registered for that extension.
Toñi Reina Quintero wrote:
Re: Problem with the root of a metamodel instance, again.
mentioned? This is the
DTDResourceFactoryImpl that has been generated by EMF, it has not a doSave
method, I don't know if this is really the problem:
package
org.mwacsl.dtd.util;size=2>
import
org.eclipse.emf.common.util.URI;
size=2>
import
org.eclipse.emf.ecore.resource.Resource;
size=2>
import
org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
/**
size=2>* color=#3f5fbf size=2><!-- begin-user-doc --> size=2>
size=2>* color=#3f5fbf size=2>The size=2> <b> size=2> Resource
size=2>Factory size=2></b> size=2> associated
size=2>with color=#3f5fbf size=2>the size=2> package.
size=2>* color=#3f5fbf size=2><!-- end-user-doc -->
size=2>* color=#7f9fbf size=2>@see color=#3f5fbf size=2> size=2>org.mwacsl.dtd.util.DtdResourceImpl
size=2>* color=#7f9fbf size=2>@generated
size=2>*/ size=2>
public
color=#7f0055 size=2> class size=2> DtdResourceFactoryImpl color=#7f0055 size=2>extends ResourceFactoryImpl{
size=2>/**
size=2>* color=#3f5fbf size=2>Creates color=#3f5fbf size=2> an
size=2>instance size=2> of color=#3f5fbf size=2> the
size=2>resource size=2> factory.
size=2>* color=#3f5fbf size=2><!-- begin-user-doc --> size=2>
size=2>* color=#3f5fbf size=2><!-- end-user-doc -->
size=2>* color=#7f9fbf size=2>@generated
size=2>*/
size=2>public DtdResourceFactoryImpl() {
size=2>super ();
}
size=2>/**
size=2>* color=#3f5fbf size=2>Creates color=#3f5fbf size=2> an
size=2>instance size=2> of color=#3f5fbf size=2> the
size=2>resource.
size=2>* color=#3f5fbf size=2><!-- begin-user-doc --> size=2>
size=2>* color=#3f5fbf size=2><!-- end-user-doc -->
size=2>* color=#7f9fbf size=2>@generated
size=2>*/
size=2>public Resource createResource(URI uri)
{
Resource result =
color=#7f0055 size=2>newDtdResourceImpl(uri);
size=2>return result;
}
}
size=2>//DtdResourceFactoryImplRe: Problem with the root of a metamodel instance, again.
Toņi, What does DTDResourceImpl extend? You didn't set the GenPackage's Resource Type property to "Basic" did you? That would be my guess. I assume you'd actually want XMI or XML, otherwise you'll need to implement your own save and load support. Toņi Reina Quintero wrote: > How can I checked the extension you have mentioned? This is the > DTDResourceFactoryImpl that has been generated by EMF, it has not a > doSave method, I don't know if this is really the problem: > > * * > > *package* org.mwacsl.dtd.util; > > * * > > *import* org.eclipse.emf.common.util.URI; > > * * > > *import* org.eclipse.emf.ecore.resource.Resource; > > * * > > *import* org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; > > /** > > * <!-- begin-user-doc --> > > * The Resource Factory associated with the package. > > * <!-- end-user-doc --> > > * *@see* org.mwacsl.dtd.util.DtdResourceImpl > > * *@generated* > > */ > > ** > > *public* *class* DtdResourceFactoryImpl *extends* ResourceFactoryImpl { > > /** > > * Creates an instance of the resource factory. > > * <!-- begin-user-doc --> > > * <!-- end-user-doc --> > > * *@generated* > > */ > > *public* DtdResourceFactoryImpl() { > > *super*(); > > } > > /** > > * Creates an instance of the resource. > > * <!-- begin-user-doc --> > > * <!-- end-user-doc --> > > * *@generated* > > */ > > *public* Resource createResource(URI uri) { > > Resource result = *new* DtdResourceImpl(uri); > > *return* result; > > } > > } //DtdResourceFactoryImpl > > "Ed Merks" > > escribiķ en el mensaje de noticias > news:g7fned$bjl$2 at build dot eclipse dot org... > Toņi, > > It sounds like a resource implementation was created that doesn't > even support save. I have a hard time imagining how that would be > the case since all resource implementations except ResourceImpl > itself do implement doSave. Look closely as the extension you're > using and what resource factory is registered for that extension. > > Toņi Reina Quintero wrote: >> Hi Ed, thanks for answering quickly. >> >> This is a copy of a warning related to the plugin I've created >> that appears in the error log view. I hope this can help to >> detect the problem >> >> >> eclipse.buildId=I20070625-1500 >> java.version=1.6.0-oem >> java.vendor=Sun Microsystems Inc. >> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES >> Command-line arguments: -os win32 -ws win32 -arch x86 >> >> Warning >> Thu Aug 07 18:55:36 CEST 2008 >> >> >> java.lang.UnsupportedOperationException >> at >> org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285) >> at >> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253) >> at >> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964) >> at >> org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242) >> at >> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101) >> at >> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797) >> at >> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113) >> at >> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369) >> at >> org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313) >> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934) >> at >> org.mwacsl.dtd.presentation.DtdModelWizard.performFinish(DtdModelWizard.java:253) >> at >> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742) >> at >> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373) >> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616) >> at >> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) >> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) >> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) >> at >> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) >> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) >> at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) >> at org.eclipse.jface.window.Window.open(Window.java:796) >> at >> org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182) >> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) >> at >> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) >> at >> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) >> at >> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) >> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) >> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) >> at >> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) >> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) >> at >> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) >> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) >> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) >> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) >> at >> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) >> at >> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) >> at >> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) >> at >> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) >> at >> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) >> at >> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) >> at >> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) >> at >> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) >> at >> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) >> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) >> at org.eclipse.equinox.launcher.Main.run(Main.java:1169) >> >> >> >> "Ed Merks" > >> escribiķ en el mensaje de noticias >> news:g7fjbr$n4s$1 at build dot eclipse dot org... >> Toņi, >> >> If hitting finish seems to do nothing, probably there's an >> error being logged in the Error log view that will provide a >> clue. >> >> >> Toņi Reina Quintero wrote: >>> It seems that man is the only animal that trips twice over >>> the same stone. >>> >>> Here I am again with the same problem that I had almost two >>> years ago. I include the question I posted then: >>> >>> >>>> I have written a metamodel and generated the editor by >>>> means of EMF. But the >>>> problem arise when I try to execute the editor and create >>>> an instance of the >>>> metamodel. >>>> >>>> I choose New Other MyMetamodelModel, the name of the file, >>>> and when I'm >>>> going to choose the model object, althought all the >>>> metaclasses defined in >>>> my metamodel are avalaible, I can't choose anyone, because >>>> when I push the >>>> Finish button, nothing happens. >>> >>> The problem was that the properties Child, Create Child and >>> Notify of the root model references were false instead of true. >>> >>> Right now I'm working with a different model, but I have the >>> same problem that those days. However, now I have checked >>> the properties and the >>> containment, and they have the true value. >>> >>> Here I attach a piece of the model. The root is the DTD class. >>> >>> I don't know if the proble is due to the abstract class >>> nature of the referenced Element. >>> >>> The .ecore model has been implemented with the topcased >>> ecore editor, and all the stuff has been automatically >>> generated. >>> >>> Thanks in advance, >>> Toņi >>> ------------------------------------------------------------------------ >>>What does DTDResourceImpl extend? You didn't set the GenPackage's Resource Type property to "Basic" did you? That would be my guess. I assume you'd actually want XMI or XML, otherwise you'll need to implement your own save and load support.
Toñi Reina Quintero wrote:
Re: Problem with the root of a metamodel instance, again.
Eclipse Ganymede and the modelling plugins, and in this case the tree editor
works perfectly. So, maybe this can be a mistake detected in an earlier version
of EMF. The version that comes with ganymede is EMF 2.4.0, while the version I
have installed in my "old Eclipse Europa" is EMF 2.3.0. Do you know any bug
related to this problem?
Re: Problem with the root of a metamodel instance, again.
Toņi, The newer EMF might well create registrations in the plugin.xml that don't work with older versions. Use the debugger to see what kind of resource implementation is being created in the wizard... Toņi Reina Quintero wrote: > Dear Ed, > > I have test the same model with Eclipse Ganymede and the modelling > plugins, and in this case the tree editor works perfectly. So, maybe > this can be a mistake detected in an earlier version of EMF. The > version that comes with ganymede is EMF 2.4.0, while the version I > have installed in my "old Eclipse Europa" is EMF 2.3.0. Do you know > any bug related to this problem? > > "Toņi Reina Quintero" > escribiķ en el mensaje de noticias > news:g7htip$mio$1 at build dot eclipse dot org... > How can I checked the extension you have mentioned? This is the > DTDResourceFactoryImpl that has been generated by EMF, it has not > a doSave method, I don't know if this is really the problem: > > * * > > *package* org.mwacsl.dtd.util; > > * * > > *import* org.eclipse.emf.common.util.URI; > > * * > > *import* org.eclipse.emf.ecore.resource.Resource; > > * * > > *import* org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; > > /** > > * <!-- begin-user-doc --> > > * The Resource Factory associated with the package. > > * <!-- end-user-doc --> > > * *@see* org.mwacsl.dtd.util.DtdResourceImpl > > * *@generated* > > */ > > * * > > *public* *class* DtdResourceFactoryImpl *extends* > ResourceFactoryImpl { > > /** > > * Creates an instance of the resource factory. > > * <!-- begin-user-doc --> > > * <!-- end-user-doc --> > > * *@generated* > > */ > > *public* DtdResourceFactoryImpl() { > > *super*(); > > } > > /** > > * Creates an instance of the resource. > > * <!-- begin-user-doc --> > > * <!-- end-user-doc --> > > * *@generated* > > */ > > *public* Resource createResource(URI uri) { > > Resource result = *new* DtdResourceImpl(uri); > > *return* result; > > } > > } //DtdResourceFactoryImpl > > "Ed Merks" > > escribiķ en el mensaje de noticias > news:g7fned$bjl$2 at build dot eclipse dot org... > Toņi, > > It sounds like a resource implementation was created that > doesn't even support save. I have a hard time imagining how > that would be the case since all resource implementations > except ResourceImpl itself do implement doSave. Look closely > as the extension you're using and what resource factory is > registered for that extension. > > Toņi Reina Quintero wrote: >> Hi Ed, thanks for answering quickly. >> >> This is a copy of a warning related to the plugin I've >> created that appears in the error log view. I hope this can >> help to detect the problem >> >> >> eclipse.buildId=I20070625-1500 >> java.version=1.6.0-oem >> java.vendor=Sun Microsystems Inc. >> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES >> Command-line arguments: -os win32 -ws win32 -arch x86 >> >> Warning >> Thu Aug 07 18:55:36 CEST 2008 >> >> >> java.lang.UnsupportedOperationException >> at >> org.eclipse.emf.ecore.resource.impl.ResourceImpl.doSave(ResourceImpl.java:1285) >> at >> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1253) >> at >> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:964) >> at >> org.mwacsl.dtd.presentation.DtdModelWizard$2.execute(DtdModelWizard.java:242) >> at >> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101) >> at >> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797) >>