IResourceModelElement sourceElement;
IResource resource = null;
ZipEntryStorage zipEntryStorage = null;
int line;
if (element instanceof ISourceModelElement) {
ISourceModelElement source = (ISourceModelElement) element;
sourceElement = source.getElementSourceElement();
line = source.getElementStartLine();
Resource res = source.getElementSourceLocation().getResource();
if (res instanceof IAdaptable) {
resource = (IResource) ((IAdaptable) res)
.getAdapter(IResource.class);
zipEntryStorage = (ZipEntryStorage) ((IAdaptable) res)
.getAdapter(ZipEntryStorage.class);