Skip to content

Commit

Permalink
Merge pull request xjtu-enre#57 from ba1man/main
Browse files Browse the repository at this point in the history
add 'location' property for Enum Constant entity in result
  • Loading branch information
AlbertMZhou committed Nov 9, 2023
1 parent e9d419b commit 774dbf1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
1 change: 0 additions & 1 deletion src/main/java/entity/adapter/EntityDTOAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ protected void write(JsonWriter out, EnumEntityDTO value) throws IOException {
protected void write(JsonWriter out, EnumConstantEntityDTO value) throws IOException {
writeFile(out, value.getFile());
writeAdditionalBinDTO(out, value.getAdditionalBin());
writeLocationDTO(out, value.getLocation(), "location");
writeHidden(out, value.getHidden());
}

Expand Down
24 changes: 0 additions & 24 deletions src/main/java/entity/dto/EnumConstantEntityDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public class EnumConstantEntityDTO extends InternalEntityDTO {
private String File;
private String hidden;
private AdditionalBinDTO additionalBin;
private LocationDTO location;

public EnumConstantEntityDTO() {
}
Expand All @@ -32,21 +31,6 @@ public EnumConstantEntityDTO(
this.additionalBin = additionalBin;
}

public EnumConstantEntityDTO(int id,
String name,
String qualifiedName,
int parentId,
String file,
String hidden,
AdditionalBinDTO additionalBin,
LocationDTO location) {
super(id, name, qualifiedName, parentId, "Enum Constant");
this.File = file;
this.hidden = hidden;
this.additionalBin = additionalBin;
this.location = location;
}

public EnumConstantEntityDTO(
int id,
String name,
Expand Down Expand Up @@ -83,12 +67,4 @@ public String getHidden() {
public void setHidden(String hidden) {
this.hidden = hidden;
}

public LocationDTO getLocation() {
return location;
}

public void setLocation(LocationDTO location) {
this.location = location;
}
}
2 changes: 1 addition & 1 deletion src/main/java/util/EnreFormatParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private static EntityDTO parseEntityDTO(JSONObject variableObj) {
break;
case "Enum Constant":
res =
new EnumConstantEntityDTO(id, name, qualifiedName, parentId, file, hidden, additionalBinDTO, locationDTO);
new EnumConstantEntityDTO(id, name, qualifiedName, parentId, file, hidden, additionalBinDTO);
break;
case "Annotation":
res =
Expand Down

0 comments on commit 774dbf1

Please sign in to comment.