Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Usecase Diagram Editor using GMF
Usecase Diagram Editor using GMF [message #179832] Mon, 31 March 2008 02:09 Go to next message
Eclipse UserFriend
Originally posted by: joeczucha.hotmail.com

Hi guys,

I'm quite new to GMF so you'll have to excuse my ignorance :)

I've been attempting (for quite a few weeks now) to create a Use-case
Diagram editor using the GMF so that I can get to grips with how the XML
Schema maps affects the end diagram editor...

This is the XML Schema I have written, which I thought was correct:

--- START OF SCHEMA ---

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:wincase="http://www.wincase.dcs.shef.ac.uk/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.wincase.dcs.shef.ac.uk/">

<xsd:complexType name="Wincase">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="useCaseDiagram"
type="wincase:UseCaseDiagram"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="UseCaseDiagram">
<xsd:sequence>
<xsd:element maxOccurs="1" name="system" type="wincase:System"/>
<xsd:element maxOccurs="unbounded" name="Actor" type="wincase:Actor"/>
<xsd:element maxOccurs="unbounded" name="association"
type="wincase:Association"/>

</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="System">
<xsd:sequence>
<xsd:element name="title" type="xsd:string"/>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="usecase"
type="wincase:Usecase"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="Actor">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="Usecase">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="Association">
<xsd:sequence>
<xsd:element name="Source" type="wincase:Actor"/>
<xsd:element name="Target" type="wincase:Usecase"/>
</xsd:sequence>
</xsd:complexType>

</xsd:schema>

...but i'm experiencing some issues which I hoped somebody may be able to
advise me on :)

1) When I create the Graphical Definition the wizard (making
UseCaseDiagram) the diagram element) it correctly identifies the Actor,
System and Usecase elements as nodes, but it also identifies the
Association element as a node which should be a connector (so I have to
make it one manually). It does correctly identifies their subsequent
labels.

2) It does the same when you create the Tooling definition, again having
to select it manually.

3) Lots more tweaking needed when you create the Mapping definition and it
always gets the System and Actor Diagram Nodes mixed up.

I then generate the generator model and run it as a plug-in and it half
works - lets you create Actors and Systems, Usecases can't be made for
some reason and no chance to try Association without it.

Anyway if anyone could share any light on it i'd really appreciate it, i'm
probably missing something obvious.

Cheers in advance :D
Re: Usecase Diagram Editor using GMF [message #179842 is a reply to message #179832] Mon, 31 March 2008 02:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: joeczucha.hotmail.com

Ah, also theres an error "Top level node 'Containment Feature' must be
available in the diagram 'Domain Element' or its super-class" when you
createt the generator model from the Mapping definition.
Re: Usecase Diagram Editor using GMF [message #179930 is a reply to message #179832] Mon, 31 March 2008 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

About the wizards creation, I have the same behaviour on my schemas. I think
that wizards are not able to correctly identifies nodes and links. You just
have to make it by hand as you do....

About you issue, I think you have to add a GMF compartment in your
"useCaseDiagram" object (like on the "Topic" object in the GMF tutorial part
2 http://wiki.eclipse.org/index.php/GMF_Tutorial_Part_2#Compar tments). This
compartment will contains your "System" and "Actor" objects. Also, make
sure, that you selected "Wincase" object as the Diagram Root Element.

Hope it's help,

Fabrice Dubach



"Joe Czucha" <joeczucha@hotmail.com> a
Re: Usecase Diagram Editor using GMF [message #180132 is a reply to message #179930] Tue, 01 April 2008 10:05 Go to previous message
Eclipse UserFriend
Originally posted by: joeczucha.gmail.com

Thanks for your advice Fabrice :) with regards to the issue it seems that
this is a known bug:

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

Hopefully it'll get sorted soon!

Thanks again,

Joe
Previous Topic:emf tree in outline view
Next Topic:Resource$IOWrappedException while saving the domain resource
Goto Forum:
  


Current Time: Sun Jun 08 06:40:59 EDT 2025

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

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

Back to the top