Skip to content

Commit

Permalink
JNG-5861 transform add remove clear (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg authored Aug 13, 2024
1 parent 898e9db commit 4f6b8db
Show file tree
Hide file tree
Showing 7 changed files with 634 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,13 @@ operation JSL!Modifiable getVAlign(): JSL!Modifier {
operation JSL!Modifiable getLines(): JSL!Modifier {
return (self.modifiers.selectOne(m | m.type == "lines"));
}

@cached
operation JSL!Modifiable getRows(): JSL!Modifier {
return (self.modifiers.selectOne(m | m.type == "rows"));
}

@cached
operation JSL!Modifiable getSelector(): JSL!Modifier {
return (self.modifiers.selectOne(m | m.type == "selector"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ rule AccessPageDefinition
if (table.isDeleteAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationRowDeleteAction", "AccessPageDefinition"));
}
if (table.isAddReferenceAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationOpenAddSelectorAction", "AccessPageDefinition"));
}
if (table.isRemoveReferenceAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationClearAction", "AccessPageDefinition"));
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationBulkRemoveAction", "AccessPageDefinition"));
}
}

t.actions.add(s.equivalent("ViewLinkPageDefinitionBackAction"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ rule RowLinkPageDefinition
if (table.isDeleteAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationRowDeleteAction", "RowLinkPageDefinition"));
}
if (table.isAddReferenceAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationOpenAddSelectorAction", "RowLinkPageDefinition"));
}
if (table.isRemoveReferenceAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationClearAction", "RowLinkPageDefinition"));
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationBulkRemoveAction", "RowLinkPageDefinition"));
}
if (detailLink.isDefined()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationOpenPageAction", "RowLinkPageDefinition"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ rule ViewLinkPageDefinition
if (table.isDeleteAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationRowDeleteAction", "ViewLinkPageDefinition"));
}
if (table.isAddReferenceAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationOpenAddSelectorAction", "ViewLinkPageDefinition"));
}
if (table.isRemoveReferenceAllowed()) {
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationClearAction", "ViewLinkPageDefinition"));
t.actions.add(table.equivalentDiscriminated("ViewTableDeclarationBulkRemoveAction", "ViewLinkPageDefinition"));
}
}

t.actions.add(s.equivalent("ViewLinkPageDefinitionBackAction"));
Expand Down Expand Up @@ -428,7 +435,7 @@ rule ViewLinkDeclarationOpenCreateFormActionDefinition
transform s: JSL!ViewLinkDeclaration
to t: UI!ui::OpenCreateFormActionDefinition {
t.setId(actorDeclaration.name + "/(jsl/" + s.getId() + ")/ViewLinkDeclarationOpenCreateFormActionDefinition");
t.name = s.name + "::Create";
t.name = s.name + "::OpenCreate";
t.isContainedRelationAction = true;

var targetCreateEvent = s.referenceType.getCreateEventDeclaration();
Expand Down
Loading

0 comments on commit 4f6b8db

Please sign in to comment.