use of org.eclipse.gemoc.timeline.model.PossibleStep in project gemoc-studio-modeldebugging by eclipse.
the class TimelineWindowEditPart method deepRefresh.
/**
* Refresh {@link EditPart} in depth.
*/
private void deepRefresh() {
refresh();
for (Branch branch : getModelChildren()) {
final EditPart branchEditPart = (EditPart) getViewer().getEditPartRegistry().get(branch);
branchEditPart.refresh();
for (Choice choice : branch.getChoices()) {
final EditPart choiceEditPart = (EditPart) getViewer().getEditPartRegistry().get(choice);
choiceEditPart.refresh();
for (PossibleStep possibleStep : choice.getPossibleSteps()) {
final EditPart possibleStepEditPart = (EditPart) getViewer().getEditPartRegistry().get(possibleStep);
possibleStepEditPart.refresh();
}
}
}
}
use of org.eclipse.gemoc.timeline.model.PossibleStep in project gemoc-studio by eclipse.
the class TimelineEditPartFactory method createEditPart.
@Override
public EditPart createEditPart(EditPart context, Object model) {
final EditPart res;
if (model instanceof PossibleStep) {
res = new PossibleStepEditPart(withLabel);
} else if (model instanceof Connection) {
res = new ConnectionEditPart();
} else if (model instanceof Choice) {
res = new ChoiceEditPart();
} else if (model instanceof Branch) {
res = new BranchEditPart();
} else if (model instanceof TimelineWindow) {
res = new TimelineWindowEditPart();
} else {
throw new IllegalStateException("don't know what to do with " + model.getClass().getName());
}
res.setModel(model);
return res;
}
use of org.eclipse.gemoc.timeline.model.PossibleStep in project gemoc-studio by eclipse.
the class TimelineWindowEditPart method deepRefresh.
/**
* Refresh {@link EditPart} in depth.
*/
private void deepRefresh() {
refresh();
for (Branch branch : getModelChildren()) {
final EditPart branchEditPart = (EditPart) getViewer().getEditPartRegistry().get(branch);
branchEditPart.refresh();
for (Choice choice : branch.getChoices()) {
final EditPart choiceEditPart = (EditPart) getViewer().getEditPartRegistry().get(choice);
choiceEditPart.refresh();
for (PossibleStep possibleStep : choice.getPossibleSteps()) {
final EditPart possibleStepEditPart = (EditPart) getViewer().getEditPartRegistry().get(possibleStep);
possibleStepEditPart.refresh();
}
}
}
}
use of org.eclipse.gemoc.timeline.model.PossibleStep in project gemoc-studio-modeldebugging by eclipse.
the class TimelineEditPartFactory method createEditPart.
@Override
public EditPart createEditPart(EditPart context, Object model) {
final EditPart res;
if (model instanceof PossibleStep) {
res = new PossibleStepEditPart(withLabel);
} else if (model instanceof Connection) {
res = new ConnectionEditPart();
} else if (model instanceof Choice) {
res = new ChoiceEditPart();
} else if (model instanceof Branch) {
res = new BranchEditPart();
} else if (model instanceof TimelineWindow) {
res = new TimelineWindowEditPart();
} else {
throw new IllegalStateException("don't know what to do with " + model.getClass().getName());
}
res.setModel(model);
return res;
}
Aggregations