return true;
}
private Collection<ProjectElement> toProjectElements() {
if (getData() instanceof ProjectElement) {
ProjectElement element = (ProjectElement) getData();
return Collections.singleton(element);
}
if (getData() instanceof EObject) {
EObject eobj = (EObject) getData();
while( eobj != null && !(eobj instanceof ProjectElement) )
eobj = eobj.eContainer();
if (eobj instanceof ProjectElement)
return Collections.singleton((ProjectElement) eobj);
return null;
}
Object[] array = null;
if (getData() instanceof Collection< ? >) {
Collection< ? > data = (Collection< ? >) getData();
array=data.toArray();
}
if(getData().getClass().isArray()){
array=(Object[]) getData();
}
if (array != null) {
Collection<ProjectElement> elements = new HashSet<ProjectElement>();
for( Object object : array ) {
if (object instanceof ProjectElement) {
ProjectElement element = (ProjectElement) object;
elements.add(element);
}
if (object instanceof EObject) {
EObject eobj = (EObject) object;