Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 119149 Details for
Bug 80577
[Repo View] Author not shown in remote compares
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch_v01
80577_v01.txt (text/plain), 13.56 KB, created by
Pawel Pogorzelski
on 2008-12-01 10:10:42 EST
(
hide
)
Description:
Patch_v01
Filename:
MIME Type:
Creator:
Pawel Pogorzelski
Created:
2008-12-01 10:10:42 EST
Size:
13.56 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.cvs.ui >Index: src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java,v >retrieving revision 1.35 >diff -u -r1.35 CVSCompareEditorInput.java >--- src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java 4 Aug 2005 20:24:50 -0000 1.35 >+++ src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java 1 Dec 2008 15:08:56 -0000 >@@ -20,23 +20,17 @@ > import org.eclipse.compare.structuremergeviewer.Differencer; > import org.eclipse.compare.structuremergeviewer.IDiffContainer; > import org.eclipse.compare.structuremergeviewer.IStructureComparator; >-import org.eclipse.core.runtime.CoreException; >-import org.eclipse.core.runtime.IProgressMonitor; >-import org.eclipse.core.runtime.IStatus; >-import org.eclipse.core.runtime.OperationCanceledException; >-import org.eclipse.core.runtime.Status; >-import org.eclipse.core.runtime.SubProgressMonitor; >+import org.eclipse.core.runtime.*; >+import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.viewers.*; > import org.eclipse.osgi.util.NLS; > import org.eclipse.swt.graphics.Image; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.team.core.TeamException; >-import org.eclipse.team.internal.ccvs.core.CVSTag; >-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile; >-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder; >-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource; >-import org.eclipse.team.internal.ccvs.core.ICVSResource; >+import org.eclipse.team.internal.ccvs.core.*; > import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo; >+import org.eclipse.team.internal.ui.IPreferenceIds; >+import org.eclipse.team.internal.ui.TeamUIPlugin; > > /** > * A compare input for comparing remote resources. Use <code>CVSLocalCompareInput</code> >@@ -100,7 +94,19 @@ > ICVSResource resource = edition; > if (edition instanceof ICVSRemoteFile) { > try { >- return NLS.bind(CVSUIMessages.nameAndRevision, new String[] { resource.getName(), ((ICVSRemoteFile)edition).getRevision() }); >+ String name = resource.getName(); >+ String revision = ((ICVSRemoteFile)edition).getRevision(); >+ String msg = null; >+ if (isShowAuthor()) { >+ String author = ((ICVSRemoteFile) edition).getLogEntry( >+ new NullProgressMonitor()).getAuthor(); >+ msg = NLS.bind(CVSUIMessages.nameRevisionAndAuthor, >+ new String[] { name, revision, author }); >+ } else { >+ msg = NLS.bind(CVSUIMessages.nameAndRevision, >+ new String[] { name, revision }); >+ } >+ return msg; > } catch (TeamException e) { > // fall through > } >@@ -125,7 +131,12 @@ > } > return element.getName(); > } >- >+ >+ private boolean isShowAuthor() { >+ IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore(); >+ return store.getBoolean(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR); >+ } >+ > /** > * Returns the label for the given input element. > */ >Index: src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java,v >retrieving revision 1.92 >diff -u -r1.92 CVSUIMessages.java >--- src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java 12 Aug 2008 13:44:21 -0000 1.92 >+++ src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java 1 Dec 2008 15:08:56 -0000 >@@ -126,6 +126,7 @@ > public static String separator; > > public static String nameAndRevision; >+ public static String nameRevisionAndAuthor; > public static String currentRevision; > > public static String AddAction_addFailed; >Index: src/org/eclipse/team/internal/ccvs/ui/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties,v >retrieving revision 1.546 >diff -u -r1.546 messages.properties >--- src/org/eclipse/team/internal/ccvs/ui/messages.properties 12 Aug 2008 13:44:21 -0000 1.546 >+++ src/org/eclipse/team/internal/ccvs/ui/messages.properties 1 Dec 2008 15:08:57 -0000 >@@ -29,6 +29,7 @@ > separator=/ > > nameAndRevision={0} {1} >+nameRevisionAndAuthor={0} {1} ({2}) > currentRevision=*{0} > > AddAction_addFailed=Error occurred during Add >#P org.eclipse.team.ui >Index: src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java,v >retrieving revision 1.38 >diff -u -r1.38 SyncInfoCompareInput.java >--- src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java 7 May 2007 18:05:37 -0000 1.38 >+++ src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java 1 Dec 2008 15:08:59 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 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 >@@ -174,7 +174,7 @@ > if (participant != null) { > participant.prepareCompareInput(node, getCompareConfiguration(), Policy.subMonitorFor(monitor, 100)); > } else { >- Utils.updateLabels(node.getSyncInfo(), getCompareConfiguration()); >+ Utils.updateLabels(node.getSyncInfo(), getCompareConfiguration(), monitor); > node.cacheContents(Policy.subMonitorFor(monitor, 100)); > } > } catch (TeamException e) { >Index: src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java,v >retrieving revision 1.36 >diff -u -r1.36 AbstractSynchronizeParticipant.java >--- src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java 30 Nov 2006 19:01:25 -0000 1.36 >+++ src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java 1 Dec 2008 15:08:59 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2006 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 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 >@@ -320,7 +320,7 @@ > public void prepareCompareInput(ISynchronizeModelElement element, CompareConfiguration config, IProgressMonitor monitor) throws TeamException { > SyncInfo sync = getSyncInfo(element); > if (sync != null) >- Utils.updateLabels(sync, config); >+ Utils.updateLabels(sync, config, monitor); > if (element instanceof SyncInfoModelElement) { > SyncInfoModelElement node = (SyncInfoModelElement)element; > (node).cacheContents(monitor); >Index: src/org/eclipse/team/internal/ui/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties,v >retrieving revision 1.245 >diff -u -r1.245 messages.properties >--- src/org/eclipse/team/internal/ui/messages.properties 28 Nov 2008 10:30:08 -0000 1.245 >+++ src/org/eclipse/team/internal/ui/messages.properties 1 Dec 2008 15:08:59 -0000 >@@ -41,11 +41,14 @@ > > > SyncInfoCompareInput_localLabel=Local File >-SyncInfoCompareInput_localLabelExists=Local File ({0}) >+SyncInfoCompareInput_localLabelExists=Local File {0} >+SyncInfoCompareInput_localLabelAuthorExists=Local File {0} ({1}) > SyncInfoCompareInput_remoteLabel=Remote File > SyncInfoCompareInput_baseLabel=Common Ancestor >-SyncInfoCompareInput_remoteLabelExists=Remote File ({0}) >-SyncInfoCompareInput_baseLabelExists=Common Ancestor ({0}) >+SyncInfoCompareInput_remoteLabelExists=Remote File {0} >+SyncInfoCompareInput_remoteLabelAuthorExists=Remote File {0} ({1}) >+SyncInfoCompareInput_baseLabelExists=Common Ancestor {0} >+SyncInfoCompareInput_baseLabelAuthorExists=Common Ancestor {0} ({1}) > SyncInfoCompareInput_title={0} > SyncInfoCompareInput_0=File Changed > SyncInfoCompareInput_1=File has changed outside of this compare editor. What do you want to do? >Index: src/org/eclipse/team/internal/ui/TeamUIMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java,v >retrieving revision 1.77 >diff -u -r1.77 TeamUIMessages.java >--- src/org/eclipse/team/internal/ui/TeamUIMessages.java 28 Nov 2008 10:30:08 -0000 1.77 >+++ src/org/eclipse/team/internal/ui/TeamUIMessages.java 1 Dec 2008 15:08:58 -0000 >@@ -251,10 +251,13 @@ > > public static String SyncInfoCompareInput_localLabel; > public static String SyncInfoCompareInput_localLabelExists; >+ public static String SyncInfoCompareInput_localLabelAuthorExists; > public static String SyncInfoCompareInput_remoteLabel; > public static String SyncInfoCompareInput_baseLabel; > public static String SyncInfoCompareInput_remoteLabelExists; >+ public static String SyncInfoCompareInput_remoteLabelAuthorExists; > public static String SyncInfoCompareInput_baseLabelExists; >+ public static String SyncInfoCompareInput_baseLabelAuthorExists; > public static String SyncInfoCompareInput_title; > public static String SyncInfoCompareInput_0; > public static String SyncInfoCompareInput_1; >Index: src/org/eclipse/team/internal/ui/Utils.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java,v >retrieving revision 1.85 >diff -u -r1.85 Utils.java >--- src/org/eclipse/team/internal/ui/Utils.java 22 Sep 2008 15:24:09 -0000 1.85 >+++ src/org/eclipse/team/internal/ui/Utils.java 1 Dec 2008 15:08:59 -0000 >@@ -27,6 +27,7 @@ > import org.eclipse.jface.dialogs.ErrorDialog; > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.util.OpenStrategy; > import org.eclipse.jface.viewers.IStructuredSelection; >@@ -348,27 +349,65 @@ > Utils.initAction(a, prefix, bundle, null); > } > >- public static void updateLabels(SyncInfo sync, CompareConfiguration config) { >+ public static void updateLabels(SyncInfo sync, CompareConfiguration config, IProgressMonitor monitor) { > final IResourceVariant remote = sync.getRemote(); > final IResourceVariant base = sync.getBase(); >+ String baseAuthor = null; >+ String remoteAuthor = null; > String localContentId = sync.getLocalContentIdentifier(); >+ if (isShowAuthor()) { >+ baseAuthor = getAuthor(base, monitor); >+ remoteAuthor = getAuthor(remote, monitor); >+ } > if (localContentId != null) { > config.setLeftLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_localLabelExists, new String[] { localContentId })); > } else { > config.setLeftLabel(TeamUIMessages.SyncInfoCompareInput_localLabel); > } > if (remote != null) { >- config.setRightLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_remoteLabelExists, new String[] { remote.getContentIdentifier() })); >+ if (remoteAuthor != null) { >+ config.setRightLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_remoteLabelAuthorExists, new String[] { remote.getContentIdentifier(), remoteAuthor })); >+ } else { >+ config.setRightLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_remoteLabelExists, new String[] { remote.getContentIdentifier() })); >+ } > } else { > config.setRightLabel(TeamUIMessages.SyncInfoCompareInput_remoteLabel); > } > if (base != null) { >- config.setAncestorLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_baseLabelExists, new String[] { base.getContentIdentifier() })); >+ if (baseAuthor != null) { >+ config.setAncestorLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_baseLabelAuthorExists, new String[] { base.getContentIdentifier(), baseAuthor })); >+ } else { >+ config.setAncestorLabel(NLS.bind(TeamUIMessages.SyncInfoCompareInput_baseLabelExists, new String[] { base.getContentIdentifier() })); >+ } > } else { > config.setAncestorLabel(TeamUIMessages.SyncInfoCompareInput_baseLabel); > } > } > >+ private static boolean isShowAuthor() { >+ IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore(); >+ return store.getBoolean(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR); >+ } >+ >+ private static String getAuthor(IResourceVariant variant, >+ IProgressMonitor monitor) { >+ String author = null; >+ if (variant instanceof IAdaptable) { >+ IAdaptable adaptable = (IAdaptable) variant; >+ IFileRevision revision = (IFileRevision) adaptable >+ .getAdapter(IFileRevision.class); >+ try { >+ IFileRevision complete = revision.withAllProperties(monitor); >+ if (complete != null) { >+ author = complete.getAuthor(); >+ } >+ } catch (CoreException e) { >+ TeamUIPlugin.log(e); >+ } >+ } >+ return author; >+ } >+ > public static String getLocalContentId(IDiff diff) { > if (diff instanceof IThreeWayDiff) { > IThreeWayDiff twd = (IThreeWayDiff) diff;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
pawel.pogorzelski1
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 80577
:
16486
| 119149