Skip to content

Commit

Permalink
rename booable to castable
Browse files Browse the repository at this point in the history
  • Loading branch information
nittka committed Dec 8, 2023
1 parent b21d509 commit c59f926
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public void completePerson_Fictional(EObject model, Assignment assignment, Conte
}

@Override
public void completePerson_Bookable(EObject model, Assignment assignment, ContentAssistContext context,
public void completePerson_Castable(EObject model, Assignment assignment, ContentAssistContext context,
ICompletionProposalAcceptor acceptor) {
mapProposal(Constants._boolean, acceptor, context);
}
Expand Down
2 changes: 1 addition & 1 deletion org.tvtower.db/src/org/tvtower/db/Database.xtext
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ Person:
('title''='title=STRING )?&
('fictional''='fictional=STRING )?&
('levelup''='levelUp=STRING )?&
('bookable''='bookable=STRING )?&
('castable''='castable=STRING )?&
('gender''='gender=STRING )?&
('face_code''='faceCode=STRING )?&
('country''='country=STRING)?&
Expand Down
2 changes: 1 addition & 1 deletion org.tvtower.db/src/org/tvtower/db/constants/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private static Map<EStructuralFeature, TVTHoverInfoCreator> createInfoMap() {
.put($.getEffect_Genre(), programmGenre).put($.getEffect_Time(), timeProvider)
.put($.getEffect_Enable(), _boolean)

.put($.getPerson_Bookable(), _boolean).put($.getPerson_Fictional(), _boolean)
.put($.getPerson_Castable(), _boolean).put($.getPerson_Fictional(), _boolean)
.put($.getPerson_LevelUp(), _boolean).put($.getPerson_Gender(), gender)
.put($.getPerson_Country(), country).put($.getPerson_Job(), job)
.put($.getPersonDetails_Country(), country).put($.getPersonDetails_Gender(), gender)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public void checkGeneral(Person person) {
Constants.job.isValidFlag(person.getJob(), "job", false).ifPresent(e -> error(e, $.getPerson_Job()));
Constants._boolean.isValidValue(person.getFictional(), "fictional", false)
.ifPresent(e -> error(e, $.getPerson_Fictional()));
Constants._boolean.isValidValue(person.getBookable(), "bookable", false)
.ifPresent(e -> error(e, $.getPerson_Bookable()));
Constants._boolean.isValidValue(person.getCastable(), "castable", false)
.ifPresent(e -> error(e, $.getPerson_Castable()));
if (person.getFictional() != null && person.getDetails() != null
&& person.getDetails().getFictional() != null) {
error("fictional defined multiple times", $.getPerson_Fictional());
}
if (!isFictional(person) && "1".equals(person.getBookable())) {
error("non-fictional persons may not be bookable", $.getPerson_Bookable());
if (!isFictional(person) && "1".equals(person.getCastable())) {
error("non-fictional persons may not be castable", $.getPerson_Castable());
}
if (person.getTitle() != null) {
addIssue("title not supported", person, $.getPerson_Title(),
Expand Down Expand Up @@ -81,7 +81,7 @@ public void checkCelebrity(Person person) {
if (!isInsignificant(person)) {
assertNotSet(person.getLevelUp(), "levelup", $.getPerson_LevelUp());

if ("1".equals(person.getBookable())) {
if ("1".equals(person.getCastable())) {
if (!isGenderDefined(person)) {
error("gender must be defined", $.getPerson_Name());
}
Expand Down

0 comments on commit c59f926

Please sign in to comment.