diff --git a/cave/com.raytheon.uf.viz.spellchecker/src/com/raytheon/uf/viz/spellchecker/dialogs/SpellCheckDlg.java b/cave/com.raytheon.uf.viz.spellchecker/src/com/raytheon/uf/viz/spellchecker/dialogs/SpellCheckDlg.java index 7c638932d0..69684103a3 100755 --- a/cave/com.raytheon.uf.viz.spellchecker/src/com/raytheon/uf/viz/spellchecker/dialogs/SpellCheckDlg.java +++ b/cave/com.raytheon.uf.viz.spellchecker/src/com/raytheon/uf/viz/spellchecker/dialogs/SpellCheckDlg.java @@ -66,7 +66,6 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.util.FileUtil; -import com.raytheon.uf.viz.spellchecker.Activator; import com.raytheon.uf.viz.spellchecker.jobs.SpellCheckJob; /** @@ -79,6 +78,7 @@ import com.raytheon.uf.viz.spellchecker.jobs.SpellCheckJob; * 18 APR 2008 ### lvenable Initial creation * 01Mar2010 4765 MW Fegan Moved from GFE plug-in. * 09/24/2014 #16693 lshi filter out swear words in spelling check + * 10/23/2014 #3685 randerso Changes to support mixed case * * * @@ -87,9 +87,10 @@ import com.raytheon.uf.viz.spellchecker.jobs.SpellCheckJob; * */ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector { - private static java.util.List swearWords = Arrays.asList("ASSHOLE"); + private static java.util.List swearWords = Arrays.asList("ASSHOLE"); - private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(SpellCheckDlg.class); + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(SpellCheckDlg.class); private static final Pattern DIGITS = Pattern.compile("\\d"); @@ -331,6 +332,7 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector { * org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#accept(org * .eclipse.ui.texteditor.spelling.SpellingProblem) */ + @Override public void accept(SpellingProblem problem) { if (shell.isDisposed()) { return; @@ -345,15 +347,16 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector { misspelledLbl.setText(badWord); ICompletionProposal[] proposals = problem.getProposals(); - if (proposals != null && proposals.length > 0) { + if ((proposals != null) && (proposals.length > 0)) { for (ICompletionProposal proposal : proposals) { String pdString = proposal.getDisplayString(); Matcher pdMatch = CHANGE_TO.matcher(pdString); if (pdMatch.matches()) { - String replString = pdMatch.group(1).toUpperCase(); + String replString = pdMatch.group(1); // proposals may include case changes, which get lost - //if (replString != badWord) { - if (!swearWords.contains(replString) && !replString.equals(badWord)) { + // if (replString != badWord) { + if (!swearWords.contains(replString) + && !replString.equals(badWord)) { suggestionList.add(replString); } } @@ -370,7 +373,7 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector { StyleRange styleRange = styledText.getStyleRangeAtOffset(problem .getOffset()); - if (styleRange == null || styleRange.isUnstyled() + if ((styleRange == null) || styleRange.isUnstyled() || styleRange.similarTo(REDSTYLE)) { if (ignoreAll.contains(badWord)) { scanForErrors(); @@ -407,6 +410,7 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector { * org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#beginCollecting * () */ + @Override public void beginCollecting() { // nothing at present } @@ -531,7 +535,7 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector { probStart = matcher.start(2); // Only replace unstyled (unlocked) instances styleRange = styledText.getStyleRangeAtOffset(probStart); - if (styleRange == null || styleRange.isUnstyled()) { + if ((styleRange == null) || styleRange.isUnstyled()) { repList.addFirst(Integer.valueOf(probStart)); } found = matcher.find(); @@ -582,7 +586,8 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector { try { userDLFile.save(); } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, "Error saving user dictionary", e); + statusHandler.handle(Priority.PROBLEM, + "Error saving user dictionary", e); } // The spell check job might have a backlog of errors // for this word, which no longer apply. @@ -658,6 +663,7 @@ public class SpellCheckDlg extends Dialog implements ISpellingProblemCollector { * org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#endCollecting * () */ + @Override public void endCollecting() { MessageDialog.openInformation(shell, "", "Done checking document"); styledText.setSelectionRange(0, 0); diff --git a/edexOsgi/build.edex/opt/db/ddl/maps/importShapeFile.sh b/edexOsgi/build.edex/opt/db/ddl/maps/importShapeFile.sh index df8caf253e..1462dcdf0b 100644 --- a/edexOsgi/build.edex/opt/db/ddl/maps/importShapeFile.sh +++ b/edexOsgi/build.edex/opt/db/ddl/maps/importShapeFile.sh @@ -23,6 +23,8 @@ # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 03/25/2014 #2664 randerso Added support for importing non-WGS84 shape files +# 10/23/2014 #3685 randerso Fixed bug where .prj was not recognized when shape file +# was in the current directory (no directory specified) # ## @@ -46,7 +48,7 @@ if [ $# -lt 3 ] ; then exit -1 fi -SHP_PATH=${1} +SHP_PATH=`readlink -f ${1}` SHP_DIR="${SHP_PATH%/*}" # shape file dir SHP_NAME="${SHP_PATH##*/}" # shape file name with extension SHP_BASE="${SHP_NAME%.*}" # shape file name without extension