Creating Generalization Relation between Elements

UML related questions and discussions

Moderator: Moderators

Creating Generalization Relation between Elements

Postby » Tue Mar 15, 2022 4:07 am

Hello everybody,

I'm trying to create Plugin in which I can automatically create a Generalization Relation between two Elements.
Does anyone know how this works ?
The Relation shall be created between two Elements <<Class>> which I can already select via ElementSelectionDLG.
Is it possible to created these Relations or can they only be created between Classifiers.

Below you can see my first trys which didn't work. (since I'm new to writin Plugins any help would be appreciated)

List<PresentationElement> views = getSelected();
BaseElement auswahl = getGeneralElement();

Classifier specific = ClassifierFinder.findClassifier(project, views.get(0).getHumanName(), new java.lang.Class[] {java.lang.Class.class}, metas,null);
Classifier general = ClassifierFinder.findClassifier(project, auswahl.getHumanName(), new java.lang.Class[] {java.lang.Class.class}, metas,null);
//Generalization nGeneralisierung = GeneralizationClass.createGeneralization();
Generalization Generalisierung = ClassifierHelper.findGeneralization(general, specific);
Forum Newbie
Forum Newbie
Posts: 1
Posts Rating:0
Joined: Tue Mar 15, 2022 3:54 am

Return to Software Modeling (UML)

Who is online

Users browsing this forum: No registered users and 0 guests