@Override public int hashCode() { return getName().hashCode(); }
@Override public int hashCode() { return getName().hashCode(); }
/** * Returns the archive associated with this source * location. * * @return zip file * @throws IOException if unable to create the zip * file associated with this location */ protected ZipFile getArchive() throws IOException { return getZipFile(getName()); }
/** * Returns the archive associated with this source * location. * * @return zip file * @throws IOException if unable to create the zip * file associated with this location */ protected ZipFile getArchive() throws IOException { return getZipFile(getName()); }
@Override public String getMemento() throws CoreException { Document doc = DebugPlugin.newDocument(); Element node = doc.createElement("archiveSourceLocation"); //$NON-NLS-1$ doc.appendChild(node); node.setAttribute("archivePath", getName()); //$NON-NLS-1$ if (getRootPath() != null) { node.setAttribute("rootPath", getRootPath().toString()); //$NON-NLS-1$ } return DebugPlugin.serializeDocument(doc); }
@Override public String getMemento() throws CoreException { Document doc = DebugPlugin.newDocument(); Element node = doc.createElement("archiveSourceLocation"); //$NON-NLS-1$ doc.appendChild(node); node.setAttribute("archivePath", getName()); //$NON-NLS-1$ if (getRootPath() != null) { node.setAttribute("rootPath", getRootPath().toString()); //$NON-NLS-1$ } return DebugPlugin.serializeDocument(doc); }
} catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR, NLS.bind(LaunchingMessages.ArchiveSourceLocation_Exception_occurred_while_detecting_root_source_directory_in_archive__0__1, new String[] {getName()}), e)); NLS.bind(LaunchingMessages.ArchiveSourceLocation_Exception_occurred_while_detecting_root_source_directory_in_archive__0__2, new String[] {getName()}), e));
} catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR, NLS.bind(LaunchingMessages.ArchiveSourceLocation_Exception_occurred_while_detecting_root_source_directory_in_archive__0__1, new String[] {getName()}), e)); NLS.bind(LaunchingMessages.ArchiveSourceLocation_Exception_occurred_while_detecting_root_source_directory_in_archive__0__2, new String[] {getName()}), e));
/** * @see IWorkbenchAdapter#getLabel(Object) */ public String getLabel(Object o) { if (o instanceof JavaProjectSourceLocation) { return fJavaElementLabelProvider.getText(((JavaProjectSourceLocation)o).getJavaProject()); } else if (o instanceof DirectorySourceLocation) { try { return ((DirectorySourceLocation)o).getDirectory().getCanonicalPath(); } catch (IOException e) { JDIDebugUIPlugin.log(e); return ((DirectorySourceLocation)o).getDirectory().getName(); } } else if (o instanceof ArchiveSourceLocation) { return ((ArchiveSourceLocation)o).getName(); } return null; }
} catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR, NLS.bind(LaunchingMessages.ArchiveSourceLocation_Unable_to_locate_source_element_in_archive__0__1, new String[] {getName()}), e));
} catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR, NLS.bind(LaunchingMessages.ArchiveSourceLocation_Unable_to_locate_source_element_in_archive__0__1, new String[] {getName()}), e));