diff options
author | Michael Valenta | 2007-06-21 13:50:40 +0000 |
---|---|---|
committer | Michael Valenta | 2007-06-21 13:50:40 +0000 |
commit | 1d706aeacbd76a182a79a59f3bcbcc9abaa5590a (patch) | |
tree | e97be865f106d69778c4ab9710d126ee6b9db246 /bundles/org.eclipse.team.cvs.ui | |
parent | d44b719b3508c6e44a94ff4d7a5bd7f660d2604c (diff) | |
download | eclipse.platform.team-1d706aeacbd76a182a79a59f3bcbcc9abaa5590a.tar.gz eclipse.platform.team-1d706aeacbd76a182a79a59f3bcbcc9abaa5590a.tar.xz eclipse.platform.team-1d706aeacbd76a182a79a59f3bcbcc9abaa5590a.zip |
Bug 70893 [Decorators] Don't show repository if same as project name
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui')
-rw-r--r-- | bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java index 9aa2e23fb..cc42e8df6 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,13 +11,7 @@ package org.eclipse.team.internal.ccvs.ui; -import com.ibm.icu.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Locale; -import java.util.Set; +import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.resources.mapping.*; @@ -45,6 +39,8 @@ import org.eclipse.ui.PlatformUI; import org.eclipse.ui.themes.ITheme; import org.osgi.framework.Bundle; +import com.ibm.icu.text.SimpleDateFormat; + public class CVSLightweightDecorator extends LabelProvider implements ILightweightLabelDecorator, IResourceStateChangeListener, IPropertyChangeListener { // Decorator id as defined in the decorator extension point @@ -361,7 +357,10 @@ public class CVSLightweightDecorator extends LabelProvider implements ILightweig FolderSyncInfo folderInfo = folder.getFolderSyncInfo(); if (folderInfo != null) { cvsDecoration.setLocation(KnownRepositories.getInstance().getRepository(folderInfo.getRoot())); - cvsDecoration.setRepository(folderInfo.getRepository()); + + // Ignore the relative 'repository' path if it is the same locally + if (!resource.getFullPath().toString().startsWith(folderInfo.getRepository(), 1)) + cvsDecoration.setRepository(folderInfo.getRepository()); cvsDecoration.setVirtualFolder(folderInfo.isVirtualDirectory()); } } |