marc_3
marc_3

Reputation: 11

Eclipse modeling tool, define a class as a type for an attribut

I try to make a model on eclipse modelling tool and I have in the model a class that use an other class as a type for an attribute. I have made the class definition but I can't find the way to connect them together. I have also made the definition for a method with a parameter with the same class type, but there I've no trouble. The class I use as a Type is in the combo box. How should I do?

Upvotes: 0

Views: 199

Answers (1)

Zoltán Ujhelyi
Zoltán Ujhelyi

Reputation: 13858

If I understand your question correctly, you are trying to create an EMF metamodel, and are using a graphical editor, and try to connect EClasses.

Basically, EMF EClasses can have two kinds of features: EAttributes and EReferences. EAttributes can refer to Java types, like integer or string; while EReferences are used to connect EClasses. In other words, you cannot have an EAttribute refer to another type you added to the diagram; instead you have to create a reference between them.

Upvotes: 1

Related Questions