Skip to content

Commit

Permalink
Put comments in packageDeclarationComments only if they are located
Browse files Browse the repository at this point in the history
before package declaration
  • Loading branch information
tsantalis committed Dec 9, 2024
1 parent 5a32cd8 commit f79c2df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/gr/uom/java/xmi/UMLModelASTReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ private void processTypeDeclaration(CompilationUnit cu, TypeDeclaration typeDecl
umlClass.setPackageDeclaration(umlPackage);
umlClass.setPackageDeclarationJavadoc(packageDoc);
for(UMLComment comment : comments) {
if(comment.getLocationInfo().before(locationInfo)) {
if(comment.getLocationInfo().before(umlPackage.getLocationInfo())) {
umlClass.getPackageDeclarationComments().add(comment);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public UMLAbstractClassDiff(UMLAbstractClass originalClass, UMLAbstractClass nex
this.interfaceListDiff = new UMLTypeListDiff(originalClass.getImplementedInterfaces(), nextClass.getImplementedInterfaces());
this.permittedTypeListDiff = new UMLTypeListDiff(originalClass.getPermittedTypes(), nextClass.getPermittedTypes());
processAnnotations();
getCommentListDiff();
}

public List<UMLOperation> getAddedOperations() {
Expand Down

0 comments on commit f79c2df

Please sign in to comment.