Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-04-08 12:03:13 -0400
committerJean Michel-Lemieux2002-04-08 12:03:13 -0400
commit8d6c806c3c31cd3173a1731631857b147c195ff7 (patch)
tree0da9cde2dfa935d537cfa97386720c216b149cf7
parent3e553240fdeb03ca2d28a3bf5b04e812699f6995 (diff)
downloadeclipse.platform.team-newTagConfigurationBranch.tar.gz
eclipse.platform.team-newTagConfigurationBranch.tar.xz
eclipse.platform.team-newTagConfigurationBranch.zip
*** empty log message ***newTagConfigurationBranch
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java38
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java10
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java15
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java48
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java35
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java14
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java26
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java4
10 files changed, 134 insertions, 69 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java
index 8ab8bcb8a..4c7ce855f 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java
@@ -19,7 +19,22 @@ import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
public interface ICVSFolder extends ICVSResource {
/**
- * Answers the immediate folder children of this resource. This includes the union
+ * Answers and array of <code>ICVSResource</code> elements that are immediate
+ * children of this remote resource, in no particular order. The server may be contacted.
+ *
+ * @param monitor a progress monitor to indicate the duration of the operation, or
+ * <code>null</code> if progress reporting is not required.
+ *
+ * @return array of immediate children of this remote resource.
+ */
+ public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException;
+
+ /**
+ * [Note: temporary method that should only be used by commands.]
+ * Answers the immediate folder children of this resource that are known
+ * at the time of invocation. The server is never contacted.
+ *
+ * This includes the union
* of children that satisfy the following criteria:
* <ul>
* <li> exists but is not managed (not under CVS control)
@@ -28,36 +43,37 @@ public interface ICVSFolder extends ICVSResource {
* </ul>
* If the folder does not exist then a zero length array is returned.
*/
- ICVSFolder[] getFolders() throws CVSException;
+ public ICVSFolder[] getFolders() throws CVSException;
/**
- * Answers the immediate file children of this resource. This includes the union
- * of children that satisfy the following criteria:
+ * [Note: temporary method that should only be used by commands.]
+ * Answers the immediate file children of this resource that are known
+ * at the time of invocation. The server is never contacted.
* <ul>
* <li> exists but is not managed (not under CVS control)
* <li> does not exist() but is managed (deleted file)
* <li> exist() and isManaged() (normal registered file)
* </ul>
*/
- ICVSFile[] getFiles() throws CVSException;
+ public ICVSFile[] getFiles() throws CVSException;
/**
* Answers a child folder of this resource with the given name or <code>null</code> if
* the given folder does not have a child with that name.
*/
- ICVSFolder getFolder(String name) throws CVSException;
+ public ICVSFolder getFolder(String name) throws CVSException;
/**
* Answers a child file of this resource with the given name or <code>null</code> if
* the given folder does not have a child with that name.
*/
- ICVSFile getFile(String name) throws CVSException;
+ public ICVSFile getFile(String name) throws CVSException;
/**
* Return the child resource at the given path relative to
* the receiver.
*/
- ICVSResource getChild(String path) throws CVSException;
+ public ICVSResource getChild(String path) throws CVSException;
/**
* Create the folder if it did not exist before. Does only
@@ -65,7 +81,7 @@ public interface ICVSFolder extends ICVSResource {
*
* @throws CVSException if for some reason it was not possible to create the folder
*/
- void mkdir() throws CVSException;
+ public void mkdir() throws CVSException;
/**
* Answers the folder's synchronization information or <code>null</code> if the folder
@@ -74,14 +90,14 @@ public interface ICVSFolder extends ICVSResource {
* To modify the folder sync info the caller must call <code>setFolderSyncInfo</code> with
* new sync information.</p>
*/
- FolderSyncInfo getFolderSyncInfo() throws CVSException;
+ public FolderSyncInfo getFolderSyncInfo() throws CVSException;
/**
* Set the folder sync information for this folder. Setting the folder information
* to <code>null</code> is not supported. The only mechanism for removing an existing
* CVS folder is to delete the resource.
*/
- void setFolderSyncInfo(FolderSyncInfo folderInfo) throws CVSException;
+ public void setFolderSyncInfo(FolderSyncInfo folderInfo) throws CVSException;
/**
* Accepts the visitor on all files and all subFolder in the folder. Files are
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
index f3dc9d8e0..f4f7ed527 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
@@ -11,6 +11,7 @@
package org.eclipse.team.internal.ccvs.core.resources;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.eclipse.core.resources.IContainer;
@@ -311,4 +312,13 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
throw error[0];
}
}
+ /**
+ * @see ICVSFolder#fetchChildren(IProgressMonitor)
+ */
+ public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException {
+ List children = new ArrayList();
+ children.addAll(Arrays.asList(getFolders()));
+ children.addAll(Arrays.asList(getFiles()));
+ return (ICVSResource[]) children.toArray(new ICVSResource[children.size()]);
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
index 50362043a..d1ff2ec4d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
@@ -345,7 +345,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
public ICVSFolder[] getFolders() throws CVSException {
ICVSRemoteResource[] children = getChildren();
if (children == null) {
- children = getMembers(getTag(), null);
+ return new ICVSFolder[0];
}
List result = new ArrayList();
for (int i=0;i<children.length;i++)
@@ -360,7 +360,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
public ICVSFile[] getFiles() throws CVSException {
ICVSRemoteResource[] children = getChildren();
if (children == null) {
- children = getMembers(getTag(), null);
+ return new ICVSFile[0];
}
List result = new ArrayList();
for (int i=0;i<children.length;i++)
@@ -675,4 +675,15 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
monitor.done();
}
}
+
+ /**
+ * @see ICVSFolder#fetchChildren(IProgressMonitor)
+ */
+ public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException {
+ try {
+ return getMembers(monitor);
+ } catch(TeamException e) {
+ throw new CVSException(e.getStatus());
+ }
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java
index 3529a18e8..f33ca4d17 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java
@@ -25,29 +25,28 @@ import java.util.Set;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.ccvs.core.CVSTag;
import org.eclipse.team.ccvs.core.CVSTeamProvider;
+import org.eclipse.team.ccvs.core.ICVSFile;
import org.eclipse.team.ccvs.core.ICVSFolder;
import org.eclipse.team.ccvs.core.ICVSListener;
import org.eclipse.team.ccvs.core.ICVSProvider;
import org.eclipse.team.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.ccvs.core.ICVSRemoteResource;
+import org.eclipse.team.ccvs.core.ICVSRemoteFolder;
import org.eclipse.team.ccvs.core.ICVSRepositoryLocation;
+import org.eclipse.team.ccvs.core.ICVSResource;
import org.eclipse.team.ccvs.core.ILogEntry;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
import org.eclipse.team.core.sync.IRemoteSyncElement;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSProvider;
import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.model.BranchTag;
/**
* This class is repsible for maintaining the UI's list of known repositories,
@@ -122,16 +121,28 @@ public class RepositoryManager {
public void refreshDefinedTags(ICVSFolder project) throws TeamException {
try {
ICVSRepositoryLocation location = CVSProvider.getInstance().getRepository(project.getFolderSyncInfo().getRoot());
- ICVSRemoteFile vcmMeta = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile(".vcm_meta"));
- ICVSRemoteFile dotProject = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile(".project"));
-
List tags = new ArrayList();
- tags.addAll(Arrays.asList(fetchDefinedTagsFor(vcmMeta, project, location)));
- tags.addAll(Arrays.asList(fetchDefinedTagsFor(dotProject, project, location)));
- String[] relativePaths = getAutoRefreshFiles(project);
- for (int i = 0; i < relativePaths.length; i++) {
- ICVSRemoteFile remoteFile = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile(relativePaths[i]));
- tags.addAll(Arrays.asList(fetchDefinedTagsFor(remoteFile, project, location)));
+ List filesToRefresh = new ArrayList(Arrays.asList(getAutoRefreshFiles(project)));
+ filesToRefresh.add(".project");
+ filesToRefresh.add(".vcm_meta");
+ for (Iterator it = filesToRefresh.iterator(); it.hasNext();) {
+ String relativePath = (String)it.next();
+ ICVSFile file = null;
+ if(project instanceof ICVSRemoteFolder) {
+ // There should be a better way of doing this.
+ ICVSRemoteFolder parentFolder = location.getRemoteFolder(new Path(project.getName()).append(relativePath).removeLastSegments(1).toString(), CVSTag.DEFAULT);
+ ICVSResource[] resources = parentFolder.fetchChildren(null);
+ for (int i = 0; i < resources.length; i++) {
+ if (resources[i] instanceof ICVSRemoteFile && resources[i].getName().equals(new Path(relativePath).lastSegment())) {
+ file = (ICVSFile)resources[i];
+ }
+ }
+ } else {
+ file = project.getFile(relativePath);
+ }
+ if(file!=null) {
+ tags.addAll(Arrays.asList(fetchDefinedTagsFor(file, project, location)));
+ }
}
// add all tags in one pass so that the listeners only get one notification for
// versions and another for branches
@@ -654,8 +665,7 @@ public class RepositoryManager {
/**
* Returns Branch and Version tags for the given files
*/
- public CVSTag[] getTags(ICVSRemoteFile file, IProgressMonitor monitor) throws TeamException {
- ICVSRepositoryLocation root = file.getRepository();
+ public CVSTag[] getTags(ICVSFile file, IProgressMonitor monitor) throws TeamException {
Set tagSet = new HashSet();
ILogEntry[] entries = file.getLogEntries(monitor);
for (int j = 0; j < entries.length; j++) {
@@ -683,9 +693,9 @@ public class RepositoryManager {
/*
* Fetches and caches the tags found on the provided remote file.
*/
- private CVSTag[] fetchDefinedTagsFor(ICVSRemoteFile remoteFile, ICVSFolder project, ICVSRepositoryLocation location) throws TeamException {
- if(remoteFile != null && remoteFile.exists(null)) {
- return getTags(remoteFile, null);
+ private CVSTag[] fetchDefinedTagsFor(ICVSFile file, ICVSFolder project, ICVSRepositoryLocation location) throws TeamException {
+ if(file != null && file.exists()) {
+ return getTags(file, null);
}
return new CVSTag[0];
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java
index e8b594edc..8aaec6efe 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -52,11 +53,9 @@ import org.eclipse.swt.widgets.Tree;
import org.eclipse.team.ccvs.core.CVSTag;
import org.eclipse.team.ccvs.core.ICVSFile;
import org.eclipse.team.ccvs.core.ICVSFolder;
-import org.eclipse.team.ccvs.core.ICVSRepositoryLocation;
import org.eclipse.team.ccvs.core.ILogEntry;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.ui.merge.ProjectElement;
import org.eclipse.team.internal.ccvs.ui.merge.TagElement;
@@ -260,7 +259,7 @@ public class TagConfigurationDialog extends Dialog {
addSelectedTagsButton = new Button (buttonComposite, SWT.PUSH);
addSelectedTagsButton.setText ("&Add Checked Tags");
- data = new GridData ();
+ data = getStandardButtonData(addSelectedTagsButton);
data.horizontalAlignment = GridData.FILL;
addSelectedTagsButton.setLayoutData(data);
addSelectedTagsButton.addListener(SWT.Selection, new Listener() {
@@ -271,7 +270,7 @@ public class TagConfigurationDialog extends Dialog {
removeTagButton = new Button (buttonComposite, SWT.PUSH);
removeTagButton.setText ("&Remove");
- data = new GridData ();
+ data = getStandardButtonData(removeTagButton);
data.horizontalAlignment = GridData.FILL;
removeTagButton.setLayoutData(data);
removeTagButton.addListener(SWT.Selection, new Listener() {
@@ -282,7 +281,7 @@ public class TagConfigurationDialog extends Dialog {
Button removeAllTags = new Button (buttonComposite, SWT.PUSH);
removeAllTags.setText ("Remove &All");
- data = new GridData ();
+ data = getStandardButtonData(removeAllTags);
data.horizontalAlignment = GridData.FILL;
removeAllTags.setLayoutData(data);
removeAllTags.addListener(SWT.Selection, new Listener() {
@@ -324,7 +323,7 @@ public class TagConfigurationDialog extends Dialog {
addSelectedFilesButton = new Button (buttonComposite2, SWT.PUSH);
addSelectedFilesButton.setText ("&Add Selected Files");
- data = new GridData ();
+ data = getStandardButtonData(addSelectedFilesButton);
data.horizontalAlignment = GridData.FILL;
addSelectedFilesButton.setLayoutData(data);
addSelectedFilesButton.addListener(SWT.Selection, new Listener() {
@@ -335,7 +334,7 @@ public class TagConfigurationDialog extends Dialog {
removeFileButton = new Button (buttonComposite2, SWT.PUSH);
removeFileButton.setText ("&Remove");
- data = new GridData ();
+ data = getStandardButtonData(removeFileButton);
data.horizontalAlignment = GridData.FILL;
removeFileButton.setLayoutData(data);
removeFileButton.addListener(SWT.Selection, new Listener() {
@@ -562,7 +561,7 @@ public class TagConfigurationDialog extends Dialog {
* the tags are fetched from the server. A client should refresh their widgets that show tags because they
* may of changed.
*/
- private static Button createTagRefreshButton(final Shell shell, Composite composite, String title, final IProject project, final Runnable runnable) {
+ private static Button createTagRefreshButton(final Shell shell, Composite composite, String title, final IProject project, final Runnable runnable) {
Button refreshButton = new Button(composite, SWT.PUSH);
refreshButton.setText (title);
updateToolTipHelpForRefreshButton(refreshButton, project);
@@ -583,7 +582,7 @@ public class TagConfigurationDialog extends Dialog {
return refreshButton;
}
- private static void updateToolTipHelpForRefreshButton(Button button, IProject project) {
+ private static void updateToolTipHelpForRefreshButton(Button button, IProject project) {
StringBuffer tooltip = new StringBuffer("This will fetch tags from the repository that are defined on the following files:\n");
String[] autoFiles = CVSUIPlugin.getPlugin().getRepositoryManager().getAutoRefreshFiles(CVSWorkspaceRoot.getCVSFolderFor(project));
tooltip.append(" - .project\n");
@@ -594,7 +593,7 @@ public class TagConfigurationDialog extends Dialog {
button.setToolTipText(tooltip.toString());
}
- public static void createTagDefinitionButtons(final Shell shell, Composite composite, final IProject[] projects, final Runnable afterRefresh, final Runnable afterConfigure) {
+ public static void createTagDefinitionButtons(final Shell shell, Composite composite, final IProject[] projects, int hHint, int wHint, final Runnable afterRefresh, final Runnable afterConfigure) {
Composite buttonComp = new Composite(composite, SWT.NONE);
GridData data = new GridData ();
data.horizontalAlignment = GridData.END;
@@ -606,7 +605,10 @@ public class TagConfigurationDialog extends Dialog {
buttonComp.setLayout (layout);
final Button refreshButton = TagConfigurationDialog.createTagRefreshButton(shell, buttonComp, "&Refresh", projects[0], afterRefresh);
- data = new GridData ();
+ data = new GridData();
+ data.heightHint = hHint;
+ int widthHint = wHint;
+ data.widthHint = Math.max(widthHint, refreshButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
data.horizontalAlignment = GridData.END;
data.horizontalSpan = 1;
refreshButton.setLayoutData (data);
@@ -614,6 +616,9 @@ public class TagConfigurationDialog extends Dialog {
Button addButton = new Button(buttonComp, SWT.PUSH);
addButton.setText ("&Configure Tags...");
data = new GridData ();
+ data.heightHint = hHint;
+ widthHint = wHint;
+ data.widthHint = Math.max(widthHint, addButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
data.horizontalAlignment = GridData.END;
data.horizontalSpan = 1;
addButton.setLayoutData (data);
@@ -648,4 +653,12 @@ public class TagConfigurationDialog extends Dialog {
protected void cancelPressed() {
super.cancelPressed();
}
+
+ private GridData getStandardButtonData(Button button) {
+ GridData data = new GridData();
+ data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
+ int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
+ return data;
+ }
} \ No newline at end of file
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 63eaf4298..4d26d39ac 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
@@ -126,7 +126,10 @@ public class TagSelectionDialog extends Dialog {
tagTree.refresh();
}
};
- TagConfigurationDialog.createTagDefinitionButtons(getShell(), top, projects, refresh, refresh);
+ TagConfigurationDialog.createTagDefinitionButtons(getShell(), top, projects,
+ convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT),
+ convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH),
+ refresh, refresh);
Label seperator = new Label(top, SWT.SEPARATOR | SWT.HORIZONTAL);
data = new GridData (GridData.FILL_BOTH);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java
index 62e6b4131..48ae56707 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java
@@ -6,6 +6,7 @@ package org.eclipse.team.internal.ccvs.ui.merge;
*/
import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -18,21 +19,13 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.team.ccvs.core.CVSTag;
import org.eclipse.team.ccvs.core.ICVSFolder;
-import org.eclipse.team.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.TagConfigurationDialog;
import org.eclipse.team.internal.ccvs.ui.wizards.CVSWizardPage;
@@ -120,7 +113,10 @@ public class MergeWizardStartPage extends CVSWizardPage {
}
};
- TagConfigurationDialog.createTagDefinitionButtons(getShell(), composite, new IProject[] {project}, afterRefresh, afterConfigure);
+ TagConfigurationDialog.createTagDefinitionButtons(getShell(), composite, new IProject[] {project},
+ convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT),
+ convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH),
+ afterRefresh, afterConfigure);
setControl(composite);
initialize();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java
index 1242aff77..ef1265cf6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java
@@ -28,27 +28,25 @@ public class CVSFolderElement extends CVSResourceElement {
this.includeUnmanaged = includeUnmanaged;
}
+ /**
+ * Returns CVSResourceElement instances
+ */
public Object[] getChildren(final Object o) {
final Object[][] result = new Object[1][];
BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
public void run() {
try {
- ICVSFolder[] folders = folder.getFolders();
- ICVSFile[] files = folder.getFiles();
- List children = new ArrayList();
- for (int i = 0; i < folders.length; i++) {
- ICVSFolder folder = folders[i];
- if(includeUnmanaged || folder.isManaged()) {
- children.add((CVSResourceElement)new CVSFolderElement(folder, includeUnmanaged));
- }
- }
- for (int i = 0; i < files.length; i++) {
- ICVSFile file = files[i];
- if(includeUnmanaged || file.isManaged()) {
- children.add((CVSResourceElement)new CVSFileElement(file));
+ ICVSResource[] children = folder.fetchChildren(null);
+ CVSResourceElement[] elements = new CVSResourceElement[children.length];
+ for (int i = 0; i < children.length; i++) {
+ ICVSResource resource = children[i];
+ if(resource.isFolder()) {
+ elements[i] = new CVSFolderElement((ICVSFolder)resource, includeUnmanaged);
+ } else {
+ elements[i] = new CVSFileElement((ICVSFile)resource);
}
}
- result[0] = (CVSResourceElement[]) children.toArray(new CVSResourceElement[children.size()]);
+ result[0] = elements;
} catch (TeamException e) {
handle(e);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java
index fcba68f31..96f299070 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java
@@ -17,6 +17,7 @@ import org.eclipse.team.ccvs.core.ICVSRepositoryLocation;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
+import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
import org.eclipse.ui.model.IWorkbenchAdapter;
/**
@@ -56,8 +57,13 @@ public class RemoteModule extends CVSModelElement implements IAdaptable {
public Object[] getChildren(Object o) {
final Object[][] result = new Object[1][];
BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
- // This is inefficient; need API to get remote resource for a given tag
public void run() {
+ RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
+ try {
+ manager.refreshDefinedTags(folder);
+ } catch(TeamException e) {
+ // continue
+ }
CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownVersionTags(folder);
Object[] versions = new Object[tags.length];
for (int i = 0; i < versions.length; i++) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java
index 9fe2d1409..491110606 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java
@@ -6,6 +6,7 @@ package org.eclipse.team.internal.ccvs.ui.wizards;
*/
import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -111,7 +112,8 @@ public class UpdateWizardPage extends CVSWizardPage {
tree.refresh();
}
};
- TagConfigurationDialog.createTagDefinitionButtons(getShell(), composite, new IProject[] {project}, refresh, refresh);
+ TagConfigurationDialog.createTagDefinitionButtons(getShell(), composite, new IProject[] {project},convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT),
+ convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH), refresh, refresh);
Label seperator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
data = new GridData (GridData.FILL_BOTH);

Back to the top