Skip to content

Commit

Permalink
[MPH-183] Add getLocationKeys for help plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovds committed Mar 15, 2024
1 parent b50cda2 commit 9881c22
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mdo/model-v3.vm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#set ( $dummy = $imports.add( "java.util.HashMap" ) )
#set ( $dummy = $imports.add( "java.util.List" ) )
#set ( $dummy = $imports.add( "java.util.Map" ) )
#set ( $dummy = $imports.add( "java.util.Set" ) )
#set ( $dummy = $imports.add( "java.util.Objects" ) )
#set ( $dummy = $imports.add( "java.util.stream.Collectors" ) )
#set ( $dummy = $imports.add( "java.util.stream.Stream" ) )
Expand Down Expand Up @@ -292,6 +293,10 @@ public class ${class.name}
.importedFrom(location.toApiLocation()).build());
}

public Set<Object> getLocationKeys() {
return getDelegate().getLocationKeys();
}

#end
protected boolean replace(Object oldDelegate, Object newDelegate) {
if (super.replace(oldDelegate, newDelegate)) {
Expand Down
8 changes: 8 additions & 0 deletions src/mdo/model.vm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#set ( $dummy = $imports.add( "java.util.Collections" ) )
#set ( $dummy = $imports.add( "java.util.HashMap" ) )
#set ( $dummy = $imports.add( "java.util.Map" ) )
#set ( $dummy = $imports.add( "java.util.Set" ) )
#set ( $dummy = $imports.add( "org.apache.maven.api.annotations.Experimental" ) )
#set ( $dummy = $imports.add( "org.apache.maven.api.annotations.Generated" ) )
#set ( $dummy = $imports.add( "org.apache.maven.api.annotations.Immutable" ) )
Expand Down Expand Up @@ -257,6 +258,13 @@ public class ${class.name}
return locations != null ? locations.get(key) : null;
}

/**
* Gets the keys of the locations of the input source.
*/
public Set<Object> getLocationKeys() {
return locations != null ? locations.keySet() : null;
}

/**
* Gets the input location that caused this model to be read.
*/
Expand Down

0 comments on commit 9881c22

Please sign in to comment.