Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » modelling in XSD?
modelling in XSD? [message #56373] Wed, 27 September 2006 13:08 Go to next message
Conor Missing name is currently offline Conor Missing nameFriend
Messages: 159
Registered: July 2009
Senior Member
Hi all,
I'm trying to make a simple model in XSD so i can learn what is happening
in gmf. Just want to the model to have a single node that can be added to
the, with some aritrary attributes. The xsd file is below, I've used it to
create all gmf code that is necessary following the cheat sheets for
mindmap as I go. All seems to be fine until I try to launch the new
eclipse workbench, get msg error exist in required project:
org.eclipse.gmf.simpleg2.diagram. Continue to Launch? When I try to create
a simpleg2 diagram I have internal errors:

java.lang.NullPointerException
at
org.eclipse.emf.transaction.util.TransactionUtil.getEditingD omain(TransactionUtil.java:50)
....
....
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

The same workbench is fine for mindmap diagrams so there must be something
wrong with how I've modelled the xsd (which I thought was just a simpler
version of mindmap so would surely work?)?

XSD FILE:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
xmlns:mindmap="http://www.example.org/mindmap"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">

<xsd:element name="map" type="simpleg:Map"/>


<xsd:complexType name="Map">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="DiaSeg"
type="simpleg:Topic"/>
</xsd:sequence>
<xsd:attribute name="title" type="xsd:string"/>
</xsd:complexType>

<xsd:complexType name="DiaSeg">
<xsd:attribute name="intro" type="simpleg:string"/>
<xsd:attribute name="transcript" type="simpleg:string"/>
<xsd:attribute name="outro" type="simpleg:string"/>
</xsd:complexType>

</xsd:schema>
Re: modelling in XSD? [message #56844 is a reply to message #56373] Thu, 28 September 2006 09:09 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gaff,

> org.eclipse.gmf.simpleg2.diagram. Continue to Launch? When I try to
> create
Looks like you have to resolve compilation problems in generated project
first. Can you take a look on it?

-----------------
Alex Shatalin
Re: modelling in XSD? [message #56975 is a reply to message #56844] Thu, 28 September 2006 11:07 Go to previous messageGo to next message
Conor Missing name is currently offline Conor Missing nameFriend
Messages: 159
Registered: July 2009
Senior Member
Problem is in scr, in the Simple2DiagramEditorUtil.java, under setnull
function, but again if this is all generated code from my model could
someone tell me where I'm going wrong with my model? TY

private static EObject createInitialRoot(DocumentRoot model) {
DocumentRoot docRoot = Simpleg2Factory.eINSTANCE.createDocumentRoot();
docRoot.setnull(model);
return docRoot;
Re: modelling in XSD? [message #57086 is a reply to message #56975] Thu, 28 September 2006 12:37 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gaff,

Looks like you have incorrect (or no) "Element" property specified for Canvas
Mapping. Please, check it in accordance with Tutorial documents and mindmap
XML schema.

-----------------
Alex Shatalin
Re: modelling in XSD? [message #57109 is a reply to message #56975] Thu, 28 September 2006 12:49 Go to previous message
Alexander Haag is currently offline Alexander HaagFriend
Messages: 119
Registered: July 2009
Senior Member
Hi Gaff,

I think I had the same problem once. Could it be, that you have chosen a
wrong DocumentRoot during generation?
I'm not quite sure how I managed to get rid of this error, but maybe you
should delete all generated code and start all over with
EMF-Modelcode-generation and then GMF generation? I know it's
brute-force, but sometimes that should do just right!!

greets Alex

Gaff wrote:
> Problem is in scr, in the Simple2DiagramEditorUtil.java, under setnull
> function, but again if this is all generated code from my model could
> someone tell me where I'm going wrong with my model? TY
>
> private static EObject createInitialRoot(DocumentRoot model) {
> DocumentRoot docRoot =
> Simpleg2Factory.eINSTANCE.createDocumentRoot();
> docRoot.setnull(model);
> return docRoot;
>
>
>
Previous Topic:Sample DB persistence program
Next Topic:How to get node ot non contaiment feauture
Goto Forum:
  


Current Time: Thu Dec 26 21:03:30 GMT 2024

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

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

Back to the top