Usages of

com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Item.isBranch()
@Override public Image getColumnImage(final Object element, final int columnIndex) { if (columnIndex != 0) { return null; } final String serverItem = (String) element; final List<PendingSet> pendingSetList = pendingChangesMap != null ? pendingChangesMap.get(serverItem) : null; final Item item = (itemsMap == null || itemsMap.size() == 0) ? null : itemsMap.get(serverItem); if ((pendingSetList == null || pendingSetList.size() == 0 || pendingSetList.get(0).getPendingChanges().length == 0) && (item == null)) { return null; } if (ServerPath.equals(ServerPath.ROOT, serverItem)) { return imageHelper.getImage("images/common/team_foundation_server.gif"); //$NON-NLS-1$ } else if (ServerPath.equals(serverItem, ServerPath.getTeamProject(serverItem))) { return imageHelper.getImage("images/common/team_project.gif"); //$NON-NLS-1$ } else { if (pendingSetList != null) { /* Note: this should match quickly. */ for (final PendingSet pendingSet : pendingSetList) { boolean foundServerItem = false; for (final PendingChange pendingChange : pendingSet.getPendingChanges()) { if ((pendingChange.getServerItem() != null && ServerPath.equals(pendingChange.getServerItem(), serverItem)) || (pendingChange.getSourceServerItem() != null && ServerPath.equals(pendingChange.getSourceServerItem(), serverItem))) { foundServerItem = true; if (pendingChange.getItemType().equals(ItemType.FOLDER)) { return getImageForFolder(); } } } if (foundServerItem) { break; } } } else { if (item.getItemType().equals(ItemType.FOLDER) && item.isBranch()) { return imageHelper.getImage("images/vc/folder_branch.gif"); //$NON-NLS-1$ } else if (item.getItemType().equals(ItemType.FOLDER)) { return getImageForFolder(); } } } return getImageForFile(ServerPath.getFileName(serverItem)); }
@Override public Image getColumnImage(final Object element, final int columnIndex) { if (columnIndex != 0) { return null; } final Item item = (Item) element; if (ItemType.FOLDER == item.getItemType() && item.isBranch()) { return imageHelper.getImage("images/vc/folder_branch.gif"); //$NON-NLS-1$ } if (ServerPath.equals(ServerPath.ROOT, item.getServerItem())) { return imageHelper.getImage("images/common/team_foundation_server.gif"); //$NON-NLS-1$ } else if (ServerPath.equals(item.getServerItem(), ServerPath.getTeamProject(item.getServerItem()))) { return imageHelper.getImage("images/common/team_project.gif"); //$NON-NLS-1$ } else if (ItemType.FOLDER == item.getItemType()) { return getImageForFolder(); } return getImageForFile(ServerPath.getFileName(item.getServerItem())); }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes