final Object firstElement = ((ITreeSelection) selection)
.getFirstElement();
if (firstElement instanceof IErlElement) {
final IErlElement element = (IErlElement) firstElement;
final IFile file = (IFile) element.getResource();
wranglerSelection = new ErlMemberSelection(element, file,
WranglerUtils.getDocument(file));
} else if (firstElement instanceof IFile) {
final IFile file = (IFile) firstElement;
final IErlModule module = ErlangEngine.getInstance().getModel()
.findModule(file);