Skip to content

Commit

Permalink
revert to Iterator to make it compilable with RAP
Browse files Browse the repository at this point in the history
In RAP IStructuredSelection is not an Iterable.

eclipse-rap/org.eclipse.rap#153
  • Loading branch information
LorenzoBettini committed Nov 17, 2023
1 parent 82b2919 commit 10f9b2c
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -17,6 +17,7 @@
package org.eclipse.emf.parsley.composite;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.eclipse.emf.ecore.EObject;
Expand Down Expand Up @@ -105,8 +106,8 @@ protected void setSelection(ISelection structuredSelection) {
private List<Object> unwrapSelection() {
List<Object> l = new ArrayList<>();
if (getSelection() != null && !getSelection().isEmpty() && getSelection() instanceof IStructuredSelection) {
for (Object object : ((IStructuredSelection) getSelection())) {
l.add(object);
for (Iterator<?> iterator = ((IStructuredSelection) getSelection()).iterator(); iterator.hasNext();) {
l.add(iterator.next());
}
}
return l;
Expand Down

0 comments on commit 10f9b2c

Please sign in to comment.