@Override public boolean equals(Object object) { return object instanceof JavaProjectSourceLocation && getJavaProject().equals(((JavaProjectSourceLocation)object).getJavaProject()); }
@Override public boolean equals(Object object) { return object instanceof JavaProjectSourceLocation && getJavaProject().equals(((JavaProjectSourceLocation)object).getJavaProject()); }
@Override public int hashCode() { return getJavaProject().hashCode(); }
@Override public int hashCode() { return getJavaProject().hashCode(); }
@Override public String getMemento() throws CoreException { Document doc = DebugPlugin.newDocument(); Element node = doc.createElement("javaProjectSourceLocation"); //$NON-NLS-1$ doc.appendChild(node); node.setAttribute("name", getJavaProject().getElementName()); //$NON-NLS-1$ return DebugPlugin.serializeDocument(doc); }
@Override public String getMemento() throws CoreException { Document doc = DebugPlugin.newDocument(); Element node = doc.createElement("javaProjectSourceLocation"); //$NON-NLS-1$ doc.appendChild(node); node.setAttribute("name", getJavaProject().getElementName()); //$NON-NLS-1$ return DebugPlugin.serializeDocument(doc); }
/** * @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; }