use of name.abuchen.portfolio.model.Adaptable in project portfolio by buchen.
the class SecurityDragListener method getSecurity.
private Security getSecurity() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if (selection.isEmpty())
return null;
Object element = selection.getFirstElement();
if (element instanceof Security) {
return (Security) element;
} else if (element instanceof Adaptable) {
return ((Adaptable) element).adapt(Security.class);
} else {
return null;
}
}
Aggregations