Skip to content

Commit

Permalink
adds missing interface
Browse files Browse the repository at this point in the history
  • Loading branch information
crissNb committed Feb 12, 2024
1 parent 91794a3 commit 2094392
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/gecko/viewmodel/ViewModelFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ public SystemConnectionViewModel createSystemConnectionViewModelFrom(
return result;
}

/**
* Expects the source and destination of the system connection to be in the view model.
*/
public SystemConnectionViewModel createSystemConnectionViewModelFrom(
SystemConnection systemConnection) throws MissingViewModelElementException {
return createSystemConnectionViewModelFrom(geckoViewModel.getCurrentEditor().getCurrentSystem().getTarget(),
systemConnection);
}

public SystemViewModel createSystemViewModelIn(SystemViewModel parentSystem) throws ModelException {
System system = modelFactory.createSystem(parentSystem.getTarget());
SystemViewModel result = new SystemViewModel(getNewViewModelElementId(), system);
Expand Down

0 comments on commit 2094392

Please sign in to comment.