Skip to content

CD2JavaGenCoCos for the CDGenTool#86

Open
MaxStachon wants to merge 9 commits intodevfrom
msh/cdgen-cocos
Open

CD2JavaGenCoCos for the CDGenTool#86
MaxStachon wants to merge 9 commits intodevfrom
msh/cdgen-cocos

Conversation

@MaxStachon
Copy link
Collaborator

  • CDUniqueAssociation now allows "duplicate" associations with explicitly opposing navigation directions: e.g., A -> B, A <- B.
  • CDUniqueAssociation and CDUniqueAssociationInHierarchy output SourcePosition of the associations

@MaxStachon MaxStachon requested review from luepges and schmalzing and removed request for schmalzing February 6, 2026 15:22
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

❌ Changes break the MontiVerse

Project Status
ocl ⚠️
details
Project Status
montiarc
umlp_experiments
umlp_tool
sd
montifun
fd
automaton
sc
guidsl
artifacts
ocl ⚠️
od
ucd
langexperiments
json
xml
cd2gui
mlc
cd4analysis
monticore_basic

The MontiVerse is a collection of (internal and public) language projects.

import java.util.*;

/**
* Checks that there are not multiple occurrences of the same association between types
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

give an example?
What does "occurrences of the same association " mean?

public void testNonOpposedAssocs3() throws IOException {
String model = "classdiagram DuplicateAssocs {" + " class A; class B;"
+ " association A -> B;" + " association B <- A;" + "}";
runTestForErrorCode(model, ERROR_CODE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to also check for the content of the error message?

Would help making sure the error messages are useful to users of a tool / makes review easier

@luepges
Copy link
Contributor

luepges commented Feb 7, 2026

Example output:

// MyCD.cd
  class A{}
  class B{}
  association knows [1] A -> (a) B[*]; 
  association knows [1] A -> (a) B[*]; // line 89
Execution failed for task ':generateClassDiagrams'.
> A failure occurred while executing de.monticore.cdgen.gradleplugin.CDGenAction
   > MyCD.cd:<89,2>: 0xCDC64: Association name (knows) conflicts with other association (de.monticore.cdassociation._ast.ASTCDAssociation@e6dc45d).
     MyCD.cd:<89,2>: 0xCDCE1: A has duplicate associations at MyCD.cd:<88,2> and MyCD.cd:<89,2>.

@MaxStachon MaxStachon requested a review from luepges March 4, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants