Skip to content

Commit

Permalink
fix: hale: Removal of project variable is not persisted on save
Browse files Browse the repository at this point in the history
Removing of a variable via settings dialog is persisted in the project file upon save.

ING-4169
  • Loading branch information
emanuelaepure10 committed Jan 25, 2024
1 parent 06ec4cc commit 6d22cc8
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,18 @@ public void widgetSelected(SelectionEvent e) {
InputDialog dialog = new InputDialog(display.getActiveShell(), "Add new variable",
"Please enter the name of the variable to add", "", new IInputValidator() {

@Override
public String isValid(String newText) {
if (newText == null || newText.isEmpty()) {
return "Variable name must not be empty";
}
else if (variables.containsKey(newText)) {
return "Variable already exists";
}

return null;
}
});
@Override
public String isValid(String newText) {
if (newText == null || newText.isEmpty()) {
return "Variable name must not be empty";
}
else if (variables.containsKey(newText)) {
return "Variable already exists";
}

return null;
}
});
if (dialog.open() == InputDialog.OK) {
String varName = dialog.getValue();
if (varName != null) {
Expand Down Expand Up @@ -205,6 +205,8 @@ public void widgetSelected(SelectionEvent e) {
c.dispose();
}
variables.remove(varName);
varControls.remove(varName);

updateLayout();
changed = true;
}
Expand Down

0 comments on commit 6d22cc8

Please sign in to comment.