Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-02-04 22:26:09 +0000
committerjames2002-02-04 22:26:09 +0000
commit03db183a6a19d36e350f007f48a7470ee505bec8 (patch)
tree566e9564455352eb205e7dfa648fde77e864b299
parente6e851d94184ad5a2ae1aacc60a42c28f05394b6 (diff)
downloadeclipse.platform.team-03db183a6a19d36e350f007f48a7470ee505bec8.tar.gz
eclipse.platform.team-03db183a6a19d36e350f007f48a7470ee505bec8.tar.xz
eclipse.platform.team-03db183a6a19d36e350f007f48a7470ee505bec8.zip
7611: Replace project/folder with tag does nothing
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java204
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java16
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/BranchesElement.java43
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java47
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java39
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties14
7 files changed, 170 insertions, 199 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
index 62a257dc9..4fba29397 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
@@ -459,6 +459,10 @@ public class CVSTeamProvider implements ITeamNature, ITeamProvider {
* @see ITeamProvider#get(IResource[], int, IProgressMonitor)
*/
public void get(IResource[] resources, final int depth, IProgressMonitor progress) throws TeamException {
+ get(resources, depth, null, progress);
+ }
+
+ public void get(IResource[] resources, final int depth, CVSTag tag, IProgressMonitor progress) throws TeamException {
// Need to correct any outgoing additions and deletions so the remote contents will be retrieved properly
ICVSResourceVisitor visitor = new ICVSResourceVisitor() {
@@ -494,7 +498,7 @@ public class CVSTeamProvider implements ITeamNature, ITeamProvider {
}
// Perform an update, ignoring any local file modifications
- update(resources, depth, null, true, progress);
+ update(resources, depth, tag, true, progress);
}
/*
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java
index 87798de05..6475ba7d4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
@@ -40,16 +41,21 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
import org.eclipse.team.ccvs.core.CVSTag;
import org.eclipse.team.ccvs.core.CVSTeamProvider;
+import org.eclipse.team.ccvs.core.ICVSRemoteFolder;
import org.eclipse.team.ccvs.core.ICVSRemoteResource;
import org.eclipse.team.ccvs.core.ICVSRepositoryLocation;
import org.eclipse.team.core.ITeamProvider;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.TeamPlugin;
+import org.eclipse.team.internal.ccvs.ui.merge.ProjectElement;
+import org.eclipse.team.internal.ccvs.ui.merge.TagElement;
import org.eclipse.team.internal.ccvs.ui.model.BranchTag;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.team.internal.ccvs.ui.Policy;
/**
* Dialog to prompt the user to choose a tag for a selected resource
@@ -60,7 +66,7 @@ public class TagSelectionDialog extends Dialog {
private CVSTag result;
// widgets;
- private TableViewer tagTable;
+ private TreeViewer tagTree;
private Button okButton;
private Label messageLine;
private Button useDefinedTagButton;
@@ -89,7 +95,7 @@ public class TagSelectionDialog extends Dialog {
*/
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
- newShell.setText(Policy.bind("TagSelectionDialog.version"));
+ newShell.setText(Policy.bind("TagSelectionDialog.Select_a_Tag_1")); //$NON-NLS-1$
// set F1 help
//WorkbenchHelp.setHelp(newShell, new Object[] {IVCMHelpContextIds.VERSION_SELECTION_DIALOG});
}
@@ -148,24 +154,8 @@ public class TagSelectionDialog extends Dialog {
Composite top = (Composite)super.createDialogArea(parent);
- Composite tagTypeComposite = new Composite(top, SWT.NULL);
- tagTypeComposite.setLayoutData(new GridData());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- tagTypeComposite.setLayout(layout);
- createLabel(tagTypeComposite, "Tag Type:");
-
- tagTypeCombo = new Combo(tagTypeComposite, SWT.READ_ONLY);
- tagTypeCombo.add("Version");
- tagTypeCombo.add("Branch");
- tagTypeCombo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- handleComboSelectionChanged();
- }
- });
-
useDefinedTagButton = new Button(top, SWT.RADIO);
- useDefinedTagButton.setText("Use Defined Tag:");
+ useDefinedTagButton.setText(Policy.bind("TagSelectionDialog.Use_Defined_Tag__2")); //$NON-NLS-1$
useDefinedTagButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
handleRadioSelectionChanged();
@@ -177,52 +167,21 @@ public class TagSelectionDialog extends Dialog {
data.widthHint = SIZING_DIALOG_WIDTH;
data.heightHint = SIZING_DIALOG_HEIGHT;
inner.setLayoutData(data);
- layout = new GridLayout();
+ GridLayout layout = new GridLayout();
layout.marginWidth = 10;
inner.setLayout(layout);
- tagTable = createTable(inner);
- tagTable.setContentProvider(getEditionsContentProvider());
- tagTable.setLabelProvider(new LabelProvider() {
- public Image getImage(Object element) {
- if (element instanceof CVSTag) {
- return versionImage;
- } else if (element instanceof BranchTag) {
- return branchImage;
- }
- return null;
- }
- public String getText(Object element) {
- if (element instanceof CVSTag) {
- return ((CVSTag)element).getName();
- } else if (element instanceof BranchTag) {
- return ((BranchTag)element).getTag().getName();
- }
- return "";
- }
- });
- tagTable.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablement();
- }
- });
- // select and close on double click
- tagTable.getTable().addMouseListener(new MouseAdapter() {
- public void mouseDoubleClick(MouseEvent e) {
- IStructuredSelection selection = (IStructuredSelection)tagTable.getSelection();
- if (!selection.isEmpty())
- okPressed();
- }
- });
- tagTable.setSorter(new RepositorySorter());
+ tagTree = createTree(inner);
useSpecifiedTagButton = new Button(top, SWT.RADIO);
- useSpecifiedTagButton.setText("Use User-Specified Tag:");
+ useSpecifiedTagButton.setText(Policy.bind("TagSelectionDialog.Use_User-Specified_Tag__3")); //$NON-NLS-1$
inner = new Composite(top, SWT.NULL);
inner.setLayoutData(new GridData());
layout = new GridLayout();
layout.marginWidth = 10;
+ layout.numColumns = 2;
inner.setLayout(layout);
+ createLabel(inner, Policy.bind("TagSelectionDialog.Tag_name__4")); //$NON-NLS-1$
tagText = new Text(inner, SWT.SINGLE | SWT.BORDER);
tagText.setEnabled(false);
tagText.addListener(SWT.Modify, new Listener() {
@@ -233,16 +192,13 @@ public class TagSelectionDialog extends Dialog {
data = new GridData();
data.widthHint = 250;
tagText.setLayoutData(data);
+
+ createLabel(inner, Policy.bind("TagSelectionDialog.Tag_type__5")); //$NON-NLS-1$
+ tagTypeCombo = new Combo(inner, SWT.READ_ONLY);
+ tagTypeCombo.setEnabled(false);
+ tagTypeCombo.add(Policy.bind("TagSelectionDialog.Version_6")); //$NON-NLS-1$
+ tagTypeCombo.add(Policy.bind("TagSelectionDialog.Branch_7")); //$NON-NLS-1$
- // add a listener to resize the columns when the shell is resized
- getShell().addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- Table table = tagTable.getTable();
- setLayout(table);
- table.layout();
- }
- });
-
messageLine = new Label(top, SWT.NONE);
messageLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -250,26 +206,27 @@ public class TagSelectionDialog extends Dialog {
tagTypeCombo.select(0);
// initialize the table contents
- tagTable.setInput(resource);
+ try {
+ CVSTeamProvider provider = (CVSTeamProvider)TeamPlugin.getManager().getProvider(resource);
+ tagTree.setInput(new ProjectElement((ICVSRemoteFolder)provider.getRemoteResource(resource)));
+ } catch (TeamException e) {
+ // To do: error dialog
+ }
return top;
}
- private void handleComboSelectionChanged() {
- tagTable.refresh(resource);
- // update the widget enablement
- updateEnablement();
- }
-
private void handleRadioSelectionChanged() {
if (useDefinedTagButton.getSelection()) {
// Enable the table, disable the text widget
- tagTable.getTable().setEnabled(true);
+ tagTree.getTree().setEnabled(true);
tagText.setEnabled(false);
+ tagTypeCombo.setEnabled(false);
} else {
// Disable the table, enable the text widget
- tagTable.getTable().setEnabled(false);
+ tagTree.getTree().setEnabled(false);
tagText.setEnabled(true);
+ tagTypeCombo.setEnabled(true);
}
// update the widget enablement
updateEnablement();
@@ -293,57 +250,30 @@ public class TagSelectionDialog extends Dialog {
return label;
}
- /**
- * Creates the group that displays lists of the available repositories
- * and team streams.
- *
- * @param the parent composite to contain the group
- * @return the group control
- */
- protected TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.SINGLE | SWT.BORDER);
- table.setLayoutData(new GridData(GridData.FILL_BOTH));
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(false);
- layout.addColumnData(new ColumnWeightData(100, false));
-
- return new TableViewer(table);
- }
-
- /**
- * Returns a content provider for repositories that only returns
- * resource editions for the input resource.
- */
- protected IStructuredContentProvider getEditionsContentProvider() {
- return new SimpleContentProvider() {
- public Object[] getElements(Object o) {
- if (o == null) return null;
- if (!(o instanceof IResource)) return null;
- IResource resource = (IResource)o;
- try {
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- CVSTeamProvider provider = (CVSTeamProvider)TeamPlugin.getManager().getProvider(resource);
- ICVSRemoteResource remoteResource = provider.getRemoteResource(resource);
- switch (tagTypeCombo.getSelectionIndex()) {
- case 1:
- // Branch tags
- return manager.getKnownBranchTags(remoteResource.getRepository());
- case 0:
- default:
- // Version tags
- return manager.getKnownVersionTags(remoteResource, new NullProgressMonitor());
- }
- } catch (TeamException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- return null;
- }
+ protected TreeViewer createTree(Composite parent) {
+ Tree tree = new Tree(parent, SWT.SINGLE | SWT.BORDER);
+ tree.setLayoutData(new GridData(GridData.FILL_BOTH));
+ TreeViewer result = new TreeViewer(tree);
+ result.setContentProvider(new WorkbenchContentProvider());
+ result.setLabelProvider(new WorkbenchLabelProvider());
+ result.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateEnablement();
+ }
+ });
+ // select and close on double click
+ // To do: use defaultselection instead of double click
+ result.getTree().addMouseListener(new MouseAdapter() {
+ public void mouseDoubleClick(MouseEvent e) {
+ IStructuredSelection selection = (IStructuredSelection)tagTree.getSelection();
+ if (!selection.isEmpty())
+ okPressed();
}
- };
+ });
+ result.setSorter(new RepositorySorter());
+ return result;
}
-
+
/**
* Returns the selected tag.
*/
@@ -369,16 +299,13 @@ public class TagSelectionDialog extends Dialog {
*/
protected void okPressed() {
if (useDefinedTagButton.getSelection()) {
- IStructuredSelection selection = (IStructuredSelection)tagTable.getSelection();
+ IStructuredSelection selection = (IStructuredSelection)tagTree.getSelection();
Object o = selection.getFirstElement();
- if (o instanceof CVSTag) {
- result = (CVSTag)o;
- } else {
- result = ((BranchTag)o).getTag();
- }
+ TagElement element = (TagElement)o;
+ result = element.getTag();
} else {
String text = tagText.getText();
- int type = CVSTag.VERSION;
+ int type;
switch (tagTypeCombo.getSelectionIndex()) {
case 0:
type = CVSTag.VERSION;
@@ -386,6 +313,9 @@ public class TagSelectionDialog extends Dialog {
case 1:
type = CVSTag.BRANCH;
break;
+ default:
+ type = CVSTag.HEAD;
+ break;
}
result = new CVSTag(text, type);
}
@@ -393,20 +323,11 @@ public class TagSelectionDialog extends Dialog {
}
/**
- * Sets a new layout for the given table.
- */
- protected void setLayout(Table table) {
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100, true));
- table.setLayout(layout);
- }
-
- /**
* Shows an error message in the message line.
*/
void showError(String errorMsg) {
messageLine.setForeground(messageLine.getDisplay().getSystemColor(SWT.COLOR_RED));
- messageLine.setText(errorMsg == null ? "" : errorMsg);
+ messageLine.setText(errorMsg == null ? "" : errorMsg); //$NON-NLS-1$
}
/**
@@ -414,9 +335,10 @@ public class TagSelectionDialog extends Dialog {
*/
protected void updateEnablement() {
if (useDefinedTagButton.getSelection()) {
- if (tagTable.getSelection().isEmpty()) {
+ IStructuredSelection selection = (IStructuredSelection)tagTree.getSelection();
+ if (selection.isEmpty() || !(selection.getFirstElement() instanceof TagElement)) {
okButton.setEnabled(false);
- showError("Please select a tag.");
+ showError(Policy.bind("TagSelectionDialog.Please_select_a_tag_9")); //$NON-NLS-1$
} else {
okButton.setEnabled(true);
showError(null);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java
index bfc5393b9..c42320f58 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java
@@ -9,13 +9,10 @@ import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.team.ccvs.core.CVSTag;
import org.eclipse.team.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.ccvs.core.ICVSRemoteResource;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.TeamPlugin;
import org.eclipse.team.internal.ccvs.core.resources.LocalFile;
@@ -44,7 +41,7 @@ public class ReplaceWithTagAction extends TeamAction {
CVSTeamProvider provider = (CVSTeamProvider)TeamPlugin.getManager().getProvider(resource.getProject());
// To do: check for local changes and warn of overwriting.
LocalResource cvsResource = null;
- if (resources[0].getType()==IResource.FILE) {
+ if (resources[0].getType() == IResource.FILE) {
cvsResource = new LocalFile(resource.getLocation().toFile());
} else {
cvsResource = new LocalFolder(resource.getLocation().toFile());
@@ -52,18 +49,19 @@ public class ReplaceWithTagAction extends TeamAction {
TagSelectionDialog dialog = new TagSelectionDialog(getShell(), resource);
dialog.setBlockOnOpen(true);
- int result = dialog.open();
- if (result == Dialog.CANCEL || dialog.getResult() == null) {
+ if (dialog.open() == Dialog.CANCEL) {
return;
}
CVSTag tag = dialog.getResult();
- ICVSRemoteResource remoteResource = (ICVSRemoteResource)provider.getRemoteTree(resource, tag, new NullProgressMonitor());
- System.out.println("Not implemented");
+ if (tag == null) {
+ return;
+ }
+ provider.get(new IResource[] { resource }, IResource.DEPTH_INFINITE, tag, monitor);
} catch (TeamException e) {
throw new InvocationTargetException(e);
}
}
- }, Policy.bind("ReplaceWithTagAction.compare"), this.PROGRESS_BUSYCURSOR);
+ }, Policy.bind("ReplaceWithTagAction.replace"), this.PROGRESS_BUSYCURSOR);
}
protected boolean isEnabled() {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/BranchesElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/BranchesElement.java
new file mode 100644
index 000000000..5ede48bd7
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/BranchesElement.java
@@ -0,0 +1,43 @@
+package org.eclipse.team.internal.ccvs.ui.merge;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2002.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.team.ccvs.core.ICVSRemoteFolder;
+import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
+import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
+import org.eclipse.team.internal.ccvs.ui.Policy;
+import org.eclipse.team.internal.ccvs.ui.model.BranchTag;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+public class BranchesElement implements IWorkbenchAdapter, IAdaptable {
+ ICVSRemoteFolder remote;
+ public BranchesElement(ICVSRemoteFolder remote) {
+ this.remote = remote;
+ }
+ public Object[] getChildren(Object o) {
+ BranchTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownBranchTags(remote.getRepository());
+ TagElement[] result = new TagElement[tags.length];
+ for (int i = 0; i < tags.length; i++) {
+ result[i] = new TagElement(tags[i].getTag());
+ }
+ return result;
+ }
+ public Object getAdapter(Class adapter) {
+ if (adapter == IWorkbenchAdapter.class) return this;
+ return null;
+ }
+ public ImageDescriptor getImageDescriptor(Object object) {
+ return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_BRANCHES_CATEGORY);
+ }
+ public String getLabel(Object o) {
+ return Policy.bind("MergeWizardEndPage.branches");
+ }
+ public Object getParent(Object o) {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java
index 1ae9c535d..35a1f88f2 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java
@@ -40,51 +40,6 @@ public class MergeWizardEndPage extends CVSWizardPage {
ICVSRemoteFolder remote;
CVSTeamProvider provider;
- class ProjectElement implements IWorkbenchAdapter, IAdaptable {
- public Object[] getChildren(Object o) {
- return new Object[] {
- new BranchesElement(),
- new TagElement(CVSTag.DEFAULT),
- new VersionsElement(remote)
- };
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
- public String getLabel(Object o) {
- return null;
- }
- public Object getParent(Object o) {
- return null;
- }
- };
- class BranchesElement implements IWorkbenchAdapter, IAdaptable {
- public Object[] getChildren(Object o) {
- BranchTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownBranchTags(remote.getRepository());
- TagElement[] result = new TagElement[tags.length];
- for (int i = 0; i < tags.length; i++) {
- result[i] = new TagElement(tags[i].getTag());
- }
- return result;
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_BRANCHES_CATEGORY);
- }
- public String getLabel(Object o) {
- return Policy.bind("MergeWizardEndPage.branches");
- }
- public Object getParent(Object o) {
- return project;
- }
- };
/**
* MergeWizardEndPage constructor.
*
@@ -126,7 +81,7 @@ public class MergeWizardEndPage extends CVSWizardPage {
}
});
setControl(composite);
- tree.setInput(new ProjectElement());
+ tree.setInput(new ProjectElement(remote));
}
protected TreeViewer createTree(Composite parent) {
Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java
new file mode 100644
index 000000000..8773572ee
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java
@@ -0,0 +1,39 @@
+package org.eclipse.team.internal.ccvs.ui.merge;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2002.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.team.ccvs.core.CVSTag;
+import org.eclipse.team.ccvs.core.ICVSRemoteFolder;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+public class ProjectElement implements IAdaptable, IWorkbenchAdapter {
+ ICVSRemoteFolder remote;
+ public ProjectElement(ICVSRemoteFolder remote) {
+ this.remote = remote;
+ }
+ public Object[] getChildren(Object o) {
+ return new Object[] {
+ new BranchesElement(remote),
+ new TagElement(CVSTag.DEFAULT),
+ new VersionsElement(remote)
+ };
+ }
+ public Object getAdapter(Class adapter) {
+ if (adapter == IWorkbenchAdapter.class) return this;
+ return null;
+ }
+ public ImageDescriptor getImageDescriptor(Object object) {
+ return null;
+ }
+ public String getLabel(Object o) {
+ return null;
+ }
+ public Object getParent(Object o) {
+ return null;
+ }
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index 7565ac9a1..300c09ee8 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -121,6 +121,8 @@ CompareWithRemoteAction.compare=Compare
CompareWithRemoteAction.noRemote=No Remote Resource
CompareWithRemoteAction.noRemoteLong=The selected resource has no remote resource to compare with.
+CompareWithTagAction.replace=Error Comparing With Tag
+
ConfigurationWizardAutoconnectPage.description=Your project already has CVS/ directories. It was probably previously shared, or checked out using another tool. It will be automatically shared using the following information.
ConfigurationWizardAutoconnectPage.user=User:
ConfigurationWizardAutoconnectPage.host=Host:
@@ -225,6 +227,8 @@ RemoveRootAction.removeRoot=Discard Location
RemoveBranchTagAction.removeTag=Discard Branch
RemoveModuleVersionAction.removeTag=Discard Version
+ReplaceWithTagAction.replace=Error Replacing With Tag
+
RepositoryDialog.getRepository=Select a repository
RepositoryDialog.description=Select a repository to connect your project to
@@ -276,8 +280,6 @@ TagAction.tag=Tag
TagAction.tagResources=Tag Resources
TagAction.enterTag=Please enter a version tag:
-TagSelectionDialog.version=Select a Tag
-
UpdateAction.update=Update
UpdateAction.updating=Updating...
@@ -327,3 +329,11 @@ Run_update_4=Run update
Do_nothing_5=Do nothing
Validate_Connection_on_Finish_7=Validate Location on Finish
+TagSelectionDialog.Select_a_Tag_1=Select a Tag
+TagSelectionDialog.Use_Defined_Tag__2=Use Defined Tag:
+TagSelectionDialog.Use_User-Specified_Tag__3=Use User-Specified Tag:
+TagSelectionDialog.Tag_name__4=Tag name:
+TagSelectionDialog.Tag_type__5=Tag type:
+TagSelectionDialog.Version_6=Version
+TagSelectionDialog.Branch_7=Branch
+TagSelectionDialog.Please_select_a_tag_9=Please select a tag

Back to the top