Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-05-02 14:57:15 +0000
committerMichael Valenta2005-05-02 14:57:15 +0000
commitfc518744922d34d558fe8060cae2eea32eedce4a (patch)
tree66fda75d20712fba956da42135d32eb6d14a694c
parent3668a30133ac8088c72219eea160212453747a91 (diff)
downloadeclipse.platform.team-fc518744922d34d558fe8060cae2eea32eedce4a.tar.gz
eclipse.platform.team-fc518744922d34d558fe8060cae2eea32eedce4a.tar.xz
eclipse.platform.team-fc518744922d34d558fe8060cae2eea32eedce4a.zip
Bug 93250 Creating a new Date for a comparison is hidden
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java40
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java17
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java2
5 files changed, 35 insertions, 26 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java
index 5e52b75f1..1998e8532 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIMessages.java
@@ -610,6 +610,7 @@ public class CVSUIMessages extends NLS {
public static String TagConfigurationDialog_20;
public static String TagConfigurationDialog_21;
public static String TagConfigurationDialog_22;
+ public static String TagConfigurationDialog_AddDateTag;
public static String ConfigureTagsFromRepoViewConfigure_Tag_Error_1;
public static String RemoteRootAction_label;
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 f43eb24d0..ba355fc11 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
@@ -635,6 +635,7 @@ TagConfigurationDialog_14=Error fetching tags from remote CVS files
TagConfigurationDialog_20=&Refresh Tags
TagConfigurationDialog_21=&Configure Tags...
TagConfigurationDialog_22=Updating Tags
+TagConfigurationDialog_AddDateTag=Add Date...
ConfigureTagsFromRepoViewConfigure_Tag_Error_1=Configure Tag Error
RemoteRootAction_label=Discard location
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java
index 04d7a0ef7..eff4d1c6f 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagRefreshButtonArea.java
@@ -40,8 +40,10 @@ public class TagRefreshButtonArea extends DialogArea {
private Button refreshButton;
private IRunnableContext context;
private Label fMessageLabel;
+ private final Listener addDateTagListener;
- public TagRefreshButtonArea(Shell shell, TagSource tagSource) {
+ public TagRefreshButtonArea(Shell shell, TagSource tagSource, Listener addDateTagListener) {
+ this.addDateTagListener = addDateTagListener;
Assert.isNotNull(shell);
Assert.isNotNull(tagSource);
this.shell = shell;
@@ -53,27 +55,35 @@ public class TagRefreshButtonArea extends DialogArea {
*/
public void createArea(Composite parent) {
- final String addButtonLabel= CVSUIMessages.TagConfigurationDialog_21; //$NON-NLS-1$
- final String refreshButtonLabel= CVSUIMessages.TagConfigurationDialog_20; //$NON-NLS-1$
-
final PixelConverter converter= SWTUtils.createDialogPixelConverter(parent);
final Composite buttonComp = new Composite(parent, SWT.NONE);
buttonComp.setLayoutData(SWTUtils.createHFillGridData());//SWT.DEFAULT, SWT.DEFAULT, SWT.END, SWT.TOP, false, false));
- buttonComp.setLayout(SWTUtils.createGridLayout(3, converter, SWTUtils.MARGINS_NONE));
+ buttonComp.setLayout(SWTUtils.createGridLayout(4, converter, SWTUtils.MARGINS_NONE));
fMessageLabel= SWTUtils.createLabel(buttonComp, null);
refreshButton = new Button(buttonComp, SWT.PUSH);
- refreshButton.setText (refreshButtonLabel);
-
- final Button addButton = new Button(buttonComp, SWT.PUSH);
- addButton.setText (addButtonLabel);
+ refreshButton.setText (CVSUIMessages.TagConfigurationDialog_20);
+ final Button configureTagsButton = new Button(buttonComp, SWT.PUSH);
+ configureTagsButton.setText (CVSUIMessages.TagConfigurationDialog_21);
+
+ Button addDateTagButton = null;
+ int buttonWidth;
+ if (addDateTagListener != null) {
+ addDateTagButton = new Button(buttonComp, SWT.PUSH);
+ addDateTagButton.setText (CVSUIMessages.TagConfigurationDialog_AddDateTag);
+ Dialog.applyDialogFont(buttonComp);
+ buttonWidth= SWTUtils.calculateControlSize(converter, new Button [] { addDateTagButton, configureTagsButton, refreshButton });
+ addDateTagButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.END, SWT.CENTER, false, false));
+ addDateTagButton.addListener(SWT.Selection, addDateTagListener);
+ } else {
+ Dialog.applyDialogFont(buttonComp);
+ buttonWidth= SWTUtils.calculateControlSize(converter, new Button [] { configureTagsButton, refreshButton });
+ }
- Dialog.applyDialogFont(buttonComp);
- final int buttonWidth= SWTUtils.calculateControlSize(converter, new Button [] { addButton, refreshButton });
refreshButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.END, SWT.CENTER, false, false));
- addButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.END, SWT.CENTER, false, false));
+ configureTagsButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.END, SWT.CENTER, false, false));
refreshButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
@@ -81,15 +91,15 @@ public class TagRefreshButtonArea extends DialogArea {
}
});
- addButton.addListener(SWT.Selection, new Listener() {
+ configureTagsButton.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
TagConfigurationDialog d = new TagConfigurationDialog(shell, tagSource);
d.open();
}
- });
+ });
WorkbenchHelp.setHelp(refreshButton, IHelpContextIds.TAG_CONFIGURATION_REFRESHACTION);
- WorkbenchHelp.setHelp(addButton, IHelpContextIds.TAG_CONFIGURATION_OVERVIEW);
+ WorkbenchHelp.setHelp(configureTagsButton, IHelpContextIds.TAG_CONFIGURATION_OVERVIEW);
Dialog.applyDialogFont(buttonComp);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java
index edf3c4e62..f19faae93 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionArea.java
@@ -41,15 +41,7 @@ import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
@@ -309,7 +301,12 @@ public class TagSelectionArea extends DialogArea {
protected void createRefreshButtons(Composite parent) {
tagSource.addListener(listener);
parent.addDisposeListener(disposeListener);
- tagRefreshArea = new TagRefreshButtonArea(shell, tagSource);
+ tagRefreshArea = new TagRefreshButtonArea(shell, tagSource, new Listener() {
+ public void handleEvent(Event event) {
+ CVSTag dateTag = NewDateTagAction.getDateTag(getShell(), getLocation());
+ addDateTag(dateTag);
+ }
+ });
if (context != null)
tagRefreshArea.setRunnableContext(context);
tagRefreshArea.createArea(parent);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java
index 720e4a2f7..0415f3a52 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizardPage.java
@@ -96,7 +96,7 @@ public class MergeWizardPage extends CVSWizardPage {
noPreviewButton.addSelectionListener(selectionAdapter);
}
private void createTagRefreshArea(Composite composite) {
- tagRefreshArea = new TagRefreshButtonArea(getShell(), getTagSource());
+ tagRefreshArea = new TagRefreshButtonArea(getShell(), getTagSource(), null);
tagRefreshArea.setRunnableContext(getContainer());
tagRefreshArea.createArea(composite);
}

Back to the top