Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-03-05 16:53:32 -0500
committerjames2002-03-05 16:53:32 -0500
commiteb13b1f4386af7750d5c45af22e4d73aa3811d34 (patch)
tree613c347d487b74b21098d6b3acb9943ed5fbc284
parentc0876b542514af2279433248dc0f8d43b88b430b (diff)
downloadeclipse.platform.team-eb13b1f4386af7750d5c45af22e4d73aa3811d34.tar.gz
eclipse.platform.team-eb13b1f4386af7750d5c45af22e4d73aa3811d34.tar.xz
eclipse.platform.team-eb13b1f4386af7750d5c45af22e4d73aa3811d34.zip
9689: Ignore of "cvs added" file does not delete sync info
10813: Sync view: ignore incorrectly enabled
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java20
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java17
2 files changed, 17 insertions, 20 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
index 08df56f31..874c97f0e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
@@ -48,7 +48,7 @@ public class CVSCatchupReleaseViewer extends CatchupReleaseViewer {
private UpdateSyncAction updateAction;
private CommitSyncAction commitAction;
private UpdateMergeAction updateMergeAction;
- private IgnoreAndRefreshAction ignoreAction;
+ private IgnoreAction ignoreAction;
private HistoryAction showInHistory;
class DiffImage extends CompositeImageDescriptor {
@@ -79,22 +79,6 @@ public class CVSCatchupReleaseViewer extends CatchupReleaseViewer {
return new Point(WIDTH, HEIGHT);
}
}
- class IgnoreAndRefreshAction extends Action {
- IgnoreAction action;
- CVSSyncCompareInput diffModel;
- public IgnoreAndRefreshAction(CVSSyncCompareInput diffModel, Shell shell, String text) {
- super(text);
- this.diffModel = diffModel;
- this.action = new IgnoreAction(diffModel, CVSCatchupReleaseViewer.this, text, shell);
- }
- public void run() {
- action.run();
- diffModel.refresh();
- }
- public void update() {
- action.update();
- }
- }
class HistoryAction extends Action implements ISelectionChangedListener {
IStructuredSelection selection;
public HistoryAction(String label) {
@@ -240,7 +224,7 @@ public class CVSCatchupReleaseViewer extends CatchupReleaseViewer {
commitAction = new CommitSyncAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.commit"), shell);
updateAction = new UpdateSyncAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.update"), shell);
updateMergeAction = new UpdateMergeAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.update"), shell);
- ignoreAction = new IgnoreAndRefreshAction(diffModel, shell, Policy.bind("CVSCatchupReleaseViewer.ignore"));
+ ignoreAction = new IgnoreAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.ignore"), shell);
// Show in history view
showInHistory = new HistoryAction(Policy.bind("CVSCatchupReleaseViewer.showInHistory"));
addSelectionChangedListener(showInHistory);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java
index 033ac5b86..eeff7e5ed 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java
@@ -58,7 +58,7 @@ public class IgnoreAction extends Action {
return;
}
removeNodes(new SyncSet(selection).getChangedNodes());
- diffModel.updateView();
+ diffModel.refresh();
}
}
/**
@@ -70,7 +70,20 @@ public class IgnoreAction extends Action {
if (nodes.length != 1) return false;
if (!(nodes[0] instanceof ITeamNode)) return false;
ITeamNode node = (ITeamNode)nodes[0];
- return node.getKind() == (ITeamNode.OUTGOING | IRemoteSyncElement.ADDITION);
+ if (node.getKind() != (ITeamNode.OUTGOING | IRemoteSyncElement.ADDITION)) return false;
+ IResource resource = node.getResource();
+ ICVSResource cvsResource = null;
+ switch (resource.getType()) {
+ case IResource.FILE:
+ cvsResource = new LocalFile(resource.getLocation().toFile());
+ break;
+ case IResource.FOLDER:
+ cvsResource = new LocalFolder(resource.getLocation().toFile());
+ break;
+ default:
+ return false;
+ }
+ return !cvsResource.isManaged();
}
public void update() {
IStructuredSelection selection = (IStructuredSelection)selectionProvider.getSelection();

Back to the top