diff options
author | Kalyan Prasad Tatavarthi | 2019-03-20 08:53:57 +0000 |
---|---|---|
committer | Dani Megert | 2019-03-20 13:27:41 +0000 |
commit | 0a8ebd58cb4fbb2a64f8b96360a25bed561aaa88 (patch) | |
tree | f04009d34a0c238a39577fda22fa24e6ab34b74d | |
parent | bc1f4989372b140b7f271e300da7224825ea1911 (diff) | |
download | eclipse.platform.team-I20190326-1800.tar.gz eclipse.platform.team-I20190326-1800.tar.xz eclipse.platform.team-I20190326-1800.zip |
Bug 544904: Japanese Calendar - Wrong Japanese era of Data tag in CVSI20190326-2305I20190326-1800I20190325-1800I20190325-0105I20190324-1800I20190323-1800I20190322-1800I20190321-1800I20190321-0435I20190321-0245I20190320-1800
repos view
Change-Id: I91f6bad5f7c2abcdbb599860bcc2aed65a606ce7
Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
3 files changed, 18 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF index 162ad9448..884d5cd37 100644 --- a/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.team.cvs.ui; singleton:=true -Bundle-Version: 3.4.400.qualifier +Bundle-Version: 3.4.500.qualifier Bundle-Activator: org.eclipse.team.internal.ccvs.ui.CVSUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/bundles/org.eclipse.team.cvs.ui/pom.xml b/bundles/org.eclipse.team.cvs.ui/pom.xml index 04b721f05..3826c9a00 100644 --- a/bundles/org.eclipse.team.cvs.ui/pom.xml +++ b/bundles/org.eclipse.team.cvs.ui/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2012, 2017 Eclipse Foundation and others. + Copyright (c) 2012, 2019 Eclipse Foundation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Distribution License v1.0 which accompanies this distribution, and is available at @@ -19,6 +19,6 @@ </parent> <groupId>org.eclipse.team</groupId> <artifactId>org.eclipse.team.cvs.ui</artifactId> - <version>3.4.400-SNAPSHOT</version> + <version>3.4.500-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java index 1d9a294ba..06572032b 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -41,6 +41,11 @@ public class DateTagDialog extends TrayDialog { public class DateArea extends DialogArea { private DateTime date; + /** + * This is the minimum year that is accepted by {@link DateTime#setYear}. + */ + private static final int DateTime_MIN_YEAR = 1752; + public void createArea(Composite parent) { Composite composite = createComposite(parent, 2, false); initializeDialogUnits(composite); @@ -60,8 +65,16 @@ public class DateTagDialog extends TrayDialog { } public void adjustCalendar(Calendar calendar) { + int dateYear = date.getYear(); + int todaysYear = calendar.get(Calendar.YEAR); + if (todaysYear < DateTime_MIN_YEAR) { + // year would be ignored by DateTime if it is less than MIN_YEAR + // The code below is to specify the correct year as per the calendar chosen + int extended_year = calendar.get(Calendar.EXTENDED_YEAR); + dateYear = todaysYear + (dateYear - extended_year); + } calendar.set( - date.getYear(), + dateYear, date.getMonth(), date.getDay(), 0,0,0); |