Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Problem with Creating Children You Didn't Know Existed
Problem with Creating Children You Didn't Know Existed [message #666543] Wed, 20 April 2011 20:09 Go to next message
Eclipse UserFriend
Originally posted by: jconlon.apache.org

Building a model based on the OpenGIS KML with Google's kml extensions.
This requires 4 schema definitions that I have annotated for Ecore.

The (OpenGIS) Kml schema extends an AuthorLink schema and it also
extends a XAL schema. The (Google extensions) Kml22gx extends the Kml
schema.

All seem to work fine, except for the editor and adding children. I
would like to be able to see 'Children that Kml elements didn't know
existed (Kml22gx child) elements show up in new Child menus of the
editor for KML elements.

So in following the 'Creating Children You Didn't Know Existed' tip, I
set the genModel to 'Child Creation Extenders'=false & 'Extensible
Provider Factory'=true for XAL, AuthorLink, and Kml schemas and for
the Kml22gx I set 'Child Creation Extenders'=true & 'Extensible Provider
Factory'=false.

But when I try to generate the edit code for the kml22gx I get a NPE.


------------
eclipse.buildId=M20100909-0800
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.modeling.product
Command-line arguments: -os linux -ws gtk -arch x86 -product
org.eclipse.epp.package.modeling.product

java.lang.NullPointerException
at
org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.g etExtendedChildCreationData(GenPackageImpl.java:4576)
at
org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageG eneratorAdapter.countCreateChildIcons(GenPackageGeneratorAda pter.java:730)
at
org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageG eneratorAdapter.generateEdit(GenPackageGeneratorAdapter.java :687)
at
org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGene ratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:225)
at
org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAda pter.generate(AbstractGeneratorAdapter.java:290)
at
org.eclipse.emf.codegen.ecore.generator.Generator.generate(G enerator.java:617)
at
org.eclipse.emf.codegen.ecore.genmodel.presentation.Generato rUIUtil$GeneratorOperation.execute(GeneratorUIUtil.java:167)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1975)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:118)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)


any ideas what I may be doing wrong?

thanks for any help,
John
Re: Problem with Creating Children You Didn't Know Existed [message #666640 is a reply to message #666543] Thu, 21 April 2011 12:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
John,

I don't see anything obvious to explain the NPE...


John E. Conlon wrote:
> Building a model based on the OpenGIS KML with Google's kml
> extensions. This requires 4 schema definitions that I have annotated
> for Ecore.
>
> The (OpenGIS) Kml schema extends an AuthorLink schema and it also
> extends a XAL schema. The (Google extensions) Kml22gx extends the Kml
> schema.
>
> All seem to work fine, except for the editor and adding children. I
> would like to be able to see 'Children that Kml elements didn't know
> existed (Kml22gx child) elements show up in new Child menus of the
> editor for KML elements.
>
> So in following the 'Creating Children You Didn't Know Existed' tip, I
> set the genModel to 'Child Creation Extenders'=false & 'Extensible
> Provider Factory'=true for XAL, AuthorLink, and Kml schemas and for
> the Kml22gx I set 'Child Creation Extenders'=true & 'Extensible
> Provider Factory'=false.
>
> But when I try to generate the edit code for the kml22gx I get a NPE.
>
>
> ------------
> eclipse.buildId=M20100909-0800
> java.version=1.6.0_20
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
> Framework arguments: -product org.eclipse.epp.package.modeling.product
> Command-line arguments: -os linux -ws gtk -arch x86 -product
> org.eclipse.epp.package.modeling.product
>
> java.lang.NullPointerException
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.g etExtendedChildCreationData(GenPackageImpl.java:4576)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageG eneratorAdapter.countCreateChildIcons(GenPackageGeneratorAda pter.java:730)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageG eneratorAdapter.generateEdit(GenPackageGeneratorAdapter.java :687)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGene ratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:225)
>
> at
> org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAda pter.generate(AbstractGeneratorAdapter.java:290)
>
> at
> org.eclipse.emf.codegen.ecore.generator.Generator.generate(G enerator.java:617)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.presentation.Generato rUIUtil$GeneratorOperation.execute(GeneratorUIUtil.java:167)
>
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1975)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:118)
>
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
>
>
>
> any ideas what I may be doing wrong?
>
> thanks for any help,
> John


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problem with Creating Children You Didn't Know Existed [message #666689 is a reply to message #666640] Thu, 21 April 2011 15:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jconlon.apache.org

Hi Ed,

Any suggestions how I could troubleshoot this? Would like to see what
this would look like in a debugger, but at a loss on how to do it.

thanks,
John


Ed Merks wrote:
> John,
>
> I don't see anything obvious to explain the NPE...
>
>
> John E. Conlon wrote:
>> Building a model based on the OpenGIS KML with Google's kml
>> extensions. This requires 4 schema definitions that I have annotated
>> for Ecore.
>>
>> The (OpenGIS) Kml schema extends an AuthorLink schema and it also
>> extends a XAL schema. The (Google extensions) Kml22gx extends the Kml
>> schema.
>>
>> All seem to work fine, except for the editor and adding children. I
>> would like to be able to see 'Children that Kml elements didn't know
>> existed (Kml22gx child) elements show up in new Child menus of the
>> editor for KML elements.
>>
>> So in following the 'Creating Children You Didn't Know Existed' tip, I
>> set the genModel to 'Child Creation Extenders'=false & 'Extensible
>> Provider Factory'=true for XAL, AuthorLink, and Kml schemas and for
>> the Kml22gx I set 'Child Creation Extenders'=true & 'Extensible
>> Provider Factory'=false.
>>
>> But when I try to generate the edit code for the kml22gx I get a NPE.
>>
>>
>> ------------
>> eclipse.buildId=M20100909-0800
>> java.version=1.6.0_20
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>> Framework arguments: -product org.eclipse.epp.package.modeling.product
>> Command-line arguments: -os linux -ws gtk -arch x86 -product
>> org.eclipse.epp.package.modeling.product
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.g etExtendedChildCreationData(GenPackageImpl.java:4576)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageG eneratorAdapter.countCreateChildIcons(GenPackageGeneratorAda pter.java:730)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageG eneratorAdapter.generateEdit(GenPackageGeneratorAdapter.java :687)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGene ratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:225)
>>
>> at
>> org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAda pter.generate(AbstractGeneratorAdapter.java:290)
>>
>> at
>> org.eclipse.emf.codegen.ecore.generator.Generator.generate(G enerator.java:617)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.presentation.Generato rUIUtil$GeneratorOperation.execute(GeneratorUIUtil.java:167)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106)
>>
>> at
>> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1975)
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:118)
>>
>> at
>> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
>>
>>
>>
>> any ideas what I may be doing wrong?
>>
>> thanks for any help,
>> John
Re: Problem with Creating Children You Didn't Know Existed [message #666698 is a reply to message #666689] Thu, 21 April 2011 16:43 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
John,

Assuming you have the Eclipse SDK installed, if you started a new
Eclipse under debug control you could find the source for this line and
see that's going on. You could import your projects into that workspace
and reproduce the problem...

Cheers,
Ed


John E. Conlon wrote:
> Hi Ed,
>
> Any suggestions how I could troubleshoot this? Would like to see what
> this would look like in a debugger, but at a loss on how to do it.
>
> thanks,
> John
>
>
> Ed Merks wrote:
>> John,
>>
>> I don't see anything obvious to explain the NPE...
>>
>>
>> John E. Conlon wrote:
>>> Building a model based on the OpenGIS KML with Google's kml
>>> extensions. This requires 4 schema definitions that I have annotated
>>> for Ecore.
>>>
>>> The (OpenGIS) Kml schema extends an AuthorLink schema and it also
>>> extends a XAL schema. The (Google extensions) Kml22gx extends the
>>> Kml schema.
>>>
>>> All seem to work fine, except for the editor and adding children. I
>>> would like to be able to see 'Children that Kml elements didn't know
>>> existed (Kml22gx child) elements show up in new Child menus of the
>>> editor for KML elements.
>>>
>>> So in following the 'Creating Children You Didn't Know Existed' tip,
>>> I set the genModel to 'Child Creation Extenders'=false & 'Extensible
>>> Provider Factory'=true for XAL, AuthorLink, and Kml schemas and for
>>> the Kml22gx I set 'Child Creation Extenders'=true & 'Extensible
>>> Provider Factory'=false.
>>>
>>> But when I try to generate the edit code for the kml22gx I get a NPE.
>>>
>>>
>>> ------------
>>> eclipse.buildId=M20100909-0800
>>> java.version=1.6.0_20
>>> java.vendor=Sun Microsystems Inc.
>>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
>>> Framework arguments: -product org.eclipse.epp.package.modeling.product
>>> Command-line arguments: -os linux -ws gtk -arch x86 -product
>>> org.eclipse.epp.package.modeling.product
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.g etExtendedChildCreationData(GenPackageImpl.java:4576)
>>>
>>> at
>>> org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageG eneratorAdapter.countCreateChildIcons(GenPackageGeneratorAda pter.java:730)
>>>
>>> at
>>> org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageG eneratorAdapter.generateEdit(GenPackageGeneratorAdapter.java :687)
>>>
>>> at
>>> org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGene ratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:225)
>>>
>>> at
>>> org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAda pter.generate(AbstractGeneratorAdapter.java:290)
>>>
>>> at
>>> org.eclipse.emf.codegen.ecore.generator.Generator.generate(G enerator.java:617)
>>>
>>> at
>>> org.eclipse.emf.codegen.ecore.genmodel.presentation.Generato rUIUtil$GeneratorOperation.execute(GeneratorUIUtil.java:167)
>>>
>>> at
>>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106)
>>>
>>> at
>>> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1975)
>>> at
>>> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:118)
>>>
>>> at
>>> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
>>>
>>>
>>>
>>> any ideas what I may be doing wrong?
>>>
>>> thanks for any help,
>>> John


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Optimize menu entries
Next Topic:[Teneo] Containment in superclass causes foreign key issues using TABLE_PER_CLASS
Goto Forum:
  


Current Time: Thu Apr 25 22:43:35 GMT 2024

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

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

Back to the top