IFile file;
if (object instanceof IFile) {
file = (IFile) object;
} else if (object instanceof IPapyrusFile) {
IPapyrusFile papyrusFile = (IPapyrusFile) object;
file = ClassicalBUtils.getUMLFile(papyrusFile);
} else {
MessageDialog.openWarning(shell, "Transformation can't be called on: ", object.getClass().getName());
return null;
}