@Override public String getName() { return fBase.getName(); }
public String getName() { return fBase.getName(); }
private boolean isFragment(Object input) { if (input instanceof ITypedElement && ((ITypedElement) input).getName().equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) return true; return false; }
@Override public boolean equals(Object other) { if (other instanceof ITypedElement) return fName.equals(((ITypedElement) other).getName()); return super.equals(other); }
public boolean equals(Object other) { if (other instanceof ITypedElement) return fName.equals(((ITypedElement) other).getName()); return super.equals(other); }
public boolean equals(Object other) { if (other instanceof ITypedElement) { String otherName= ((ITypedElement)other).getName(); return getName().equals(otherName); } return super.equals(other); }
@Override public boolean equals(Object other) { if (other instanceof ITypedElement) { String otherName= ((ITypedElement)other).getName(); return getName().equals(otherName); } return super.equals(other); }
/** * Creates a new CompareFileRevisionEditorInput. * @param left * @param right * @param page */ public CompareFileRevisionEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) { super(new CompareConfiguration(), page); this.left = left; this.right = right; setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { left.getName() })); }
/** * Creates a new CompareFileRevisionEditorInput. * @param left * @param right * @param page */ public CompareFileRevisionEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) { super(new CompareConfiguration(), page); this.left = left; this.right = right; setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { left.getName() })); }
private String getLongName(ITypedElement element) { if (element instanceof FileRevisionTypedElement){ FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element; return fileRevisionElement.getPath(); } else if (element instanceof LocalResourceTypedElement){ LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element; return typedContent.getResource().getFullPath().toString(); } return element.getName(); }
private String getLongName(ITypedElement element) { if (element instanceof FileRevisionTypedElement){ FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element; return fileRevisionElement.getPath(); } else if (element instanceof LocalResourceTypedElement){ LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element; return typedContent.getResource().getFullPath().toString(); } return element.getName(); }
private String getLongName(ITypedElement element) { if (element instanceof FileRevisionTypedElement){ FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element; return fileRevisionElement.getPath(); } else if (element instanceof LocalResourceTypedElement){ LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element; return typedContent.getResource().getFullPath().toString(); } return element.getName(); }
@Override public String getName() { // Return the name of the file element as held in the compare input if (input.getLeft() != null && input.getLeft().equals(fileElement)) { return input.getLeft().getName(); } if (input.getRight() != null && input.getRight().equals(fileElement)) { return input.getRight().getName(); } // Fallback call returning name of the main non-null element of the input // see org.eclipse.team.internal.ui.mapping.AbstractCompareInput#getMainElement() return input.getName(); }
private String getShortName(ITypedElement element) { if (element instanceof FileRevisionTypedElement){ FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element; return fileRevisionElement.getName(); } else if (element instanceof LocalResourceTypedElement){ LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element; return typedContent.getResource().getName(); } return element.getName(); }
private String getShortName(ITypedElement element) { if (element instanceof FileRevisionTypedElement){ FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element; return fileRevisionElement.getName(); } else if (element instanceof LocalResourceTypedElement){ LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element; return typedContent.getResource().getName(); } return element.getName(); }
private String getShortName(ITypedElement element) { if (element instanceof FileRevisionTypedElement){ FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element; return fileRevisionElement.getName(); } else if (element instanceof LocalResourceTypedElement){ LocalResourceTypedElement typedContent = (LocalResourceTypedElement) element; return typedContent.getResource().getName(); } return element.getName(); }
void compare(ICompareInput input) { fInput= input; fCompareConfiguration.setLeftLabel(fInput.getLeft().getName()); fCompareConfiguration.setLeftImage(fInput.getLeft().getImage()); fCompareConfiguration.setRightLabel(fInput.getRight().getName()); fCompareConfiguration.setRightImage(fInput.getRight().getImage()); if (fContentPane != null) fContentPane.setInput(fInput); open(); }
void compare(ICompareInput input) { fInput= input; fCompareConfiguration.setLeftLabel(fInput.getLeft().getName()); fCompareConfiguration.setLeftImage(fInput.getLeft().getImage()); fCompareConfiguration.setRightLabel(fInput.getRight().getName()); fCompareConfiguration.setRightImage(fInput.getRight().getImage()); if (fContentPane != null) fContentPane.setInput(fInput); open(); }
void compare(ICompareInput input) { fInput= input; fCompareConfiguration.setLeftLabel(fInput.getLeft().getName()); fCompareConfiguration.setLeftImage(fInput.getLeft().getImage()); fCompareConfiguration.setRightLabel(fInput.getRight().getName()); fCompareConfiguration.setRightImage(fInput.getRight().getImage()); if (fContentPane != null) fContentPane.setInput(fInput); open(); }
private void initLabels(ICompareInput input) { CompareConfiguration cc = getCompareConfiguration(); if (getLeftRevision() != null) { String leftLabel = getFileRevisionLabel(getLeftRevision()); cc.setLeftLabel(leftLabel); } else if (getResource(input) != null) { String label = NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_workspace, new Object[]{ input.getLeft().getName() }); cc.setLeftLabel(label); } if (getRightRevision() != null) { String rightLabel = getFileRevisionLabel(getRightRevision()); cc.setRightLabel(rightLabel); } }