Merge tag 'OB_16.1.1-6' into omaha_16.1.1
16.1.1-6 Former-commit-id: 002910fe88718d1801018450799a658b42a6a696
This commit is contained in:
commit
d6ab160019
5 changed files with 111 additions and 110 deletions
|
@ -1,19 +1,19 @@
|
||||||
/**
|
/**
|
||||||
* This software was developed and / or modified by Raytheon Company,
|
* This software was developed and / or modified by Raytheon Company,
|
||||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
*
|
*
|
||||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
* This software product contains export-restricted data whose
|
* This software product contains export-restricted data whose
|
||||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
* to non-U.S. persons whether in the United States or abroad requires
|
* to non-U.S. persons whether in the United States or abroad requires
|
||||||
* an export license or other authorization.
|
* an export license or other authorization.
|
||||||
*
|
*
|
||||||
* Contractor Name: Raytheon Company
|
* Contractor Name: Raytheon Company
|
||||||
* Contractor Address: 6825 Pine Street, Suite 340
|
* Contractor Address: 6825 Pine Street, Suite 340
|
||||||
* Mail Stop B8
|
* Mail Stop B8
|
||||||
* Omaha, NE 68106
|
* Omaha, NE 68106
|
||||||
* 402.291.0100
|
* 402.291.0100
|
||||||
*
|
*
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
|
@ -122,10 +122,10 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Composite containing the product editor controls.
|
* Composite containing the product editor controls.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 18 APR 2008 ### lvenable Initial creation
|
* 18 APR 2008 ### lvenable Initial creation
|
||||||
* 19 JAN 2010 4085 ryu Save and load draft
|
* 19 JAN 2010 4085 ryu Save and load draft
|
||||||
|
@ -146,8 +146,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* Changes for non-blocking StoreTransmitDlg.
|
* Changes for non-blocking StoreTransmitDlg.
|
||||||
* Changes for non-blocking WrapLengthDialog.
|
* Changes for non-blocking WrapLengthDialog.
|
||||||
* 08 Feb 2013 12851 jzeng Add menuToAddTo in create*Menu
|
* 08 Feb 2013 12851 jzeng Add menuToAddTo in create*Menu
|
||||||
* Create createEditorPopupMenu()
|
* Create createEditorPopupMenu()
|
||||||
* Add mouselistener in createTextControl() for StyledText
|
* Add mouselistener in createTextControl() for StyledText
|
||||||
* 28 Feb 2013 15889 ryu Removed detachAttributionPhrase and getVTECActionCodes
|
* 28 Feb 2013 15889 ryu Removed detachAttributionPhrase and getVTECActionCodes
|
||||||
* 02/12/2013 #1597 randerso Code cleanup. Fixed possible widget disposed errors on shut down.
|
* 02/12/2013 #1597 randerso Code cleanup. Fixed possible widget disposed errors on shut down.
|
||||||
* 05/08/2013 #1842 dgilling Add alternate setProductText(), fix
|
* 05/08/2013 #1842 dgilling Add alternate setProductText(), fix
|
||||||
|
@ -167,13 +167,14 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* 02/04/2014 17039 ryu Removed menu item related to the HighlighFramingCodes feature.
|
* 02/04/2014 17039 ryu Removed menu item related to the HighlighFramingCodes feature.
|
||||||
* 04/20/2015 4027 randerso Renamed ProductStateEnum with an initial capital
|
* 04/20/2015 4027 randerso Renamed ProductStateEnum with an initial capital
|
||||||
* Expunged Calendar from ActiveTableRecord
|
* Expunged Calendar from ActiveTableRecord
|
||||||
* 07/02/2015 13753 lshi Update times for products in Product Editor
|
* 07/02/2015 13753 lshi Update times for products in Product Editor
|
||||||
* 07/22/2015 13753 lshi Keeps issue time unchanged
|
* 07/22/2015 13753 lshi Keeps issue time unchanged
|
||||||
|
* 08/06/2015 13753 lshi removed updateTime flag, undo the change of updateIssueExpireTimes, etc.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ProductEditorComp extends Composite implements
|
public class ProductEditorComp extends Composite implements
|
||||||
INotificationObserver {
|
INotificationObserver {
|
||||||
|
@ -185,7 +186,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
/**
|
/**
|
||||||
* Parent composite.
|
* Parent composite.
|
||||||
*/
|
*/
|
||||||
private Composite parent;
|
private final Composite parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toolbar used to mimic a menu bar.
|
* Toolbar used to mimic a menu bar.
|
||||||
|
@ -289,7 +290,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
/**
|
/**
|
||||||
* Date & time formatter.
|
* Date & time formatter.
|
||||||
*/
|
*/
|
||||||
private SimpleDateFormat expireLabelFmt = new SimpleDateFormat(
|
private final SimpleDateFormat expireLabelFmt = new SimpleDateFormat(
|
||||||
"HH:mm'Z' dd-MMM-yy");
|
"HH:mm'Z' dd-MMM-yy");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -311,9 +312,9 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
private ProductDefinition productDefinition;
|
private ProductDefinition productDefinition;
|
||||||
|
|
||||||
private String productName;
|
private final String productName;
|
||||||
|
|
||||||
private boolean editorCorrectionMode;
|
private final boolean editorCorrectionMode;
|
||||||
|
|
||||||
private boolean testVTEC;
|
private boolean testVTEC;
|
||||||
|
|
||||||
|
@ -355,7 +356,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
* Product transmission callback to report the state of transmitting a
|
* Product transmission callback to report the state of transmitting a
|
||||||
* product.
|
* product.
|
||||||
*/
|
*/
|
||||||
private ITransmissionState transmissionCB;
|
private final ITransmissionState transmissionCB;
|
||||||
|
|
||||||
private final SimpleDateFormat purgeTimeFmt = new SimpleDateFormat("ddHHmm");
|
private final SimpleDateFormat purgeTimeFmt = new SimpleDateFormat("ddHHmm");
|
||||||
|
|
||||||
|
@ -374,12 +375,12 @@ public class ProductEditorComp extends Composite implements
|
||||||
*/
|
*/
|
||||||
private ChangeTimesJob timeUpdater;
|
private ChangeTimesJob timeUpdater;
|
||||||
|
|
||||||
private Listener visibilityListener;
|
private final Listener visibilityListener;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enumeration of product types.
|
* Enumeration of product types.
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
*/
|
*/
|
||||||
public enum productTypeEnum {
|
public enum productTypeEnum {
|
||||||
|
@ -423,12 +424,10 @@ public class ProductEditorComp extends Composite implements
|
||||||
private String prodEditorDirectory = null;
|
private String prodEditorDirectory = null;
|
||||||
|
|
||||||
private final DataManager dm;
|
private final DataManager dm;
|
||||||
|
|
||||||
private boolean updateTime = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent
|
||||||
* Parent composite.
|
* Parent composite.
|
||||||
*/
|
*/
|
||||||
|
@ -1080,7 +1079,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store or Transmit text product.
|
* Store or Transmit text product.
|
||||||
*
|
*
|
||||||
* @param action
|
* @param action
|
||||||
* STORE: show the Store dialog TRANSMITT: shows the Transmit
|
* STORE: show the Store dialog TRANSMITT: shows the Transmit
|
||||||
* dialog. AUTOSTORE: implement autoStore
|
* dialog. AUTOSTORE: implement autoStore
|
||||||
|
@ -1191,16 +1190,14 @@ public class ProductEditorComp extends Composite implements
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized boolean changeTimes() {
|
private boolean changeTimes() {
|
||||||
Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||||
GMT.setTime(SimulatedTime.getSystemTime().getTime());
|
GMT.setTime(SimulatedTime.getSystemTime().getTime());
|
||||||
GMT.set(Calendar.SECOND, 0);
|
GMT.set(Calendar.SECOND, 0);
|
||||||
Date tt = GMT.getTime();
|
Date tt = GMT.getTime();
|
||||||
|
|
||||||
updateTime = true;
|
|
||||||
tweakVTEC(tt);
|
tweakVTEC(tt);
|
||||||
updateIssueExpireTimes(tt);
|
updateIssueExpireTimes(tt);
|
||||||
updateTime = false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1538,7 +1535,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decodes the start and end times of VTEC, return null if all zeros.
|
* Decodes the start and end times of VTEC, return null if all zeros.
|
||||||
*
|
*
|
||||||
* @param vt
|
* @param vt
|
||||||
* The VTEC date string in "yyMMdd'T'HHmm'Z'" format
|
* The VTEC date string in "yyMMdd'T'HHmm'Z'" format
|
||||||
* @return Date object that corresponds to the specified VTEC time or null
|
* @return Date object that corresponds to the specified VTEC time or null
|
||||||
|
@ -1706,6 +1703,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
textComp.startUpdate();
|
textComp.startUpdate();
|
||||||
textComp.patchMND(txt, true);
|
textComp.patchMND(txt, true);
|
||||||
textComp.updatePType(val);
|
textComp.updatePType(val);
|
||||||
|
|
||||||
textComp.endUpdate();
|
textComp.endUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1866,7 +1864,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
/**
|
/**
|
||||||
* Returns a Date from an encoded YYMMDD and hhmm string. Function name is a
|
* Returns a Date from an encoded YYMMDD and hhmm string. Function name is a
|
||||||
* misnomer, but kept from porting AWIPS1 equivalent function.
|
* misnomer, but kept from porting AWIPS1 equivalent function.
|
||||||
*
|
*
|
||||||
* @param day
|
* @param day
|
||||||
* The "calendar day" of the time in Java's "yyMMdd" format.
|
* The "calendar day" of the time in Java's "yyMMdd" format.
|
||||||
* @param time
|
* @param time
|
||||||
|
@ -1890,7 +1888,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert time string in DDHHMM format to a Date.
|
* Convert time string in DDHHMM format to a Date.
|
||||||
*
|
*
|
||||||
* @param dtgString
|
* @param dtgString
|
||||||
* time string in DDHHMM format
|
* time string in DDHHMM format
|
||||||
* @return time converted from input string
|
* @return time converted from input string
|
||||||
|
@ -1965,29 +1963,34 @@ public class ProductEditorComp extends Composite implements
|
||||||
// I know this time string has been replaced. If the lengths of the
|
// I know this time string has been replaced. If the lengths of the
|
||||||
// before and after strings are different, a reParse() will be made,
|
// before and after strings are different, a reParse() will be made,
|
||||||
// else it will continue on.
|
// else it will continue on.
|
||||||
|
|
||||||
|
|
||||||
if (textComp != null) {
|
if (textComp != null) {
|
||||||
// Update Issue time -- removed
|
// Update Issue time
|
||||||
|
|
||||||
// Update MND time
|
|
||||||
try {
|
try {
|
||||||
textComp.startUpdate();
|
textComp.startUpdate();
|
||||||
ProductDataStruct pds = textComp.getProductDataStruct();
|
ProductDataStruct pds = textComp.getProductDataStruct();
|
||||||
|
if (!textComp.isCorMode()) {
|
||||||
if (pds != null) {
|
if (pds != null) {
|
||||||
TextIndexPoints tip = pds.getMndMap().get("nwstime");
|
TextIndexPoints pit = pds.getPIT();
|
||||||
if (tip != null) {
|
if (pit != null) {
|
||||||
SimpleDateFormat fmt = new SimpleDateFormat(
|
String time = purgeTimeFmt.format(now);
|
||||||
longLocalFmtStr);
|
textComp.replaceText(pit, time);
|
||||||
fmt.setTimeZone(localTimeZone);
|
|
||||||
String issueTime = fmt.format(now).toUpperCase();
|
|
||||||
|
|
||||||
if (tip != null) {
|
|
||||||
textComp.replaceText(tip, issueTime);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update MND time
|
||||||
|
TextIndexPoints tip = pds.getMndMap().get("nwstime");
|
||||||
|
if (tip != null) {
|
||||||
|
SimpleDateFormat fmt = new SimpleDateFormat(
|
||||||
|
longLocalFmtStr);
|
||||||
|
fmt.setTimeZone(localTimeZone);
|
||||||
|
String issueTime = fmt.format(now).toUpperCase();
|
||||||
|
|
||||||
|
if (tip != null) {
|
||||||
|
textComp.replaceText(tip, issueTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
textComp.endUpdate();
|
textComp.endUpdate();
|
||||||
}
|
}
|
||||||
|
@ -1998,8 +2001,8 @@ public class ProductEditorComp extends Composite implements
|
||||||
// StyledTextComp to re-evaluate whether a reParse() is needed and
|
// StyledTextComp to re-evaluate whether a reParse() is needed and
|
||||||
// ask it for the segment information each time through the loop (in
|
// ask it for the segment information each time through the loop (in
|
||||||
// case we're at one of the 4 transition points).
|
// case we're at one of the 4 transition points).
|
||||||
|
|
||||||
// Update segments' time
|
// Update segments' time
|
||||||
try {
|
try {
|
||||||
ProductDataStruct pds = textComp.getProductDataStruct();
|
ProductDataStruct pds = textComp.getProductDataStruct();
|
||||||
|
|
||||||
|
@ -2011,7 +2014,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
fmt.setTimeZone(localTimeZone);
|
fmt.setTimeZone(localTimeZone);
|
||||||
String officeIssueTime = fmt.format(now).toUpperCase();
|
String officeIssueTime = fmt.format(now).toUpperCase();
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < numSegments; i++) {
|
for (int i = 0; i < numSegments; i++) {
|
||||||
textComp.startUpdate();
|
textComp.startUpdate();
|
||||||
HashMap<String, TextIndexPoints> segMap = pds
|
HashMap<String, TextIndexPoints> segMap = pds
|
||||||
|
@ -2080,14 +2083,14 @@ public class ProductEditorComp extends Composite implements
|
||||||
* returns the appropriate expiration time. Expiration time is the earliest
|
* returns the appropriate expiration time. Expiration time is the earliest
|
||||||
* of the specified expiration time, 1 hr if a CAN code is detected, or the
|
* of the specified expiration time, 1 hr if a CAN code is detected, or the
|
||||||
* ending time of ongoing events (CON, EXT, EXB, NEW).
|
* ending time of ongoing events (CON, EXT, EXB, NEW).
|
||||||
*
|
*
|
||||||
* @param issTime
|
* @param issTime
|
||||||
* issue time
|
* issue time
|
||||||
* @param expTime
|
* @param expTime
|
||||||
* expire time
|
* expire time
|
||||||
* @param vtecStr
|
* @param vtecStr
|
||||||
* vtec string
|
* vtec string
|
||||||
*
|
*
|
||||||
* @return expire time
|
* @return expire time
|
||||||
*/
|
*/
|
||||||
public Date getExpireTime(Date issTime, Date expTime, String vtecStr) {
|
public Date getExpireTime(Date issTime, Date expTime, String vtecStr) {
|
||||||
|
@ -2170,6 +2173,8 @@ public class ProductEditorComp extends Composite implements
|
||||||
*/
|
*/
|
||||||
private void loadPrevious() {
|
private void loadPrevious() {
|
||||||
String initialValue;
|
String initialValue;
|
||||||
|
textComp.setCorMode(true);
|
||||||
|
|
||||||
if (!testVTEC) {
|
if (!testVTEC) {
|
||||||
initialValue = "cccnnnxxx";
|
initialValue = "cccnnnxxx";
|
||||||
} else {
|
} else {
|
||||||
|
@ -2214,9 +2219,10 @@ public class ProductEditorComp extends Composite implements
|
||||||
}
|
}
|
||||||
parseIDs();
|
parseIDs();
|
||||||
revive();
|
revive();
|
||||||
|
|
||||||
// Enter res mode
|
// Enter res mode
|
||||||
setPTypeCategory(PTypeCategory.PE);
|
setPTypeCategory(PTypeCategory.PE);
|
||||||
textComp.setCorMode(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2353,7 +2359,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the directory.
|
* Get the directory.
|
||||||
*
|
*
|
||||||
* @return The directory
|
* @return The directory
|
||||||
*/
|
*/
|
||||||
private String getDir() {
|
private String getDir() {
|
||||||
|
@ -2491,7 +2497,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the Find or Find & Replace dialog.
|
* Display the Find or Find & Replace dialog.
|
||||||
*
|
*
|
||||||
* @param findAndReplace
|
* @param findAndReplace
|
||||||
* If true show the Find & Replace dialog, false shows the Find
|
* If true show the Find & Replace dialog, false shows the Find
|
||||||
* dialog.
|
* dialog.
|
||||||
|
@ -2733,7 +2739,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @seecom.raytheon.uf.common.jms.notification.INotificationObserver#
|
* @seecom.raytheon.uf.common.jms.notification.INotificationObserver#
|
||||||
* notificationArrived
|
* notificationArrived
|
||||||
* (com.raytheon.uf.common.jms.notification.NotificationMessage[])
|
* (com.raytheon.uf.common.jms.notification.NotificationMessage[])
|
||||||
|
@ -2915,7 +2921,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Word-wrap the text selected by the user.
|
* Word-wrap the text selected by the user.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void doWrapSelection() {
|
private void doWrapSelection() {
|
||||||
StyledText styledText = textComp.getTextEditorST();
|
StyledText styledText = textComp.getTextEditorST();
|
||||||
|
@ -2991,7 +2997,7 @@ public class ProductEditorComp extends Composite implements
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.
|
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.
|
||||||
* IProgressMonitor)
|
* IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@ -3062,9 +3068,5 @@ public class ProductEditorComp extends Composite implements
|
||||||
callToActionsMI.setMenu(callToActionsSubMenu);
|
callToActionsMI.setMenu(callToActionsSubMenu);
|
||||||
createCallToActionsMenu(callToActionsSubMenu);
|
createCallToActionsMenu(callToActionsSubMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isUpdateTime() {
|
|
||||||
return updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Composite containing the product editor.
|
* Composite containing the product editor.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
|
@ -87,16 +87,18 @@ import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil;
|
||||||
* 28 JAN 2015 4018 randerso Code cleanup. Fixed reparsing when framing codes are cut
|
* 28 JAN 2015 4018 randerso Code cleanup. Fixed reparsing when framing codes are cut
|
||||||
* or pasted instead of just typed over.
|
* or pasted instead of just typed over.
|
||||||
* Added logging of text changes to help diagnose future issues.
|
* Added logging of text changes to help diagnose future issues.
|
||||||
* 04 FEB 2015 17039 ryu Removed HighlightFramingCodes feature which prevented
|
* 04 FEB 2015 17039 ryu Removed HighlightFramingCodes feature which prevented
|
||||||
* editing of framing codes.
|
* editing of framing codes.
|
||||||
* 07/02/2015 13753 lshi Update times for products in Product Editor
|
* 07/02/2015 13753 lshi Update times for products in Product Editor
|
||||||
*
|
* 08/06/2015 13753 lshi use isSystemTextChange instead of isUpdateTime
|
||||||
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class StyledTextComp extends Composite {
|
public class StyledTextComp extends Composite {
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||||
.getHandler(StyledTextComp.class);
|
.getHandler(StyledTextComp.class);
|
||||||
|
@ -130,7 +132,7 @@ public class StyledTextComp extends Composite {
|
||||||
/**
|
/**
|
||||||
* Parent composite.
|
* Parent composite.
|
||||||
*/
|
*/
|
||||||
private ProductEditorComp parent;
|
private final ProductEditorComp parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Styled text editor.
|
* Styled text editor.
|
||||||
|
@ -178,7 +180,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
private boolean updatingForCor = false;
|
private boolean updatingForCor = false;
|
||||||
|
|
||||||
private ProductEditorLogger peLog;
|
private final ProductEditorLogger peLog;
|
||||||
|
|
||||||
private static final String NORM_SEP = "^\\s*$";
|
private static final String NORM_SEP = "^\\s*$";
|
||||||
|
|
||||||
|
@ -199,7 +201,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent
|
||||||
* Parent composite.
|
* Parent composite.
|
||||||
* @param wrapMode
|
* @param wrapMode
|
||||||
|
@ -303,7 +305,7 @@ public class StyledTextComp extends Composite {
|
||||||
updateTextStyle(event);
|
updateTextStyle(event);
|
||||||
checkAutoWrap(event);
|
checkAutoWrap(event);
|
||||||
|
|
||||||
if (corMode && !updatingForCor) {
|
if (corMode && !updatingForCor && !isSystemTextChange()) {
|
||||||
updatingForCor = true;
|
updatingForCor = true;
|
||||||
try {
|
try {
|
||||||
makeCorrections();
|
makeCorrections();
|
||||||
|
@ -321,7 +323,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the StyledText editor.
|
* Get the StyledText editor.
|
||||||
*
|
*
|
||||||
* @return The StyledText editor.
|
* @return The StyledText editor.
|
||||||
*/
|
*/
|
||||||
public StyledText getTextEditorST() {
|
public StyledText getTextEditorST() {
|
||||||
|
@ -330,17 +332,15 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the product text.
|
* Set the product text.
|
||||||
*
|
*
|
||||||
* @param text
|
* @param text
|
||||||
* The product text.
|
* The product text.
|
||||||
*/
|
*/
|
||||||
public void setProductText(String text) {
|
public void setProductText(String text) {
|
||||||
newProduct = true;
|
newProduct = true;
|
||||||
textEditorST.setText(EMPTY);
|
|
||||||
textEditorST.setStyleRange(null);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
parseProductText(text);
|
parseProductText(text);
|
||||||
|
textEditorST.setStyleRange(null);
|
||||||
textEditorST.setText(text);
|
textEditorST.setText(text);
|
||||||
lockText();
|
lockText();
|
||||||
findFramingCodes();
|
findFramingCodes();
|
||||||
|
@ -348,6 +348,7 @@ public class StyledTextComp extends Composite {
|
||||||
newProduct = false;
|
newProduct = false;
|
||||||
} catch (JepException e) {
|
} catch (JepException e) {
|
||||||
statusHandler.error(PRODUCT_PARSE_ERROR, e);
|
statusHandler.error(PRODUCT_PARSE_ERROR, e);
|
||||||
|
textEditorST.setText(EMPTY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,7 +502,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the product text string.
|
* Parse the product text string.
|
||||||
*
|
*
|
||||||
* @param productText
|
* @param productText
|
||||||
* Complete product text.
|
* Complete product text.
|
||||||
* @throws JepException
|
* @throws JepException
|
||||||
|
@ -597,7 +598,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replacement of the text in the given range with new text.
|
* Replacement of the text in the given range with new text.
|
||||||
*
|
*
|
||||||
* @param tip
|
* @param tip
|
||||||
* the range of text to be replaced
|
* the range of text to be replaced
|
||||||
* @param text
|
* @param text
|
||||||
|
@ -626,11 +627,7 @@ public class StyledTextComp extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void makeCorrections() {
|
private void makeCorrections() {
|
||||||
if (!parent.isUpdateTime()) {
|
parent.setPTypeCategory(PTypeCategory.COR);
|
||||||
parent.setPTypeCategory(PTypeCategory.COR);
|
|
||||||
}
|
|
||||||
if (prodDataStruct == null)
|
|
||||||
return;
|
|
||||||
List<SegmentData> segs = prodDataStruct.getSegmentsArray();
|
List<SegmentData> segs = prodDataStruct.getSegmentsArray();
|
||||||
for (SegmentData seg : segs) {
|
for (SegmentData seg : segs) {
|
||||||
if (seg.getSementMap().keySet().contains("vtec")) {
|
if (seg.getSementMap().keySet().contains("vtec")) {
|
||||||
|
@ -710,7 +707,7 @@ public class StyledTextComp extends Composite {
|
||||||
* A verify event occurs after the user has done something to modify the
|
* A verify event occurs after the user has done something to modify the
|
||||||
* text (typically typed a key), but before the text is modified. The doit
|
* text (typically typed a key), but before the text is modified. The doit
|
||||||
* field in the verify event indicates whether or not to modify the text.
|
* field in the verify event indicates whether or not to modify the text.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event
|
||||||
* Verify event that was fired.
|
* Verify event that was fired.
|
||||||
*/
|
*/
|
||||||
|
@ -800,7 +797,7 @@ public class StyledTextComp extends Composite {
|
||||||
/**
|
/**
|
||||||
* Check if there is selected text and if there is locked text in the
|
* Check if there is selected text and if there is locked text in the
|
||||||
* selected text.
|
* selected text.
|
||||||
*
|
*
|
||||||
* @return True if there is selected text that contains locked text.
|
* @return True if there is selected text that contains locked text.
|
||||||
*/
|
*/
|
||||||
private boolean selectionHasLockedText() {
|
private boolean selectionHasLockedText() {
|
||||||
|
@ -814,12 +811,12 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if there is locked text in the specified range of text.
|
* Check if there is locked text in the specified range of text.
|
||||||
*
|
*
|
||||||
* @param offset
|
* @param offset
|
||||||
* The starting point of the locked text search.
|
* The starting point of the locked text search.
|
||||||
* @param length
|
* @param length
|
||||||
* The length of the search.
|
* The length of the search.
|
||||||
*
|
*
|
||||||
* @return Whether or not there is text in the range that contains locked
|
* @return Whether or not there is text in the range that contains locked
|
||||||
* text.
|
* text.
|
||||||
*/
|
*/
|
||||||
|
@ -837,7 +834,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the key being pressed is a "non-edit" key.
|
* Check if the key being pressed is a "non-edit" key.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event
|
||||||
* Verify event.
|
* Verify event.
|
||||||
* @return True if the key is an arrow or "non-edit" key.
|
* @return True if the key is an arrow or "non-edit" key.
|
||||||
|
@ -871,7 +868,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle the mouse down event.
|
* Handle the mouse down event.
|
||||||
*
|
*
|
||||||
* @param e
|
* @param e
|
||||||
* Event fired.
|
* Event fired.
|
||||||
*/
|
*/
|
||||||
|
@ -986,7 +983,7 @@ public class StyledTextComp extends Composite {
|
||||||
/**
|
/**
|
||||||
* Checks if the system is editing, e.g. updating the issue time every
|
* Checks if the system is editing, e.g. updating the issue time every
|
||||||
* minute, vs a user typing text in the text area
|
* minute, vs a user typing text in the text area
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private boolean isSystemTextChange() {
|
private boolean isSystemTextChange() {
|
||||||
|
@ -1142,7 +1139,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the column at which wrap and auto-wrap will wrap the text.
|
* Getter for the column at which wrap and auto-wrap will wrap the text.
|
||||||
*
|
*
|
||||||
* @return the column number
|
* @return the column number
|
||||||
*/
|
*/
|
||||||
public int getWrapColumn() {
|
public int getWrapColumn() {
|
||||||
|
@ -1151,7 +1148,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the column at which wrap and auto-wrap will wrap the text.
|
* Getter for the column at which wrap and auto-wrap will wrap the text.
|
||||||
*
|
*
|
||||||
* @param wrapColumn
|
* @param wrapColumn
|
||||||
* the column number
|
* the column number
|
||||||
*/
|
*/
|
||||||
|
@ -1190,7 +1187,7 @@ public class StyledTextComp extends Composite {
|
||||||
/**
|
/**
|
||||||
* Query the prefs for setting. If it does not exist, use colorDft as its
|
* Query the prefs for setting. If it does not exist, use colorDft as its
|
||||||
* value. Create an SWT Color for display from the value and return it.
|
* value. Create an SWT Color for display from the value and return it.
|
||||||
*
|
*
|
||||||
* @param prefs
|
* @param prefs
|
||||||
* A preference store which might have config values.
|
* A preference store which might have config values.
|
||||||
* @param display
|
* @param display
|
||||||
|
@ -1213,7 +1210,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a PROBLEM message if color1 is exactly equal to color2.
|
* Send a PROBLEM message if color1 is exactly equal to color2.
|
||||||
*
|
*
|
||||||
* @param color1
|
* @param color1
|
||||||
* the first color
|
* the first color
|
||||||
* @param color2
|
* @param color2
|
||||||
|
@ -1240,7 +1237,7 @@ public class StyledTextComp extends Composite {
|
||||||
* <p>
|
* <p>
|
||||||
* The getter name is different to avoid confusion with the getFgColor()
|
* The getter name is different to avoid confusion with the getFgColor()
|
||||||
* method of Control.
|
* method of Control.
|
||||||
*
|
*
|
||||||
* @return the foreground Color
|
* @return the foreground Color
|
||||||
*/
|
*/
|
||||||
public Color getFgndColor() {
|
public Color getFgndColor() {
|
||||||
|
@ -1251,7 +1248,7 @@ public class StyledTextComp extends Composite {
|
||||||
* Get the framed text color of the StyledTextComp. This is the actual
|
* Get the framed text color of the StyledTextComp. This is the actual
|
||||||
* color, not a copy. It will be disposed when the StyledTextComp is, and
|
* color, not a copy. It will be disposed when the StyledTextComp is, and
|
||||||
* should not be disposed before then.
|
* should not be disposed before then.
|
||||||
*
|
*
|
||||||
* @return the frameColor
|
* @return the frameColor
|
||||||
*/
|
*/
|
||||||
public Color getFrameColor() {
|
public Color getFrameColor() {
|
||||||
|
@ -1262,7 +1259,7 @@ public class StyledTextComp extends Composite {
|
||||||
* Get the insert color of the StyledTextComp. This is the actual color, not
|
* Get the insert color of the StyledTextComp. This is the actual color, not
|
||||||
* a copy. It will be disposed when the StyledTextComp is, and should not be
|
* a copy. It will be disposed when the StyledTextComp is, and should not be
|
||||||
* disposed before then.
|
* disposed before then.
|
||||||
*
|
*
|
||||||
* @return the insertColor
|
* @return the insertColor
|
||||||
*/
|
*/
|
||||||
public Color getInsertColor() {
|
public Color getInsertColor() {
|
||||||
|
@ -1273,7 +1270,7 @@ public class StyledTextComp extends Composite {
|
||||||
* Get the locked text color of the StyledTextComp. This is the actual
|
* Get the locked text color of the StyledTextComp. This is the actual
|
||||||
* color, not a copy. It will be disposed when the StyledTextComp is, and
|
* color, not a copy. It will be disposed when the StyledTextComp is, and
|
||||||
* should not be disposed before then.
|
* should not be disposed before then.
|
||||||
*
|
*
|
||||||
* @return the lockColor
|
* @return the lockColor
|
||||||
*/
|
*/
|
||||||
public Color getLockColor() {
|
public Color getLockColor() {
|
||||||
|
@ -1283,7 +1280,7 @@ public class StyledTextComp extends Composite {
|
||||||
/**
|
/**
|
||||||
* Word wrap the text in the block around cursorIndex. Adjust the cursor
|
* Word wrap the text in the block around cursorIndex. Adjust the cursor
|
||||||
* position to account for inserted or deleted whitespace.
|
* position to account for inserted or deleted whitespace.
|
||||||
*
|
*
|
||||||
* @param st
|
* @param st
|
||||||
* The StyledText in which word wrap is to be performed
|
* The StyledText in which word wrap is to be performed
|
||||||
* @param cursorIndex
|
* @param cursorIndex
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
# Mar 23, 2015 #4308 dgilling Export mixedCaseProductIds.txt.
|
# Mar 23, 2015 #4308 dgilling Export mixedCaseProductIds.txt.
|
||||||
# Apr 28, 2015 #4427 dgilling Support subdomains of the
|
# Apr 28, 2015 #4427 dgilling Support subdomains of the
|
||||||
# primary domains.
|
# primary domains.
|
||||||
|
# Aug 10, 2015 #17443 lshi Bug in scripts results in rsync_parms.ccc
|
||||||
|
# file not getting used
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
|
@ -73,7 +75,7 @@ echo "Preparing configuration files for export..."
|
||||||
edexDest=${OUTPUT_DIR}/GFEconfig/edex_static
|
edexDest=${OUTPUT_DIR}/GFEconfig/edex_static
|
||||||
commonDest=${OUTPUT_DIR}/GFEconfig/common_static
|
commonDest=${OUTPUT_DIR}/GFEconfig/common_static
|
||||||
caveDest=${OUTPUT_DIR}/GFEconfig/cave_static
|
caveDest=${OUTPUT_DIR}/GFEconfig/cave_static
|
||||||
rsyncParms=GFEConfig # DR 16464
|
rsyncParmsDest=${OUTPUT_DIR}/GFEConfig/site # DR 16464/17443
|
||||||
|
|
||||||
echo "Making temporary edex configuration directories..."
|
echo "Making temporary edex configuration directories..."
|
||||||
mkdir -p $edexDest/site
|
mkdir -p $edexDest/site
|
||||||
|
@ -86,7 +88,7 @@ mkdir -p $caveDest/site
|
||||||
|
|
||||||
# DR 16464
|
# DR 16464
|
||||||
echo "Making temporary rsync_parms directory"
|
echo "Making temporary rsync_parms directory"
|
||||||
mkdir -p $rsyncParms/site
|
mkdir -p $rsyncParmsDest
|
||||||
|
|
||||||
CP_COMMAND="rsync -aq --exclude=*.pyo --exclude=*.pyc --exclude=*.md5"
|
CP_COMMAND="rsync -aq --exclude=*.pyo --exclude=*.pyc --exclude=*.md5"
|
||||||
|
|
||||||
|
@ -112,10 +114,10 @@ ${CP_COMMAND} ${LOCALIZATION_PATH}/cave_static/site/${CAPS_SITE}/bundles/maps $c
|
||||||
echo "Copying cave site colormaps configuration for site ${CAPS_SITE} to temporary directory..."
|
echo "Copying cave site colormaps configuration for site ${CAPS_SITE} to temporary directory..."
|
||||||
${CP_COMMAND} ${LOCALIZATION_PATH}/common_static/site/${CAPS_SITE}/colormaps $commonDest/site
|
${CP_COMMAND} ${LOCALIZATION_PATH}/common_static/site/${CAPS_SITE}/colormaps $commonDest/site
|
||||||
|
|
||||||
# DR 16464
|
# DR 16464, 17443: CAPS_SITE->SITE (lower case)
|
||||||
if [ -f ${IFPS_DATA}/rsync_parms.${CAPS_SITE} ]; then
|
if [ -f ${IFPS_DATA}/rsync_parms.${SITE} ]; then
|
||||||
echo "Copying the rsync_parms file for site ${CAPS_SITE} to temporary directory..."
|
echo "Copying the rsync_parms file for site ${SITE} to temporary directory..."
|
||||||
cp -a ${IFPS_DATA}/rsync_parms.${CAPS_SITE} $rsyncParms/site
|
cp -a ${IFPS_DATA}/rsync_parms.${SITE} $rsyncParmsDest
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine if we're exporting for this site or for its subdomains
|
# Determine if we're exporting for this site or for its subdomains
|
||||||
|
@ -152,9 +154,9 @@ do
|
||||||
sed -i "s/$ORIG_SITEID/$NEW_SITEID/" ${config}
|
sed -i "s/$ORIG_SITEID/$NEW_SITEID/" ${config}
|
||||||
|
|
||||||
# rename rsync_parms to use sub-domain site ID
|
# rename rsync_parms to use sub-domain site ID
|
||||||
if [ -f ${site_dir}/GFEConfig/site/rsync_parms.${CAPS_SITE} ]
|
if [ -f ${site_dir}/GFEConfig/site/rsync_parms.${SITE} ]
|
||||||
then
|
then
|
||||||
mv ${site_dir}/GFEConfig/site/rsync_parms.${CAPS_SITE} ${site_dir}/GFEConfig/site/rsync_parms.${siteid_caps}
|
mv ${site_dir}/GFEConfig/site/rsync_parms.${SITE} ${site_dir}/GFEConfig/site/rsync_parms.${siteid_lc}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
# 04/29/15 #4427 dgilling Code cleanup.
|
# 04/29/15 #4427 dgilling Code cleanup.
|
||||||
# 06/24/15 #16831 bhunder Copy colormaps directory into localization
|
# 06/24/15 #16831 bhunder Copy colormaps directory into localization
|
||||||
# directory.
|
# directory.
|
||||||
# 06/30/15 #17443 lshi Bug in scripts results in rsync_parms.ccc
|
# 08/10/15 #17443 lshi Bug in scripts results in rsync_parms.ccc
|
||||||
# file not getting used
|
# file not getting used
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ cp -r GFEconfig/cave_static/site/* ${cave_site_dest}
|
||||||
cp -r GFEconfig/common_static/site/colormaps ${common_site_dest}
|
cp -r GFEconfig/common_static/site/colormaps ${common_site_dest}
|
||||||
|
|
||||||
# DR 17443
|
# DR 17443
|
||||||
cp -a GFEConfig/site/rsync_parms.${SITE_ID_CAPS} ${rsync_parms_dest}
|
cp -a GFEConfig/site/rsync_parms.${SITE_ID} ${rsync_parms_dest}
|
||||||
echo "Files successfully copied!"
|
echo "Files successfully copied!"
|
||||||
|
|
||||||
echo "Changing ownership of received configuration"
|
echo "Changing ownership of received configuration"
|
||||||
|
|
|
@ -21,14 +21,14 @@
|
||||||
id="gov.noaa.nws.sr.oun.dataplugin.mping"
|
id="gov.noaa.nws.sr.oun.dataplugin.mping"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
install-size="0"
|
install-size="0"
|
||||||
version="1.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="gov.noaa.nws.sr.oun.edex.plugin.mping"
|
id="gov.noaa.nws.sr.oun.edex.plugin.mping"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
install-size="0"
|
install-size="0"
|
||||||
version="1.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
</feature>
|
</feature>
|
||||||
|
|
Loading…
Add table
Reference in a new issue