/*
* @see IStructuredContentProvider#getElements(Object)
*/
@SuppressWarnings("unchecked")
public Object[] getElements(Object element) {
EList elist = new BasicEList();
if (element == null) {
System.err.println("getElements : element null");
} else if (!(element instanceof Model)) {
System.err.println("getElements : element pas de type Model");
} else if (!element.equals(input)) {
System.err.println("getElements : element != input");
} else {
OperationalTransformation opt = null;
try {
List listRoot = ((Model) element).getRoots();
for (Iterator iterator = listRoot.iterator(); iterator
.hasNext()
&& opt == null;) {
EObject myObject = (EObject) iterator.next();
if (myObject instanceof OperationalTransformation)
opt = (OperationalTransformation) myObject;
}
} catch (Exception e) {
UiPlugin.getDefault().getLogger()
.log(java.util.logging.Level.WARNING,
"Unknown error", e);
}
if (opt != null)
elist.add(opt);
}
Object[] res = elist.toArray();
return res;
}