Skip to content
Snippets Groups Projects
Commit 062c2449 authored by dgelessus's avatar dgelessus
Browse files

Fix new compilation errors related to getChildren() list types

The variables expect List<SomeType> exactly, but getChildren() now
returns List<? extends SomeType>, which is not compatible and so causes
a compile error.

I'm guessing that at some point in the past, getChildren() didn't return
the correct generic type, so the intermediate variables with explicit
generic types were added as a workaround. Now that it has a proper
return type, the intermediate variables are no longer necessary.
parent 4056f04d
No related branches found
No related tags found
No related merge requests found
Pipeline #138207 failed
...@@ -95,12 +95,7 @@ public abstract class CounterExamplePropositionFigure extends Figure implements ...@@ -95,12 +95,7 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
final IFigure parent = getParent(); final IFigure parent = getParent();
if (parent != null) { if (parent != null) {
// We know that each element is of type for (IFigure figure : parent.getChildren()) {
// IFigure, but IFigure.getParent() returns just a list
@SuppressWarnings("unchecked")
final List<IFigure> figures = parent.getChildren();
for (IFigure figure : figures) {
if (figure instanceof CounterExamplePropositionFigure) { if (figure instanceof CounterExamplePropositionFigure) {
if (((CounterExamplePropositionFigure) figure) if (((CounterExamplePropositionFigure) figure)
.getModel().equals(proposition)) { .getModel().equals(proposition)) {
......
...@@ -310,12 +310,7 @@ public class CounterExampleTab { ...@@ -310,12 +310,7 @@ public class CounterExampleTab {
treeViewer.refresh(); treeViewer.refresh();
tableViewer.refresh(); tableViewer.refresh();
// We know that each element is of type for (EditPart child : rootEditPart.getChildren()) {
// EditPart, but AbstractEditPart.getChildren() returns just
// a list
@SuppressWarnings("unchecked")
List<EditPart> children = rootEditPart.getChildren();
for (EditPart child : children) {
child.refresh(); child.refresh();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment