本文整理了Java中org.eclipse.debug.core.sourcelookup.containers.ZipEntryStorage.getZipEntry()
方法的一些代码示例,展示了ZipEntryStorage.getZipEntry()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipEntryStorage.getZipEntry()
方法的具体详情如下:
包路径:org.eclipse.debug.core.sourcelookup.containers.ZipEntryStorage
类名称:ZipEntryStorage
方法名:getZipEntry
[英]Returns the entry that contains the source
[中]返回包含源的条目
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.debug.core
@Override
public String getName() {
int index = getZipEntry().getName().lastIndexOf('\\');
if (index == -1) {
index = getZipEntry().getName().lastIndexOf('/');
}
if (index == -1) {
return getZipEntry().getName();
}
return getZipEntry().getName().substring(index + 1);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.debug.core
@Override
public int hashCode() {
return getZipEntry().getName().hashCode();
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.debug.core
@Override
public boolean equals(Object object) {
return object instanceof ZipEntryStorage &&
getArchive().equals(((ZipEntryStorage)object).getArchive()) &&
getZipEntry().getName().equals(((ZipEntryStorage)object).getZipEntry().getName());
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.debug.core
@Override
public InputStream getContents() throws CoreException {
try {
return getArchive().getInputStream(getZipEntry());
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), DebugPlugin.ERROR, SourceLookupMessages.ZipEntryStorage_0, e));
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.debug.core
@Override
public IPath getFullPath() {
return new Path(getArchive().getName()).append(getZipEntry().getName());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
@Override
public String getLabel(Object o) {
if (o instanceof LocalFileStorage) {
LocalFileStorage storage = (LocalFileStorage) o;
IPath path = storage.getFullPath();
return getQualifiedName(path);
}
if (o instanceof ZipEntryStorage) {
ZipEntryStorage storage = (ZipEntryStorage)o;
StringBuffer buffer = new StringBuffer();
buffer.append(storage.getZipEntry().getName());
buffer.append(" - "); //$NON-NLS-1$
buffer.append(storage.getArchive().getName());
return buffer.toString();
}
return IInternalDebugCoreConstants.EMPTY_STRING;
}
/* (non-Javadoc)
代码示例来源:origin: org.eclipse/org.eclipse.jdt.debug.ui
/**
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
public String getText(Object element) {
if (element instanceof IJavaElement) {
return ((IJavaElement)element).getElementName();
} else if (element instanceof ZipEntryStorage) {
ZipEntryStorage storage = (ZipEntryStorage)element;
return storage.getZipEntry().getName();
} else if (element instanceof LocalFileStorage) {
LocalFileStorage storage = (LocalFileStorage)element;
return storage.getName();
}
return super.getText(element);
}
内容来源于网络,如有侵权,请联系作者删除!