Fixed comment merge conflicts added .gitignore

Former-commit-id: 7cc471a9c9 [formerly 6093428342170b9fd8deb741a5721375e80bc955]
Former-commit-id: a0e7cb624a
This commit is contained in:
Brian.Dyke 2014-03-25 15:41:58 -04:00
commit d8256c4226
6 changed files with 47 additions and 11 deletions

View file

@ -31,7 +31,8 @@ import java.util.TimeZone;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 8, 2008 1737 grichard Initial creation.
* Mar 14, 2014 DR 17175 D. Friedman Fixed Atlantic and Samoa time zones
* Mar 14, 2014 DR 17175 D. Friedman Fixed Atlantic and Samoa time zones.
* Add short name map.
* </pre>
*
* @author grichard
@ -72,6 +73,8 @@ public final class TextWarningConstants {
public static HashMap<String, TimeZone> timeZoneAbbreviationMap = null;
public static HashMap<String, TimeZone> timeZoneShortNameMap = null;
static {
// build the abbreviation map
timeZoneAbbreviationMap = new HashMap<String, TimeZone>();
@ -85,6 +88,24 @@ public final class TextWarningConstants {
timeZoneAbbreviationMap.put("P", TimeZone.getTimeZone("PST8PDT"));
timeZoneAbbreviationMap.put("S", TimeZone.getTimeZone("US/Samoa"));
timeZoneAbbreviationMap.put("V", TimeZone.getTimeZone("America/Puerto_Rico"));
HashMap<String, TimeZone> t = timeZoneAbbreviationMap;
timeZoneShortNameMap = new HashMap<String, TimeZone>();
timeZoneShortNameMap.put("AKST", t.get("A"));
timeZoneShortNameMap.put("AKDT", t.get("A"));
timeZoneShortNameMap.put("CST", t.get("C"));
timeZoneShortNameMap.put("CDT", t.get("C"));
timeZoneShortNameMap.put("EST", t.get("E"));
timeZoneShortNameMap.put("EDT", t.get("E"));
timeZoneShortNameMap.put("CHST", t.get("G"));
timeZoneShortNameMap.put("ChST", t.get("G"));
timeZoneShortNameMap.put("HST", t.get("H"));
timeZoneShortNameMap.put("MST", t.get("m"));
timeZoneShortNameMap.put("MDT", t.get("M"));
timeZoneShortNameMap.put("PST", t.get("P"));
timeZoneShortNameMap.put("PDT", t.get("P"));
timeZoneShortNameMap.put("SST", t.get("S"));
timeZoneShortNameMap.put("AST", t.get("V"));
}
/**

View file

@ -334,6 +334,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
* 20Sep2013 #2394 lvenable Fixed color memory leaks.
* 20Nov2013 DR 16777 D. Friedman Check if OUPRequest will work before setting ETN.
* 10Dec2013 2601 mpduff Fix NullPointerException.
* 14Mar2014 DR 17175 D. Friedman Get correct time zone for MND header time sync.
* </pre>
*
* @author lvenable
@ -5813,11 +5814,15 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
if (m.find()) {
SimpleDateFormat headerFormat = new SimpleDateFormat(
"hmm a z EEE MMM d yyyy");
headerFormat
.setTimeZone(TextWarningConstants.timeZoneAbbreviationMap
.get(m.group(5).substring(0, 1)));
product = product.replace(m.group(1), headerFormat.format(now)
.toUpperCase());
TimeZone tz = TextWarningConstants.timeZoneShortNameMap
.get(m.group(5));
if (tz != null) {
headerFormat.setTimeZone(tz);
product = product.replace(m.group(1), headerFormat.format(now)
.toUpperCase());
} else {
statusHandler.warn("Could not sync MND header time because the time zone could not be determined. Will proceed with save/send.");
}
}
return product;
}

View file

@ -41,6 +41,7 @@ import com.raytheon.viz.texteditor.util.VtecUtil;
* ------------ ---------- ----------- --------------------------
* Initial creation
* Aug 25, 2011 10719 rferrel ugcPtrn now local to file.
* Mar 14, 2014 DR 17175 D. Friedman Get correct time zone from times.
* </pre>
*
* @version 1.0
@ -90,8 +91,12 @@ public class TimeConsistentCheck implements IQCCheck {
// Event ending time (second bullet) vs Expiration
m = secondBulletPtrn.matcher(body);
if (m.find()) {
TimeZone timeZone = TextWarningConstants.timeZoneAbbreviationMap
.get(m.group(4).substring(0, 1));
TimeZone timeZone = TextWarningConstants.timeZoneShortNameMap
.get(m.group(4));
if (timeZone == null) {
errorMsg += "Could not determine time zone in second bullet";
return errorMsg;
}
int am_pm = m.group(3).equals("AM") ? Calendar.AM : Calendar.PM;
int minute = Integer.parseInt(m.group(2));
int hour = Integer.parseInt(m.group(1)) == 12 ? 0 : Integer
@ -134,8 +139,12 @@ public class TimeConsistentCheck implements IQCCheck {
m = thirdBulletPtrn.matcher(body);
if (m.find()) {
TimeZone timeZone = TextWarningConstants.timeZoneAbbreviationMap
.get(m.group(4).substring(0, 1));
TimeZone timeZone = TextWarningConstants.timeZoneShortNameMap
.get(m.group(4));
if (timeZone == null) {
errorMsg += "Could not determine time zone in third bullet";
return errorMsg;
}
int am_pm = m.group(3).equals("AM") ? Calendar.AM : Calendar.PM;
int minute = Integer.parseInt(m.group(2));
int hour = Integer.parseInt(m.group(1));

View file

@ -52,6 +52,7 @@ import com.raytheon.viz.core.mode.CAVEMode;
* ---------- ---------- ----------- --------------------------
* 12/20/07 561 Dan Fitch Initial Creation.
* 6/7/2013 mnash Implementation for Chris Golden to allow instances to be garbage collected.
* 03/24/14 DR 17186 D. Friedman Do not change colors of most buttons.
* </pre>
*
* @author Dan Fitch
@ -107,7 +108,7 @@ public class ModeListener implements PaintListener {
.getStyle() & SWT.READ_ONLY) == 0))
&& !(control instanceof Table)
&& !((control instanceof Button) && ((((Button) control)
.getStyle() & SWT.PUSH) != 0))) {
.getStyle() & (SWT.PUSH|SWT.TOGGLE|SWT.CHECK|SWT.RADIO)) != 0))) {
Color back = control.getBackground();
Color fore = control.getForeground();