Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Different diagram for one metamodel (ex Architectural and Type Diagram)
Different diagram for one metamodel (ex Architectural and Type Diagram) [message #582923] Wed, 18 November 2009 02:46 Go to next message
marco  is currently offline marco Friend
Messages: 82
Registered: September 2009
Member
hi

I have the following file annotated EMF.
@namespace(uri="http://a0.ecore", prefix="A0")

@gmf(foo="bar")
package A0;

@namespace(uri="core", prefix="core")
package core {
class SAComponent extends Component {
}

@gmf.node(figure="rounded",label="name")
class SAConnector extends Component {
}

@gmf.node(figure="a0_editor.diagram.figures.TypeFigure",label= "name")
class Type extends PropertyHolderElement {
@gmf.link(color="250,100,100")
ref TypedElement[*]#type implementations;
ref Type[*]#subtypes supertypes;
@gmf.link(color="50,200,100",target.decoration="closedarrow ")
ref Type[*]#supertypes subtypes;
}

@gmf.node(figure="rounded",label = "name")
class SAInterface extends InteractionPoint, ArchitecturalElement {
attr SAInterfaceDirection direction;
val Behavior[*] behavior;
}

@gmf.node(figure="rectangle",label="name")
abstract class Component extends ConnectableElement, ArchitecturalElement {
@gmf.compartment(foo="bar", collapsible="true")
val ArchitecturalElement[*] subElement;
}

@gmf.link(style="solid", width="2")
class SAChannel extends SARelationship {
}

abstract class Behavior extends Element {
}

abstract class Business extends Element {
}

abstract class Development extends Element {
}

abstract class Element {
attr String name;
attr String description;
val Development development;
val Business business;
}

@gmf.link(source="from",target="to",label="name")
abstract class Link extends PropertyHolderElement, TypedElement {
attr LinkNavigability navigability;
ref ConnectableElement[1] from;
ref ConnectableElement[1] to;
ref Component fromContext;
ref Component toContext;
}

abstract class ConnectableElement extends Element {
}

@gmf.node(figure="rounded", label="name")
abstract class TypedElement extends Element {
ref Type[*]#implementations type;
}

abstract class PropertyHolderElement extends Element {
val Property[*] properties;
}

@gmf.node(label="name,type,value", figure="rectangle", label.pattern="{1} {0} : {2}")
class Property extends Element {
attr PropertyType type;
attr String value;
}

enum SAInterfaceDirection {
input = 0;
output = 1;
inputOutput = 2;
}

@gmf.node(figure="rectangle", size="20,20", label="name",
label.placement="external", label.icon="false")
abstract class InteractionPoint extends ConnectableElement {
}

enum LinkNavigability {
bidirectional = 0;
unidirectional = 1;
}

@gmf.link(target.decoration="arrow",style="dash")
class SARelationship extends Link, ArchitecturalElement {
}

abstract class Architecture extends PropertyHolderElement {
val ArchitecturalElement[*] subElement;
val Behavior[*] behavior;
val Group[*] groups;
}

@gmf.diagram (foo="bar")
class SoftwareArchitecture extends Architecture {
}

abstract class ArchitecturalElement extends PropertyHolderElement, TypedElement {
}

@gmf.node(figure="ellipse",label = "name")
class Group extends Element {
@gmf.link(style="dot",tool.small.path="/a0_editor.edit/icons/full/obj16/Members.gif ",tool.large.path="/a0_editor.edit/icons/full/obj16/Members.gif ")
ref Element[*] members;
}

@gmf.node(figure="a0_editor.diagram.figures.TypesSpecificationFigure ")
class TypesSpecification {
@gmf.compartment(foo="bar", collapsible="false")
val Type[*] types;
}

class SAType extends Type {
val Behavior[*] behavior;
}

enum PropertyType {
string = 0;
int = 1;
boolean = 2;
reference = 3;
float = 4;
double = 5;
short = 6;
long = 7;
any = 8;
}

class SAStructuredType extends SAType {
@gmf.compartment(collapsible="false")
val ArchitecturalElement[*] subElement;
}

@gmf.link(style="solid")
class SABinding extends SARelationship {
}

}




I wanted to know if by Eugenia I can create two different diagram, since there is the possibility of using one gmf.diagram ...

wish I could manage the architectural elements in a diagram and types to another diagram.
I would like to define two different palette with controls for the items associated with the particular diagram.
I wish that there be a connection between the two diagrams.
For example if I create a new type I wish associate it to an element defined in the architectural diagram.

How can I accomplish this? Knows someone give me a hint?

I tried to follow these two posts, but I did not understand much and I do not think are compatible with the use of Eugenia.

http://wiki.eclipse.org/Diagram_Partitioning

http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams


regards
marco
Re: Different diagram for one metamodel (ex Architectural and Type Diagram) [message #582935 is a reply to message #582923] Wed, 18 November 2009 09:51 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

Eugenia doesn't support diagram partitioning yet but it's in our plans
to add this feature. Please CC yourself
https://bugs.eclipse.org/bugs/show_bug.cgi?id=295271 to keep track of
any progress on this.

Cheers,
Dimitris

marco wrote:
> hi
>
> I have the following file annotated EMF.
> @namespace(uri="http://a0.ecore", prefix="A0")
>
> @gmf(foo="bar")
> package A0;
>
> @namespace(uri="core", prefix="core")
> package core {
> class SAComponent extends Component {
> }
>
> @gmf.node(figure="rounded",label="name")
> class SAConnector extends Component {
> }
>
> @gmf.node(figure="a0_editor.diagram.figures.TypeFigure",label= "name")
> class Type extends PropertyHolderElement {
> @gmf.link(color="250,100,100") ref TypedElement[*]#type
> implementations;
> ref Type[*]#subtypes supertypes;
> @gmf.link(color="50,200,100",target.decoration="closedarrow ")
> ref Type[*]#supertypes subtypes;
> }
>
> @gmf.node(figure="rounded",label = "name")
> class SAInterface extends InteractionPoint, ArchitecturalElement {
> attr SAInterfaceDirection direction;
> val Behavior[*] behavior;
> }
>
> @gmf.node(figure="rectangle",label="name")
> abstract class Component extends ConnectableElement,
> ArchitecturalElement {
> @gmf.compartment(foo="bar", collapsible="true")
> val ArchitecturalElement[*] subElement;
> }
>
> @gmf.link(style="solid", width="2")
> class SAChannel extends SARelationship {
> }
>
> abstract class Behavior extends Element {
> }
>
> abstract class Business extends Element {
> }
>
> abstract class Development extends Element {
> }
>
> abstract class Element {
> attr String name;
> attr String description;
> val Development development;
> val Business business;
> }
>
> @gmf.link(source="from",target="to",label="name")
> abstract class Link extends PropertyHolderElement, TypedElement {
> attr LinkNavigability navigability;
> ref ConnectableElement[1] from;
> ref ConnectableElement[1] to;
> ref Component fromContext;
> ref Component toContext;
> }
>
> abstract class ConnectableElement extends Element {
> }
>
> @gmf.node(figure="rounded", label="name")
> abstract class TypedElement extends Element {
> ref Type[*]#implementations type;
> }
>
> abstract class PropertyHolderElement extends Element {
> val Property[*] properties;
> }
>
> @gmf.node(label="name,type,value", figure="rectangle",
> label.pattern="{1} {0} : {2}")
> class Property extends Element {
> attr PropertyType type;
> attr String value;
> }
>
> enum SAInterfaceDirection {
> input = 0;
> output = 1;
> inputOutput = 2;
> }
>
> @gmf.node(figure="rectangle", size="20,20", label="name",
> label.placement="external", label.icon="false")
> abstract class InteractionPoint extends ConnectableElement {
> }
>
> enum LinkNavigability {
> bidirectional = 0;
> unidirectional = 1;
> }
>
> @gmf.link(target.decoration="arrow",style="dash")
> class SARelationship extends Link, ArchitecturalElement {
> }
>
> abstract class Architecture extends PropertyHolderElement {
> val ArchitecturalElement[*] subElement;
> val Behavior[*] behavior;
> val Group[*] groups;
> }
>
> @gmf.diagram (foo="bar")
> class SoftwareArchitecture extends Architecture {
> }
>
> abstract class ArchitecturalElement extends PropertyHolderElement,
> TypedElement {
> }
>
> @gmf.node(figure="ellipse",label = "name")
> class Group extends Element {
> @gmf.link(style="dot",tool.small.path="/a0_editor.edit/icons/full/obj16/Members.gif
> ",tool.large.path="/a0_editor.edit/icons/full/obj16/Members.gif ")
> ref Element[*] members;
> }
>
> @gmf.node(figure="a0_editor.diagram.figures.TypesSpecificationFigure ")
> class TypesSpecification {
> @gmf.compartment(foo="bar", collapsible="false")
> val Type[*] types;
> }
>
> class SAType extends Type {
> val Behavior[*] behavior;
> }
>
> enum PropertyType {
> string = 0;
> int = 1;
> boolean = 2;
> reference = 3;
> float = 4;
> double = 5;
> short = 6;
> long = 7;
> any = 8;
> }
>
> class SAStructuredType extends SAType {
> @gmf.compartment(collapsible="false")
> val ArchitecturalElement[*] subElement;
> }
>
> @gmf.link(style="solid")
> class SABinding extends SARelationship {
> }
>
> }
>
>
>
>
> I wanted to know if by Eugenia I can create two different diagram, since
> there is the possibility of using one gmf.diagram ...
>
> wish I could manage the architectural elements in a diagram and types to
> another diagram.
> I would like to define two different palette with controls for the items
> associated with the particular diagram.
> I wish that there be a connection between the two diagrams.
> For example if I create a new type I wish associate it to an element
> defined in the architectural diagram.
>
> How can I accomplish this? Knows someone give me a hint?
>
> I tried to follow these two posts, but I did not understand much and I
> do not think are compatible with the use of Eugenia.
>
> http://wiki.eclipse.org/Diagram_Partitioning
>
> http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams
>
>
>
> regards marco


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:Different diagram for one metamodel (ex Architectural and Type Diagram)
Next Topic:[EuGENia]
Goto Forum:
  


Current Time: Thu Mar 28 20:57:51 GMT 2024

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

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

Back to the top