Commit a694c0b8 authored by Simon Barner's avatar Simon Barner
Browse files

Merge branch '3817' into 'master'

Fixed a problem in finding the corresponding ResourceSchedule

See merge request af3/af3!235
parents a108b91f b29816bb
AF3ScheduleModelElementFactory.java 980a4dcf240aca7294173c150c4a6aba7285b8dd GREEN
MathUtils.java b0be33b10e697504e73e1b5693c36f9c34ddca6f GREEN
ScheduleUtils.java 9d645b67e1379e6ed246fb7679138ff62c5c3282 GREEN
ScheduleUtils.java ce6dae1128b5e50ffca02c4e64dbc7b9b7222876 GREEN
......@@ -50,6 +50,7 @@ import org.fortiss.af3.schedule.model.SystemSchedule;
import org.fortiss.af3.schedule.model.TimeTrigger;
import org.fortiss.af3.schedule.model.Trigger;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.kernel.model.IIdLabeled;
import org.fortiss.tooling.kernel.model.INamedElement;
/**
......@@ -607,8 +608,9 @@ public class ScheduleUtils {
public static ResourceSchedule getResourceSchedule(List<ResourceSchedule> scheduleList,
IPlatformResource modelElement) {
for(Schedule schedule : scheduleList) {
if((schedule instanceof ResourceSchedule) &&
((ResourceSchedule)schedule).getResource().equals(modelElement)) {
if(schedule instanceof ResourceSchedule &&
(((IIdLabeled)(((ResourceSchedule)schedule).getResource()))
.getId() == ((IIdLabeled)modelElement).getId())) {
return (ResourceSchedule)schedule;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment