Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-02-27 20:36:31 +0000
committerJean Michel-Lemieux2004-02-27 20:36:31 +0000
commit9d472cb7bbc8d828cc8d713249bf9883e33916e9 (patch)
tree274adff17dbd2956f9c64169ebdc67ddfc8642b7
parentc333b1a3082407176c0d36fdd0d2d4d1d8abc934 (diff)
downloadeclipse.platform.team-9d472cb7bbc8d828cc8d713249bf9883e33916e9.tar.gz
eclipse.platform.team-9d472cb7bbc8d828cc8d713249bf9883e33916e9.tar.xz
eclipse.platform.team-9d472cb7bbc8d828cc8d713249bf9883e33916e9.zip
Fixed up the change log model provider there is still many things to do:
- preform the log in one connection, fix the log listener to handle more than one file
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogDiffNode.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipantPage.java19
3 files changed, 17 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogDiffNode.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogDiffNode.java
index 90d327647..62d5102f6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogDiffNode.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogDiffNode.java
@@ -47,9 +47,9 @@ public class ChangeLogDiffNode extends SynchronizeModelElement {
}
/* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+ * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
*/
- public String getLabel(Object o) {
+ public String getName() {
String date = DateFormat.getDateTimeInstance().format(logEntry.getDate());
return date + ": " + logEntry.getComment() + " (" + logEntry.getAuthor() +")";
}
@@ -58,14 +58,13 @@ public class ChangeLogDiffNode extends SynchronizeModelElement {
* @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#toString()
*/
public String toString() {
- return getLabel(null);
+ return getName();
}
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelElement#getResource()
*/
public IResource getResource() {
- // TODO Auto-generated method stub
return null;
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java
index ae1924d85..01a775c3e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java
@@ -161,7 +161,6 @@ public class ChangeLogModelProvider extends SynchronizeModelProvider {
}
SynchronizeModelElement element = new FullPathSyncInfoElement(changeRoot, infos[i]);
associateDiffNode(element);
- changeRoot.add(element);
}
monitor.worked(100);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipantPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipantPage.java
index 8c1f9e5d8..55d7aebb1 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipantPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipantPage.java
@@ -10,7 +10,10 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui.subscriber;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.*;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.synchronize.actions.RemoveSynchronizeParticipantAction;
import org.eclipse.team.ui.synchronize.ISynchronizeView;
import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
@@ -22,7 +25,7 @@ public class CompareParticipantPage extends CVSSynchronizeViewPage {
private RemoveSynchronizeParticipantAction removeAction;
private Action groupByCommentAction;
- private boolean groupByComment = true;
+ private boolean groupByComment = false;
private class CompareAdvisor extends CVSSynchronizeViewerAdvisor {
public CompareAdvisor(ISynchronizeView view, SubscriberParticipant participant) {
@@ -44,11 +47,17 @@ public class CompareParticipantPage extends CVSSynchronizeViewPage {
public CompareParticipantPage(SubscriberParticipant participant, ISynchronizeView view) {
super(participant, view);
removeAction = new RemoveSynchronizeParticipantAction(getParticipant());
- groupByCommentAction = new Action("Show as Change Log", Action.AS_CHECK_BOX) { //$NON-NLS-1$
+ groupByCommentAction = new Action("Group by comments", Action.AS_CHECK_BOX) { //$NON-NLS-1$
public void run() {
groupByComment = ! groupByComment;
setChecked(groupByComment);
- ((CompareAdvisor)CompareParticipantPage.this.getViewerConfiguration()).refreshModel();
+ CompareAdvisor advisor = ((CompareAdvisor)CompareParticipantPage.this.getViewerConfiguration());
+ try {
+ advisor.prepareInput(new NullProgressMonitor());
+ } catch (TeamException e) {
+ Utils.handle(e);
+ }
+ advisor.refreshModel();
}
};
}
@@ -63,8 +72,8 @@ public class CompareParticipantPage extends CVSSynchronizeViewPage {
toolbar.add(new Separator());
toolbar.add(removeAction);
IMenuManager mgr = actionBars.getMenuManager();
- mgr.add(new Separator());
- mgr.add(groupByCommentAction);
+ //mgr.add(new Separator());
+ //mgr.add(groupByCommentAction);
}
}

Back to the top