Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsDifferent diagram for one metamodel (ex Architectural and Type Diagram)
https://www.eclipse.org/forums/index.php/mv/msg/183726/582923/#msg_582923
I have the following file annotated EMF.
@namespace(uri="http://a0.ecore", prefix="A0")
@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.
regards
marco]]>marco 2009-11-18T02:46:59-00:00Re: Different diagram for one metamodel (ex Architectural and Type Diagram)
https://www.eclipse.org/forums/index.php/mv/msg/183726/582935/#msg_582935
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