Merge branch 'ss_builds' into Unified_Grid
Conflicts: edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpcGuideNDFD.xml Former-commit-id:a67ce9586c
[formerlyde3769129c
] [formerly8b7256b1ae
] [formerly266a2f317f
[formerly8b7256b1ae
[formerly f5ae7bbd116ddc19b4fd6c8518089fa11b78ec90]]] Former-commit-id:266a2f317f
Former-commit-id: aad7acdf220a9ba94d6a280496d0b78f3466b6be [formerlyfed5a35af3
] Former-commit-id:fde1e73d58
This commit is contained in:
commit
97c23508d7
313 changed files with 46796 additions and 36643 deletions
|
@ -224,8 +224,14 @@ class Procedure (SmartScript.SmartScript):
|
|||
hazardKey = selectedHazard
|
||||
|
||||
defaultHazKey = ""
|
||||
if len(defaultSegment) > 0 and defaultHazard is not None:
|
||||
defaultHazKey = defaultHazard + ":" + defaultSegment
|
||||
if defaultHazard is not None:
|
||||
index = string.find(defaultHazard, " ")
|
||||
if index != -1:
|
||||
defaultHazard = defaultHazard[0:index]
|
||||
defaultHazKey = defaultHazard
|
||||
|
||||
if len(defaultSegment) > 0:
|
||||
defaultHazKey += ":" + defaultSegment
|
||||
|
||||
weName = self._hazUtils._makeTempWEName(hazardKey)
|
||||
|
||||
|
|
|
@ -796,7 +796,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
if "A" == status:
|
||||
importance = Priority.PROBLEM
|
||||
elif "R" == status:
|
||||
importance = Priority.EVENTB
|
||||
importance = Priority.EVENTA
|
||||
elif "U" == status:
|
||||
importance = Priority.CRITICAL
|
||||
else:
|
||||
|
|
|
@ -43,8 +43,9 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);">
|
|||
]]>
|
||||
</style>
|
||||
<symbol overflow="visible" id="plotData" class="info">
|
||||
<text id="turbInensity" plotMode="table" class="weather" plotLookupTable="airep_turb_intens_trans.txt" plotParam="FLT_HZD" x="0" y="0">0</text>
|
||||
<text id="fltLvlText" plotMode="text" plotParam="FLT_LVL" plotFormat="%3.0f" plotUnit="hft" style="text-anchor: end;" x="-15px" y="0px">75</text>
|
||||
<text id="airepturbIntensity" plotMode="table" class="weather" plotLookupTable="turb_intens_trans.txt" plotParam="TBI" x="0" y="0">0</text>
|
||||
<text id="airepturbFreq" plotMode="table" class="weather" plotLookupTable="turb_freq_trans.txt" plotParam="TBF" style="text-anchor: end" x="0" y="-10">0</text>
|
||||
<text id="airepfltLvlText" plotMode="text" plotParam="FLT_LVL" plotFormat="%3.0f" plotUnit="hft" style="text-anchor: end;" x="-15px" y="0px">75</text>
|
||||
</symbol>
|
||||
|
||||
</defs>
|
||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
|
@ -46,6 +46,7 @@ from java.util import HashSet
|
|||
# ------------ ---------- ----------- --------------------------
|
||||
# 04/01/09 njensen Initial Creation.
|
||||
# 08/20/2012 #1077 randerso Fixed backgroundColor setting
|
||||
# 09/13/2012 #1147 dgilling Allow map labels to be disabled.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
@ -160,7 +161,6 @@ class GFEPainter(VizPainter.VizPainter):
|
|||
rsc.getCapability(LabelableCapability).setxOffset(xOffset)
|
||||
if yOffset is not None:
|
||||
rsc.getCapability(LabelableCapability).setyOffset(yOffset)
|
||||
if labelAttribute is not None:
|
||||
rsc.getCapability(LabelableCapability).setLabelField(labelAttribute)
|
||||
if fontOffset is not None:
|
||||
mag = Double(1.26 ** fontOffset)
|
||||
|
|
|
@ -88,7 +88,8 @@ fi
|
|||
while [ $exitVal -ne 0 ]
|
||||
do
|
||||
curTime=`date +%Y%m%d_%H%M%S`
|
||||
LOGFILE=${LOGDIR}/alertviz_${curTime}.log
|
||||
LOGFILE=${LOGDIR}/alertviz_${curTime}_console.log
|
||||
export LOGFILE_ALERTVIZ=${LOGDIR}/alertviz_${curTime}_admin.log
|
||||
|
||||
#first check if we can write to the directory
|
||||
if [ -w ${LOGDIR} ]; then
|
||||
|
|
|
@ -116,7 +116,8 @@ fi
|
|||
export pid=$$
|
||||
|
||||
curTime=`date +%Y%m%d_%H%M%S`
|
||||
LOGFILE=${LOGDIR}/cave_${curTime}_pid_${pid}.log
|
||||
LOGFILE=${LOGDIR}/cave_${curTime}_pid_${pid}_console.log
|
||||
export LOGFILE_CAVE=${LOGDIR}/cave_${curTime}_pid_${pid}_alertviz.log
|
||||
|
||||
redirect="TRUE"
|
||||
for flag in $@; do
|
||||
|
|
|
@ -632,7 +632,7 @@ public class AlertVisualization implements ITimerAction, IAudioAction,
|
|||
|| statMsg.getSourceKey().equals("GDN_ADMIN");
|
||||
|
||||
if (isGdnAdminMessage) {
|
||||
Container.logInternal(statMsg);
|
||||
// Container.logInternal(statMsg);
|
||||
if ((statMsg.getDetails() != null)
|
||||
&& (statMsg.getDetails().contains("Error")
|
||||
|| statMsg.getDetails().contains("Exception")
|
||||
|
|
|
@ -29,3 +29,5 @@ Import-Package: com.raytheon.uf.common.python,
|
|||
com.raytheon.uf.viz.python.swt,
|
||||
com.raytheon.uf.viz.python.swt.widgets
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Eclipse-BuddyPolicy: ext, registered, global
|
||||
Eclipse-RegisterBuddy: org.apache.log4j
|
||||
|
|
|
@ -6,4 +6,5 @@ bin.includes = META-INF/,\
|
|||
lib/derbyrun.jar,\
|
||||
lib/derby.jar,\
|
||||
statusMessage.xsd,\
|
||||
config.xml
|
||||
config.xml,\
|
||||
log4j-alertviz.xml
|
||||
|
|
79
cave/com.raytheon.uf.viz.alertviz/log4j-alertviz.xml
Normal file
79
cave/com.raytheon.uf.viz.alertviz/log4j-alertviz.xml
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
<!-- general application log -->
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p %d [%t] %c{1}: %m%n"/>
|
||||
</layout>
|
||||
<filter class="org.apache.log4j.varia.LevelRangeFilter">
|
||||
<param name="levelMin" value="DEBUG" />
|
||||
<param name="levelMax" value="INFO" />
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="errConsole" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.err"/>
|
||||
<param name="Threshold" value="WARN" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p %d [%t] %c{1}: %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="AlertVizAdminLogAppender" class="com.raytheon.uf.viz.alertviz.EnvConfigurableRollingFileAppender">
|
||||
<param name="envLogVar" value="LOGFILE_ALERTVIZ" />
|
||||
<param name="maxFileSize" value="2GB"/>
|
||||
<param name="maxBackupIndex" value="5"/>
|
||||
<param name="Append" value="true"/>
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p %d [%t] : %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="AlertVizAdminLogger" additivity="false">
|
||||
<level value="ALL"/>
|
||||
<appender-ref ref="AlertVizAdminLogAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.raytheon">
|
||||
<level value="INFO"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.tc">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="mx4j">
|
||||
<level value="ERROR"/>
|
||||
</logger>
|
||||
<logger name="org.apache">
|
||||
<level value="INFO"/>
|
||||
</logger>
|
||||
<logger name="org.apache.activemq.spring">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.apache.commons.beanutils">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.apache.qpid">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.geotools">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.apache.xbean.spring">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.springframework">
|
||||
<level value="ERROR"/>
|
||||
</logger>
|
||||
<logger name="uk.ltd.getahead">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
|
||||
<!-- default logging -->
|
||||
<root>
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="console"/>
|
||||
<appender-ref ref="errConsole"/>
|
||||
</root>
|
||||
</log4j:configuration>
|
|
@ -230,7 +230,7 @@ public class AlertvizJob extends Job {
|
|||
e);
|
||||
StatusMessage sm = new StatusMessage();
|
||||
sm.setPriority(Priority.CRITICAL);
|
||||
sm.setMachine("LOCAL");
|
||||
sm.setMachineToCurrent();
|
||||
sm.setCategory("GDN_ADMIN");
|
||||
sm.setSourceKey("GDN_ADMIN");
|
||||
sm.setMessage(e.getMessage());
|
||||
|
|
|
@ -36,7 +36,7 @@ import com.raytheon.uf.viz.alertviz.config.Category;
|
|||
import com.raytheon.uf.viz.alertviz.config.Configuration;
|
||||
import com.raytheon.uf.viz.alertviz.config.ForcedConfiguration;
|
||||
import com.raytheon.uf.viz.alertviz.config.Source;
|
||||
import com.raytheon.uf.viz.alertviz.internal.ArchiveLogJob;
|
||||
import com.raytheon.uf.viz.alertviz.internal.PurgeLogJob;
|
||||
import com.raytheon.uf.viz.alertviz.internal.LogMessageDAO;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
|
||||
|
@ -63,8 +63,8 @@ public class Container implements IConfigurationChangedListener {
|
|||
|
||||
public static final String SOURCE_MISSING = "Source was not found";
|
||||
|
||||
private transient static final org.apache.log4j.Logger internalLogger = Logger
|
||||
.getLogger("AlertVizLogger");
|
||||
private transient static final org.apache.log4j.Logger adminLogger = Logger
|
||||
.getLogger("AlertVizAdminLogger");
|
||||
|
||||
private Configuration configuration;
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class Container implements IConfigurationChangedListener {
|
|||
.getForcedConfiguration();
|
||||
ConfigurationManager.getInstance().addListener(this);
|
||||
this.callbacks = callbacks;
|
||||
ArchiveLogJob archive = new ArchiveLogJob();
|
||||
PurgeLogJob archive = new PurgeLogJob();
|
||||
archive.schedule();
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ public class Container implements IConfigurationChangedListener {
|
|||
// for now, just send to the regular log
|
||||
StatusMessage sm = new StatusMessage();
|
||||
sm.setPriority(priority);
|
||||
sm.setMachine("LOCAL");
|
||||
sm.setMachineToCurrent();
|
||||
sm.setSourceKey("GDN_ADMIN");
|
||||
sm.setCategory("GDN)ADMIN");
|
||||
sm.setMessage(msg);
|
||||
|
@ -319,24 +319,25 @@ public class Container implements IConfigurationChangedListener {
|
|||
String cat = message.getCategory();
|
||||
String source = message.getSourceKey();
|
||||
|
||||
if ((cat != null && cat.equalsIgnoreCase("GDN_ADMIN"))
|
||||
|| (source != null && source.equalsIgnoreCase("GDN_ADMIN"))) {
|
||||
boolean isInternal = (cat != null && cat.equalsIgnoreCase("GDN_ADMIN"))
|
||||
|| (source != null && source.equalsIgnoreCase("GDN_ADMIN"));
|
||||
if (isInternal) {
|
||||
switch (message.getPriority()) {
|
||||
case CRITICAL:
|
||||
internalLogger.fatal(message);
|
||||
adminLogger.fatal(message);
|
||||
break;
|
||||
case SIGNIFICANT:
|
||||
internalLogger.error(message);
|
||||
adminLogger.error(message);
|
||||
break;
|
||||
case PROBLEM:
|
||||
internalLogger.warn(message);
|
||||
adminLogger.warn(message);
|
||||
break;
|
||||
case EVENTA: // fall through
|
||||
case EVENTB:
|
||||
internalLogger.info(message);
|
||||
adminLogger.info(message);
|
||||
break;
|
||||
case VERBOSE:
|
||||
internalLogger.debug(message);
|
||||
adminLogger.debug(message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.alertviz;
|
||||
|
||||
import org.apache.log4j.RollingFileAppender;
|
||||
import org.apache.log4j.helpers.LogLog;
|
||||
|
||||
/**
|
||||
* RollingFileAppender retrieves the value set for property EnvLogVar from the
|
||||
* system environment to define the log file.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 10, 2012 bgonzale Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bgonzale
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class EnvConfigurableRollingFileAppender extends RollingFileAppender {
|
||||
|
||||
private String envLogVar;
|
||||
|
||||
/**
|
||||
* @param envLogVar
|
||||
* the envLogVar to set
|
||||
*/
|
||||
public void setEnvLogVar(String envLogVar) {
|
||||
this.envLogVar = envLogVar;
|
||||
setFileFromEnv();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the envLogVar
|
||||
*/
|
||||
public String getEnvLogVar() {
|
||||
return envLogVar;
|
||||
}
|
||||
|
||||
private void setFileFromEnv() {
|
||||
if (envLogVar == null || envLogVar.isEmpty()) {
|
||||
LogLog.error("Appender [" + name
|
||||
+ "] requires EnvLogVar to be set.");
|
||||
} else {
|
||||
String file = System.getenv(envLogVar);
|
||||
|
||||
if (file == null || file.isEmpty()) {
|
||||
LogLog.error("Appender [" + name
|
||||
+ "] needs environment variable, " + envLogVar
|
||||
+ ", to be set.");
|
||||
} else {
|
||||
setFile(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.alertviz;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||
|
@ -50,6 +51,9 @@ import com.raytheon.uf.viz.core.status.VizStatusInternal;
|
|||
|
||||
public class SystemStatusHandler extends AbstractStatusHandler {
|
||||
|
||||
private transient static final org.apache.log4j.Logger logger = Logger
|
||||
.getLogger("CaveLogger");
|
||||
|
||||
private static final String WORKSTATION = "WORKSTATION";
|
||||
|
||||
/*
|
||||
|
@ -66,14 +70,13 @@ public class SystemStatusHandler extends AbstractStatusHandler {
|
|||
|
||||
if (status instanceof VizStatusInternal) {
|
||||
VizStatusInternal vs = (VizStatusInternal) status;
|
||||
sm = new StatusMessage(vs.getSource(), vs.getCategory(),
|
||||
vs.getPriority(), vs.getPluginName(), vs.getMessage(),
|
||||
vs.getException());
|
||||
sm = vs.toStatusMessage();
|
||||
} else {
|
||||
sm = from(status);
|
||||
}
|
||||
|
||||
try {
|
||||
logStatus(sm);
|
||||
AlertVizClient.sendMessage(sm);
|
||||
} catch (final AlertvizException e) {
|
||||
// not a good situation, since we can't communicate with the log
|
||||
|
@ -111,7 +114,7 @@ public class SystemStatusHandler extends AbstractStatusHandler {
|
|||
StatusMessage sm = new StatusMessage();
|
||||
sm.setCategory(WORKSTATION);
|
||||
|
||||
sm.setMachine("LOCAL");
|
||||
sm.setMachineToCurrent();
|
||||
switch (status.getSeverity()) {
|
||||
case Status.ERROR:
|
||||
sm.setPriority(Priority.SIGNIFICANT);
|
||||
|
@ -184,4 +187,26 @@ public class SystemStatusHandler extends AbstractStatusHandler {
|
|||
int count) throws AlertvizException {
|
||||
return LogMessageDAO.getInstance().load(count, category);
|
||||
}
|
||||
|
||||
private void logStatus(StatusMessage status) {
|
||||
switch (status.getPriority()) {
|
||||
case CRITICAL:
|
||||
logger.fatal(status);
|
||||
break;
|
||||
case SIGNIFICANT:
|
||||
logger.error(status);
|
||||
break;
|
||||
case PROBLEM:
|
||||
logger.warn(status);
|
||||
break;
|
||||
case EVENTA: // fall through
|
||||
case EVENTB:
|
||||
logger.info(status);
|
||||
break;
|
||||
case VERBOSE:
|
||||
logger.debug(status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ public class LogMessageDAO {
|
|||
}
|
||||
|
||||
public void save(StatusMessage sm) throws AlertvizException {
|
||||
// Container.logInternal(sm);
|
||||
Container.logInternal(sm);
|
||||
synchronized (this) {
|
||||
boolean errorOccurred = false;
|
||||
ResultSet rs = null;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.alertviz.internal;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
@ -32,13 +31,9 @@ import org.eclipse.swt.widgets.Display;
|
|||
import com.raytheon.uf.viz.alertviz.Activator;
|
||||
import com.raytheon.uf.viz.alertviz.AlertvizException;
|
||||
import com.raytheon.uf.viz.alertviz.Constants;
|
||||
import com.raytheon.uf.viz.alertviz.LogUtil;
|
||||
import com.raytheon.uf.viz.alertviz.LogUtil.Order;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
|
||||
/**
|
||||
* Purges the database, and archives the old log entries to a text file
|
||||
* Purges old database entries.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
|
@ -50,26 +45,16 @@ import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
|||
* @author chammack
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ArchiveLogJob extends Job {
|
||||
|
||||
private int numberOfLogsToKeep;
|
||||
public class PurgeLogJob extends Job {
|
||||
|
||||
private int ageOfLogInHours;
|
||||
|
||||
private static final int DEFAULT_NUMBER_OF_LOGS = 10;
|
||||
|
||||
private static final int DEFAULT_AGE_OF_LOG_IN_HRS = 12;
|
||||
|
||||
private static final int MILLISECONDS_IN_HOUR = 60 * 60 * 1000;
|
||||
|
||||
public ArchiveLogJob() {
|
||||
super("Archive Log");
|
||||
this.setSystem(true);
|
||||
numberOfLogsToKeep = Activator.getDefault().getPreferenceStore()
|
||||
.getInt(Constants.P_NUMBER_OF_LOGS);
|
||||
if (numberOfLogsToKeep == 0) {
|
||||
this.numberOfLogsToKeep = DEFAULT_NUMBER_OF_LOGS;
|
||||
}
|
||||
public PurgeLogJob() {
|
||||
super("Archive Log Purge");
|
||||
|
||||
ageOfLogInHours = Activator.getDefault().getPreferenceStore()
|
||||
.getInt(Constants.P_MAX_AGE_OF_LOGS);
|
||||
|
@ -90,14 +75,8 @@ public class ArchiveLogJob extends Job {
|
|||
long now = System.currentTimeMillis();
|
||||
|
||||
if ((now - lastPurgeInMs) > (ageOfLogInHours * MILLISECONDS_IN_HOUR)) {
|
||||
String s = LocalizationManager.getUserDir() + "textLogs"
|
||||
+ File.separator + VizApp.getHostName()
|
||||
+ File.separator + "log";
|
||||
LogUtil.rollLogs(s, numberOfLogsToKeep);
|
||||
|
||||
Timestamp ts = new Timestamp(now
|
||||
- (ageOfLogInHours * MILLISECONDS_IN_HOUR));
|
||||
LogUtil.saveLogToFile(new File(s + ".0"), ts, Order.BEFORE);
|
||||
LogMessageDAO.getInstance().purge(ts);
|
||||
}
|
||||
} catch (AlertvizException e) {
|
||||
|
@ -111,7 +90,7 @@ public class ArchiveLogJob extends Job {
|
|||
.openError(
|
||||
Display.getDefault().getActiveShell(),
|
||||
"Error",
|
||||
"Error rotating saving and rotating logs. Archived logs may not be stored",
|
||||
"Error purging logs.",
|
||||
s);
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ import java.util.ArrayList;
|
|||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -533,7 +533,7 @@ public class CcfpResource extends
|
|||
synchronized (unprocessedRecords) {
|
||||
records = unprocessedRecords.get(dataTime);
|
||||
if (records == null) {
|
||||
records = new HashSet<CcfpRecord>();
|
||||
records = new LinkedHashSet<CcfpRecord>();
|
||||
unprocessedRecords.put(dataTime, records);
|
||||
brandNew = true;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Eclipse-BuddyPolicy: ext, registered, global
|
||||
Eclipse-RegisterBuddy: org.apache.velocity, com.raytheon.edex.common, com.raytheon.uf.common.serialization, com.raytheon.uf.common.serialization.comm, com.raytheon.uf.common.status, com.raytheon.uf.common.dataplugin.level
|
||||
Eclipse-RegisterBuddy: org.apache.velocity, org.apache.log4j, com.raytheon.edex.common, com.raytheon.uf.common.serialization, com.raytheon.uf.common.serialization.comm, com.raytheon.uf.common.status, com.raytheon.uf.common.dataplugin.level
|
||||
Export-Package: com.raytheon.uf.viz.core,
|
||||
com.raytheon.uf.viz.core.alerts,
|
||||
com.raytheon.uf.viz.core.auth,
|
||||
|
|
|
@ -5,4 +5,5 @@ bin.includes = META-INF/,\
|
|||
plugin.xml,\
|
||||
config.xml,\
|
||||
scriptTemplates/,\
|
||||
schema/
|
||||
schema/,\
|
||||
log4j-viz-core.xml
|
||||
|
|
80
cave/com.raytheon.uf.viz.core/log4j-viz-core.xml
Normal file
80
cave/com.raytheon.uf.viz.core/log4j-viz-core.xml
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p %d [%t] %c{1}: %m%n"/>
|
||||
</layout>
|
||||
<filter class="org.apache.log4j.varia.LevelRangeFilter">
|
||||
<param name="levelMin" value="DEBUG" />
|
||||
<param name="levelMax" value="INFO" />
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="errConsole" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.err"/>
|
||||
<param name="Threshold" value="WARN" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p %d [%t] %c{1}: %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="CaveLogAppender" class="com.raytheon.uf.viz.alertviz.EnvConfigurableRollingFileAppender">
|
||||
<param name="envLogVar" value="LOGFILE_CAVE" />
|
||||
<param name="maxFileSize" value="2GB"/>
|
||||
<param name="maxBackupIndex" value="5"/>
|
||||
<param name="Append" value="true"/>
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p %d [%t] %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="AsyncCaveLogAppender" class="org.apache.log4j.AsyncAppender">
|
||||
<param name="BufferSize" value="500"/>
|
||||
<appender-ref ref="CaveLogAppender"/>
|
||||
</appender>
|
||||
<logger name="CaveLogger" additivity="false">
|
||||
<level value="ALL"/>
|
||||
<appender-ref ref="AsyncCaveLogAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.raytheon">
|
||||
<level value="INFO"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.tc">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="mx4j">
|
||||
<level value="ERROR"/>
|
||||
</logger>
|
||||
<logger name="org.apache">
|
||||
<level value="INFO"/>
|
||||
</logger>
|
||||
<logger name="org.apache.activemq.spring">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.apache.commons.beanutils">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.apache.qpid">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.geotools">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.apache.xbean.spring">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<logger name="org.springframework">
|
||||
<level value="ERROR"/>
|
||||
</logger>
|
||||
<logger name="uk.ltd.getahead">
|
||||
<level value="WARN"/>
|
||||
</logger>
|
||||
<root>
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="console"/>
|
||||
<appender-ref ref="errConsole"/>
|
||||
</root>
|
||||
</log4j:configuration>
|
|
@ -105,18 +105,6 @@ public abstract class AbstractTimeMatcher {
|
|||
DataTime[] availableTimes, IDescriptor descriptor)
|
||||
throws VizException;
|
||||
|
||||
/**
|
||||
* Set the matched list of times to a particular resource
|
||||
*
|
||||
* @param dataTimes
|
||||
* @param rsc
|
||||
* @param descriptor
|
||||
* @throws VizException
|
||||
*/
|
||||
public abstract void setTimeList(DataTime[] dataTimes,
|
||||
AbstractVizResource<?, ?> rsc, IDescriptor descriptor)
|
||||
throws VizException;
|
||||
|
||||
/**
|
||||
* Given a list of RenderableDisplays, determine the order to instantiate
|
||||
* them in to get the correct time match settings, should only be called
|
||||
|
|
|
@ -64,6 +64,7 @@ import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
|||
import com.raytheon.uf.viz.core.rsc.IResourceGroup;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceGroup;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceList;
|
||||
import com.raytheon.uf.viz.core.time.TimeMatchingJob;
|
||||
|
||||
/**
|
||||
* AbstractDescriptor
|
||||
|
@ -192,33 +193,37 @@ public abstract class AbstractDescriptor extends ResourceGroup implements
|
|||
}
|
||||
|
||||
if (basis != newBasis) {
|
||||
redoTimeMatching();
|
||||
TimeMatchingJob.scheduleTimeMatch(AbstractDescriptor.this);
|
||||
if (renderableDisplay != null
|
||||
&& renderableDisplay.getContainer() != null) {
|
||||
IDisplayPaneContainer container = renderableDisplay.getContainer();
|
||||
for (IDisplayPane pane : container.getDisplayPanes()) {
|
||||
if (pane.getDescriptor() != AbstractDescriptor.this) {
|
||||
TimeMatchingJob.scheduleTimeMatch(pane.getDescriptor());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void redoTimeMatching() throws VizException {
|
||||
if (getTimeMatcher() != null) {
|
||||
getTimeMatcher().redoTimeMatching(this);
|
||||
}
|
||||
|
||||
if (renderableDisplay != null
|
||||
&& renderableDisplay.getContainer() != null) {
|
||||
IDisplayPaneContainer container = renderableDisplay.getContainer();
|
||||
for (IDisplayPane pane : container.getDisplayPanes()) {
|
||||
if (pane.getDescriptor() != this) {
|
||||
if (pane.getDescriptor().getTimeMatcher() != null) {
|
||||
pane.getDescriptor().getTimeMatcher()
|
||||
.redoTimeMatching(pane.getDescriptor());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void postAddListener(ResourcePair rp) {
|
||||
|
||||
if (rp.getResource() != null && getTimeMatcher() != null) {
|
||||
// We need to run time matching immediately beacuse order
|
||||
// constructed is important for time matching so we must do it now
|
||||
// instead of scheduling since another resource could be added by
|
||||
// the time it runs
|
||||
AbstractTimeMatcher tm = getTimeMatcher();
|
||||
tm.redoTimeMatching(rp.getResource());
|
||||
try {
|
||||
tm.redoTimeMatching(this);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
@ -35,7 +35,6 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
|
|||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.LocalizationInternalFile;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationOpFailedException;
|
||||
import com.raytheon.uf.common.localization.msgs.AbstractUtilityCommand;
|
||||
import com.raytheon.uf.common.localization.msgs.AbstractUtilityResponse;
|
||||
|
@ -43,9 +42,6 @@ import com.raytheon.uf.common.localization.msgs.ListResponseEntry;
|
|||
import com.raytheon.uf.common.localization.msgs.ProtectedFileCommand;
|
||||
import com.raytheon.uf.common.localization.msgs.ProtectedFileResponse;
|
||||
import com.raytheon.uf.common.localization.msgs.UtilityRequestMessage;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -66,9 +62,6 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
*/
|
||||
|
||||
public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
||||
private static transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(CAVELocalizationAdapter.class.getPackage().getName(),
|
||||
"WORKSTATION", "CAVE");
|
||||
|
||||
private static final LocalizationManager manager = LocalizationManager
|
||||
.getInstance();
|
||||
|
@ -198,7 +191,7 @@ public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
|||
response.date = null;
|
||||
response.existsOnServer = false;
|
||||
response.fileName = fileName;
|
||||
response.isProtected = false;
|
||||
response.protectedLevel = null;
|
||||
File file = getPath(caveConfigBase, fileName);
|
||||
response.isDirectory = file != null && file.isDirectory();
|
||||
responses.add(response);
|
||||
|
@ -229,17 +222,6 @@ public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
|||
}
|
||||
|
||||
manager.retrieve(file);
|
||||
if (file.isProtected()) {
|
||||
File f;
|
||||
try {
|
||||
f = file.getFile(false);
|
||||
f.setReadOnly();
|
||||
} catch (LocalizationException e) {
|
||||
// shouldn't happen since file was just retrieved
|
||||
statusHandler.handle(Priority.PROBLEM, "Error retrieving file",
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -253,7 +235,6 @@ public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
|||
@Override
|
||||
public boolean save(File localFile, LocalizationContext context,
|
||||
String fileName) throws LocalizationOpFailedException {
|
||||
|
||||
if (context.getLocalizationLevel().isSystemLevel()) {
|
||||
throw new UnsupportedOperationException(
|
||||
"Saving to the System Level, "
|
||||
|
@ -416,7 +397,7 @@ public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
|||
ListResponse response = new ListResponse();
|
||||
response.context = context;
|
||||
response.isDirectory = configFile.isDirectory();
|
||||
response.isProtected = false;
|
||||
response.protectedLevel = null;
|
||||
response.existsOnServer = false;
|
||||
response.fileName = p;
|
||||
response.date = new Date(configFile.lastModified());
|
||||
|
@ -442,10 +423,13 @@ public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
|||
response.existsOnServer = false;
|
||||
response.fileName = pfr.getPathName();
|
||||
response.isDirectory = locFile.isDirectory();
|
||||
response.isProtected = pfr.isProtectedFile();
|
||||
response.protectedLevel = pfr.getProtectedLevel();
|
||||
|
||||
if (!response.isProtected
|
||||
|| (response.context.getLocalizationLevel() == LocalizationLevel.BASE)) {
|
||||
if (response.protectedLevel == null
|
||||
|| response.context.getLocalizationLevel().compareTo(
|
||||
response.protectedLevel) <= 0) {
|
||||
// if not protected or protected level is less than/equal to
|
||||
// our level, add response
|
||||
responses.add(response);
|
||||
}
|
||||
}
|
||||
|
@ -486,7 +470,7 @@ public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
|||
lr.isDirectory = entry.isDirectory();
|
||||
}
|
||||
lr.context = context;
|
||||
lr.isProtected = entry.isProtectedFile();
|
||||
lr.protectedLevel = entry.getProtectedLevel();
|
||||
lr.existsOnServer = entry.isExistsOnServer();
|
||||
return lr;
|
||||
}
|
||||
|
|
|
@ -130,6 +130,8 @@ public class LocalizationManager implements IPropertyChangeListener {
|
|||
/** The current localization site */
|
||||
private String currentSite;
|
||||
|
||||
private boolean nationalCenter;
|
||||
|
||||
private boolean overrideSite;
|
||||
|
||||
/** Was the alert server launched within cave? */
|
||||
|
@ -392,6 +394,12 @@ public class LocalizationManager implements IPropertyChangeListener {
|
|||
.getString("-site").toUpperCase();
|
||||
this.overrideSite = true;
|
||||
}
|
||||
|
||||
this.nationalCenter = false;
|
||||
|
||||
if (ProgramArguments.getInstance().getString("-nc") != null) {
|
||||
this.nationalCenter = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void checkForServerOverride() {
|
||||
|
@ -946,4 +954,8 @@ public class LocalizationManager implements IPropertyChangeListener {
|
|||
public boolean isOverrideSite() {
|
||||
return overrideSite;
|
||||
}
|
||||
|
||||
public boolean isNationalCenter() {
|
||||
return nationalCenter;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,8 +169,7 @@ public abstract class AbstractRequestableResourceData extends
|
|||
// 3. Throw an exception of no data available and user has not specified
|
||||
// to suppress load errors
|
||||
// 4. Retrieve the PluginDataObjects for all DataTimes
|
||||
// 5. Notify the time matcher that load has completed with the set of
|
||||
// datatimes
|
||||
// 5. Construct resource with loaded pdos
|
||||
DataTime[] availableTimes = this.getAvailableTimes();
|
||||
DataTime[] dataTimes = descriptor.getTimeMatcher().initialLoad(
|
||||
loadProperties, availableTimes, descriptor);
|
||||
|
@ -205,9 +204,8 @@ public abstract class AbstractRequestableResourceData extends
|
|||
}
|
||||
|
||||
resource = constructResource(loadProperties, data);
|
||||
descriptor.getTimeMatcher().setTimeList(dataTimes, resource,
|
||||
descriptor);
|
||||
}
|
||||
|
||||
return resource;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,8 +88,9 @@ public class VizStatusHandler implements IUFStatusHandler {
|
|||
this.source = factory.getSource(source, pluginId);
|
||||
}
|
||||
}
|
||||
StatusManager.getManager().handle(
|
||||
new VizStatusInternal(status, category, source, pluginId));
|
||||
VizStatusInternal vizStatus = new VizStatusInternal(status, category,
|
||||
source, pluginId);
|
||||
StatusManager.getManager().handle(vizStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ package com.raytheon.uf.viz.core.status;
|
|||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
|
||||
import com.raytheon.uf.common.message.StatusMessage;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
/**
|
||||
|
@ -170,4 +171,9 @@ public class VizStatusInternal extends UFStatus implements IStatus {
|
|||
return pluginName;
|
||||
}
|
||||
|
||||
public StatusMessage toStatusMessage() {
|
||||
return new StatusMessage(this.source, this.category, this.priority,
|
||||
this.pluginName, this.message, this.exception);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -138,18 +138,33 @@ public class TileLevel {
|
|||
DefaultGeographicCRS.WGS84));
|
||||
corrector = new WorldWrapCorrector(targetGeometry);
|
||||
|
||||
// Calculate pixel density
|
||||
// Grab the center x, 3/4 y of the map
|
||||
double mapXCenter = targetGeometry.getGridRange().getSpan(0) * 0.5;
|
||||
double mapYCenter = targetGeometry.getGridRange().getSpan(1) * 0.75;
|
||||
Envelope levelEnv = levelGeometry.getEnvelope();
|
||||
double[] in = new double[] {
|
||||
levelEnv.getMinimum(0) + (levelEnv.getSpan(0) / 2),
|
||||
levelEnv.getMinimum(1) + (levelEnv.getSpan(1) / 2) };
|
||||
double[] out = new double[in.length];
|
||||
tileCRSToTargetGrid.transform(in, 0, out, 0, 1);
|
||||
|
||||
double[] input = new double[] { mapXCenter, mapYCenter,
|
||||
mapXCenter + 1, mapYCenter + 1 };
|
||||
double mapPointX = out[0];
|
||||
double mapPointY = out[1];
|
||||
GridEnvelope targetEnv = targetGeometry.getGridRange();
|
||||
if (targetEnv.getLow(0) > mapPointX
|
||||
|| targetEnv.getHigh(0) < mapPointX
|
||||
|| targetEnv.getLow(1) > mapPointY
|
||||
|| targetEnv.getHigh(1) < mapPointY) {
|
||||
// Center of tile level outside target grid, use something on
|
||||
// target grid for calculations
|
||||
mapPointX = targetEnv.getLow(0) + targetEnv.getSpan(0) * 0.5;
|
||||
mapPointY = targetEnv.getLow(1)
|
||||
+ targetGeometry.getGridRange().getSpan(1) * 0.75;
|
||||
}
|
||||
|
||||
double[] input = new double[] { mapPointX, mapPointY,
|
||||
mapPointX + 1, mapPointY + 1 };
|
||||
double[] output = new double[input.length];
|
||||
|
||||
tileCRSToTargetGrid.inverse().transform(input, 0, output, 0, 2);
|
||||
levelGeometry.getGridToCRS(PixelInCell.CELL_CORNER).inverse()
|
||||
.transform(output, 0, input, 0, 2);
|
||||
crsToGrid.transform(output, 0, input, 0, 2);
|
||||
pixelDensity = 1.0 / Math.abs(new Coordinate(input[0], input[1],
|
||||
0.0).distance(new Coordinate(input[2], input[3], 0.0)));
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -114,7 +114,7 @@ public class TileSetRenderable implements IRenderable {
|
|||
.getHandler(TileSetRenderable.class);
|
||||
|
||||
/** Screen pixel to image pixel threshold at which we change levels */
|
||||
protected static final double LEVEL_CHANGE_THRESHOLD = 2.0;
|
||||
protected static final double LEVEL_CHANGE_THRESHOLD = 1.75;
|
||||
|
||||
/** Job pool for tile creation */
|
||||
protected static final JobPool tileCreationPool = new JobPool(
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay;
|
|||
import com.raytheon.uf.viz.core.drawables.FrameCoordinator;
|
||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||
import com.raytheon.uf.viz.core.drawables.IDescriptor.FramesInfo;
|
||||
import com.raytheon.uf.viz.core.drawables.IRenderableDisplay;
|
||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.globals.VizGlobalsManager;
|
||||
|
@ -61,7 +62,6 @@ import com.raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType;
|
|||
import com.raytheon.uf.viz.core.rsc.IResourceGroup;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceList;
|
||||
import com.raytheon.uf.viz.core.time.TimeMatchingJob;
|
||||
import com.raytheon.uf.viz.d2d.core.D2DLoadProperties;
|
||||
|
||||
/**
|
||||
|
@ -73,8 +73,6 @@ import com.raytheon.uf.viz.d2d.core.D2DLoadProperties;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 10, 2009 chammack Initial creation
|
||||
* 2012-04-20 DR 14699 D. Friedman Work around race conditions
|
||||
* 2012-08-14 DR 15160 D. Friedman Reduce chance of UI blocking
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -95,7 +93,9 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
@Override
|
||||
public void disposed(AbstractVizResource<?, ?> resource) {
|
||||
if ((resource == timeMatchBasis)) {
|
||||
internalSetTimeMatchBasis(null);
|
||||
synchronized (D2DTimeMatcher.this) {
|
||||
timeMatchBasis = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,15 +123,6 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
|
||||
private AbstractTimeMatchingConfigurationFactory configFactory;
|
||||
|
||||
// DR 14699 work arounds
|
||||
private boolean needRetry;
|
||||
private int nRetries;
|
||||
|
||||
// DR 15160 state
|
||||
private transient boolean pendingTmbChange = false;
|
||||
private transient boolean inTimeMatch = false;
|
||||
private transient AbstractVizResource<?, ?> pendingTimeMatchBasis;
|
||||
|
||||
/**
|
||||
* Default Constructor.
|
||||
*/
|
||||
|
@ -162,15 +153,6 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
public void redoTimeMatching(IDescriptor descriptor) throws VizException {
|
||||
|
||||
synchronized (this) {
|
||||
if (inTimeMatch) {
|
||||
needRetry = true;
|
||||
return;
|
||||
}
|
||||
pendingTmbChange = false;
|
||||
inTimeMatch = true;
|
||||
needRetry = false;
|
||||
}
|
||||
try {
|
||||
if (timeMatchBasis != null) {
|
||||
IDescriptor tmDescriptor = timeMatchBasis.getDescriptor();
|
||||
if (tmDescriptor != null && tmDescriptor != descriptor) {
|
||||
|
@ -194,11 +176,8 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
Iterator<ResourcePair> pairIterator = descriptor.getResourceList()
|
||||
.listIterator();
|
||||
while (pairIterator.hasNext()) {
|
||||
ResourcePair rp = pairIterator.next();
|
||||
AbstractVizResource<?, ?> rsc = rp
|
||||
AbstractVizResource<?, ?> rsc = pairIterator.next()
|
||||
.getResource();
|
||||
if (rsc == null && rp.getResourceData() instanceof AbstractRequestableResourceData)
|
||||
needRetry = true;
|
||||
recursiveOverlay(descriptor, new FramesInfo(timeSteps, -1,
|
||||
resourceTimeMap), rsc);
|
||||
}
|
||||
|
@ -215,39 +194,19 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
timeMatchUpdate(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
} finally {
|
||||
boolean scheduleRetry = false;
|
||||
synchronized (this) {
|
||||
inTimeMatch = false;
|
||||
if (pendingTmbChange) {
|
||||
pendingTmbChange = false;
|
||||
changeTimeMatchBasis(pendingTimeMatchBasis);
|
||||
pendingTimeMatchBasis = null;
|
||||
scheduleRetry = true;
|
||||
}
|
||||
|
||||
if (needRetry) {
|
||||
if (nRetries < 200) {
|
||||
++nRetries;
|
||||
scheduleRetry = true;
|
||||
}
|
||||
} else
|
||||
nRetries = 0;
|
||||
}
|
||||
if (scheduleRetry)
|
||||
TimeMatchingJob.scheduleTimeMatch(descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
private int indexToUpdateTo(IDescriptor descriptor, DataTime[] oldTimes,
|
||||
int oldIndex, DataTime[] frames, int startFrame) {
|
||||
int frameToUse = startFrame;
|
||||
IDisplayPaneContainer container = descriptor.getRenderableDisplay()
|
||||
.getContainer();
|
||||
if (container != null && container.getLoopProperties().isLooping()) {
|
||||
IRenderableDisplay display = descriptor.getRenderableDisplay();
|
||||
if (display != null && display.getContainer() != null) {
|
||||
IDisplayPaneContainer container = display.getContainer();
|
||||
if (container.getLoopProperties().isLooping()) {
|
||||
return frameToUse;
|
||||
}
|
||||
}
|
||||
switch (descriptor.getFrameCoordinator().getAnimationMode()) {
|
||||
case Latest: {
|
||||
if (oldIndex == oldTimes.length - 1) {
|
||||
|
@ -347,8 +306,6 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
if (rsc instanceof IResourceGroup) {
|
||||
for (ResourcePair rp : ((IResourceGroup) rsc).getResourceList()) {
|
||||
AbstractVizResource<?, ?> rsc1 = rp.getResource();
|
||||
if (rsc1 == null && rp.getResourceData() instanceof AbstractRequestableResourceData)
|
||||
needRetry = true;
|
||||
recursiveOverlay(descriptor, framesInfo, rsc1);
|
||||
}
|
||||
}
|
||||
|
@ -357,9 +314,7 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
TimeMatchingConfiguration config = getConfiguration(rsc
|
||||
.getLoadProperties());
|
||||
DataTime[] timeSteps = getFrameTimes(descriptor, framesInfo);
|
||||
if (Arrays.equals(timeSteps, config.getLastBaseTimes()) &&
|
||||
config.getLastFrameTimes() != null &&
|
||||
config.getLastFrameTimes().length > 0) {
|
||||
if (Arrays.equals(timeSteps, config.getLastBaseTimes())) {
|
||||
framesInfo.getTimeMap().put(rsc, config.getLastFrameTimes());
|
||||
} else {
|
||||
config = config.clone();
|
||||
|
@ -733,7 +688,9 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
IDescriptor descriptor) {
|
||||
if ((resource == timeMatchBasis)
|
||||
&& (descriptor instanceof AbstractDescriptor)) {
|
||||
internalSetTimeMatchBasis(null);
|
||||
synchronized (this) {
|
||||
timeMatchBasis = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -862,41 +819,6 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
return timeMatchBasis;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.AbstractTimeMatcher#setTimeList(com.raytheon
|
||||
* .uf.common.time.DataTime[],
|
||||
* com.raytheon.uf.viz.core.rsc.AbstractVizResource,
|
||||
* com.raytheon.uf.viz.core.drawables.IDescriptor)
|
||||
*/
|
||||
@Override
|
||||
public void setTimeList(DataTime[] dataTimes,
|
||||
AbstractVizResource<?, ?> rsc, IDescriptor descriptor)
|
||||
throws VizException {
|
||||
((AbstractDescriptor) descriptor).getTimeMatchingMap().put(rsc,
|
||||
dataTimes);
|
||||
|
||||
// if the resource is the basis , set the time to the last
|
||||
// time
|
||||
if (dataTimes.length > 0
|
||||
&& (rsc == timeMatchBasis || timeMatchBasis == null)) {
|
||||
boolean setFrameTimes = true;
|
||||
// If there are any null times we do not want to set this as the
|
||||
// frame times, that means we were matched against a time match
|
||||
// basis that has since been removed.
|
||||
for (DataTime time : dataTimes) {
|
||||
setFrameTimes = setFrameTimes && time != null;
|
||||
}
|
||||
if (setFrameTimes) {
|
||||
descriptor.setFramesInfo(new FramesInfo(dataTimes,
|
||||
dataTimes.length - 1));
|
||||
changeTimeMatchBasis(rsc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasTimeMatchBasis() {
|
||||
return (timeMatchBasis != null);
|
||||
}
|
||||
|
@ -1027,17 +949,4 @@ public class D2DTimeMatcher extends AbstractTimeMatcher implements
|
|||
configFactory.resetMultiload();
|
||||
}
|
||||
|
||||
// For DR 15160
|
||||
protected void internalSetTimeMatchBasis(AbstractVizResource<?, ?> timeMatchBasis) {
|
||||
synchronized (this) {
|
||||
if (inTimeMatch) {
|
||||
pendingTmbChange = true;
|
||||
pendingTimeMatchBasis = timeMatchBasis;
|
||||
} else {
|
||||
pendingTmbChange = false;
|
||||
pendingTimeMatchBasis = null;
|
||||
changeTimeMatchBasis(timeMatchBasis);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1400,6 +1400,11 @@
|
|||
<handler
|
||||
class="com.raytheon.uf.viz.d2d.ui.actions.TimeOptionsAction"
|
||||
commandId="com.raytheon.uf.viz.d2d.ui.actions.timeOptionsAction">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.uf.viz.d2d.ui.actions.LocateCursorAction"
|
||||
|
@ -1485,6 +1490,11 @@
|
|||
<handler
|
||||
class="com.raytheon.uf.viz.d2d.ui.actions.CopyOutAWIPSProcedure"
|
||||
commandId="com.raytheon.viz.ui.copyOutAWIPSProcedure">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.uf.viz.d2d.ui.actions.SetPerspectiveHandler"
|
||||
|
@ -1497,6 +1507,11 @@
|
|||
<handler
|
||||
class="com.raytheon.uf.viz.d2d.ui.actions.ShowPrintDialog"
|
||||
commandId="com.raytheon.uf.viz.d2d.ui.actions.showPrintDialog">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.uf.viz.d2d.ui.actions.IncreaseBlendAmount"
|
||||
|
@ -1509,6 +1524,11 @@
|
|||
<handler
|
||||
class="com.raytheon.uf.viz.d2d.ui.actions.ToggleTool"
|
||||
commandId="com.raytheon.uf.viz.d2d.ui.actions.toggleTool">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
</extension>
|
||||
<extension
|
||||
|
|
|
@ -68,6 +68,9 @@ public class TimeOptionsAction extends AbstractTool {
|
|||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
super.execute(event);
|
||||
if (this.editor == null) {
|
||||
return null;
|
||||
}
|
||||
IRenderableDisplay iDisplay = this.editor.getActiveDisplayPane()
|
||||
.getRenderableDisplay();
|
||||
D2DTimeMatcher matcher = ((D2DTimeMatcher) iDisplay.getDescriptor()
|
||||
|
|
|
@ -91,12 +91,16 @@ public class LocalizationSaveAsPopulator extends CompoundContributionItem {
|
|||
protected IContributionItem[] getContributionItems() {
|
||||
MenuManager menuMgr = new MenuManager("SaveAs", "FileSaveAs");
|
||||
final boolean enabled;
|
||||
final LocalizationLevel protectedLevel;
|
||||
final IEditorPart active = EditorUtil.getActiveEditor();
|
||||
if (active != null
|
||||
&& active.getEditorInput() instanceof LocalizationEditorInput) {
|
||||
enabled = active.isDirty();
|
||||
protectedLevel = ((LocalizationEditorInput) active.getEditorInput())
|
||||
.getLocalizationFile().getProtectedLevel();
|
||||
} else {
|
||||
enabled = false;
|
||||
protectedLevel = null;
|
||||
}
|
||||
|
||||
LocalizationLevel[] levels = PathManagerFactory.getPathManager()
|
||||
|
@ -119,7 +123,9 @@ public class LocalizationSaveAsPopulator extends CompoundContributionItem {
|
|||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
return enabled
|
||||
&& (protectedLevel == null || level
|
||||
.compareTo(protectedLevel) <= 0);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,156 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.localization.perspective.view;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
import org.eclipse.core.runtime.IExtensionPoint;
|
||||
import org.eclipse.core.runtime.IExtensionRegistry;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
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.viz.localization.adapter.LocalizationPerspectiveAdapter;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.PathData;
|
||||
|
||||
/**
|
||||
* Manager class for creating {@link PathData} objects for the localization path
|
||||
* extension point entries
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 7, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class PathDataExtManager {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(PathDataExtManager.class);
|
||||
|
||||
/** Localization path extension point id */
|
||||
private static final String PATH_DEFINITION_ID = "com.raytheon.uf.viz.localization.localizationpath";
|
||||
|
||||
private static final String APPLICATION_ATTR = "application";
|
||||
|
||||
private static final String NAME_ATTR = "name";
|
||||
|
||||
private static final String PATH_ATTR = "value";
|
||||
|
||||
private static final String TYPE_ATTR = "localizationType";
|
||||
|
||||
private static final String FILTER_ATTR = "extensionFilter";
|
||||
|
||||
private static final String ADAPTER_ATTR = "localizationAdapter";
|
||||
|
||||
private static final String RECURSIVE_ATTR = "recursive";
|
||||
|
||||
/** Default application name */
|
||||
private static final String DEFAULT_APPLICATION = "Uncategorized";
|
||||
|
||||
/** Default localization perspective adapter */
|
||||
private static final LocalizationPerspectiveAdapter DEFAULT_ADAPTER = new LocalizationPerspectiveAdapter();
|
||||
|
||||
public static Collection<PathData> getPathData() {
|
||||
List<PathData> pathData = new ArrayList<PathData>();
|
||||
IExtensionRegistry registry = Platform.getExtensionRegistry();
|
||||
IExtensionPoint point = registry.getExtensionPoint(PATH_DEFINITION_ID);
|
||||
if (point != null) {
|
||||
for (IExtension ext : point.getExtensions()) {
|
||||
for (IConfigurationElement element : ext
|
||||
.getConfigurationElements()) {
|
||||
PathData pd = new PathData();
|
||||
pd.setApplication(element.getAttribute(APPLICATION_ATTR));
|
||||
if (pd.getApplication() == null
|
||||
|| pd.getApplication().trim().isEmpty()) {
|
||||
pd.setApplication(DEFAULT_APPLICATION);
|
||||
}
|
||||
pd.setName(element.getAttribute(NAME_ATTR));
|
||||
if (pd.getName() == null || pd.getName().trim().isEmpty()) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"Skipping path extension entry with no name set");
|
||||
continue;
|
||||
}
|
||||
pd.setPath(element.getAttribute(PATH_ATTR));
|
||||
if (pd.getPath() == null) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"Skipping path extension entry with no path set");
|
||||
}
|
||||
pd.setFilter(element.getAttribute(FILTER_ATTR));
|
||||
String recurse = element.getAttribute(RECURSIVE_ATTR);
|
||||
pd.setRecursive(Boolean.parseBoolean(recurse));
|
||||
|
||||
pd.setType(LocalizationType.valueOf(element
|
||||
.getAttribute(TYPE_ATTR)));
|
||||
if (pd.getType() == null) {
|
||||
// Skip if bad localization type specified
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Skipping path extension entry with name: "
|
||||
+ pd.getName() + " and path: "
|
||||
+ pd.getPath()
|
||||
+ " with invalid localiation type: "
|
||||
+ element.getAttribute(TYPE_ATTR));
|
||||
continue;
|
||||
}
|
||||
LocalizationPerspectiveAdapter adapter = DEFAULT_ADAPTER;
|
||||
try {
|
||||
if (element.getAttribute(ADAPTER_ATTR) != null) {
|
||||
adapter = (LocalizationPerspectiveAdapter) element
|
||||
.createExecutableExtension(ADAPTER_ATTR);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"Skipping path with name: "
|
||||
+ pd.getName()
|
||||
+ " and path: "
|
||||
+ pd.getPath()
|
||||
+ " due to error constructing adapter: "
|
||||
+ t.getLocalizedMessage(), t);
|
||||
}
|
||||
pd.setAdapter(adapter);
|
||||
pathData.add(pd);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException("Could not find extension point ("
|
||||
+ PATH_DEFINITION_ID
|
||||
+ ") from the extension point registry");
|
||||
}
|
||||
return pathData;
|
||||
}
|
||||
}
|
|
@ -19,8 +19,6 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.localization.perspective.view.actions;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.ActionContributionItem;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
|
@ -127,8 +125,7 @@ public abstract class AbstractToAction extends Action implements IMenuCreator {
|
|||
protected void fillMenu(Menu menu) {
|
||||
LocalizationLevel[] levels = PathManagerFactory.getPathManager()
|
||||
.getAvailableLevels();
|
||||
Arrays.sort(levels, LocalizationLevel.REVERSE_COMPARATOR);
|
||||
for (int i = levels.length - 1; i >= 0; --i) {
|
||||
for (int i = 0; i < levels.length; ++i) {
|
||||
LocalizationLevel level = levels[i];
|
||||
if (level.isSystemLevel() == false) {
|
||||
new ActionContributionItem(new AbstractToInternalAction(level))
|
||||
|
@ -137,6 +134,26 @@ public abstract class AbstractToAction extends Action implements IMenuCreator {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the action for this level is enabled. By default, checks if
|
||||
* the level is the same as the file level
|
||||
*
|
||||
* @param level
|
||||
* @return
|
||||
*/
|
||||
protected boolean isLevelEnabled(LocalizationLevel level) {
|
||||
if (level == file.getContext().getLocalizationLevel()) {
|
||||
String fileCtxName = file.getContext().getContextName();
|
||||
String levelCtxName = LocalizationManager.getContextName(level);
|
||||
if ((fileCtxName == null && levelCtxName == null)
|
||||
|| (fileCtxName != null && fileCtxName.equals(levelCtxName))) {
|
||||
// same context name
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected abstract void run(LocalizationLevel level);
|
||||
|
||||
private class AbstractToInternalAction extends Action {
|
||||
|
@ -145,16 +162,7 @@ public abstract class AbstractToAction extends Action implements IMenuCreator {
|
|||
|
||||
public AbstractToInternalAction(LocalizationLevel level) {
|
||||
this.level = level;
|
||||
if (level == file.getContext().getLocalizationLevel()) {
|
||||
String fileCtxName = file.getContext().getContextName();
|
||||
String levelCtxName = LocalizationManager.getContextName(level);
|
||||
if ((fileCtxName == null && levelCtxName == null)
|
||||
|| (fileCtxName != null && fileCtxName
|
||||
.equals(levelCtxName))) {
|
||||
// same context name
|
||||
this.setEnabled(false);
|
||||
}
|
||||
}
|
||||
this.setEnabled(isLevelEnabled(level));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,11 +63,28 @@ public class CopyToAction extends AbstractToAction {
|
|||
protected ILocalizationService service;
|
||||
|
||||
public CopyToAction(LocalizationFile file, ILocalizationService service) {
|
||||
super(file.isProtected() ? "Copy To (Protected)" : "Copy To", file);
|
||||
setEnabled(file.isProtected() == false);
|
||||
super("Copy To", file);
|
||||
this.service = service;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.localization.perspective.view.actions.AbstractToAction
|
||||
* #isLevelEnabled(com.raytheon.uf.common.localization.LocalizationContext.
|
||||
* LocalizationLevel)
|
||||
*/
|
||||
@Override
|
||||
protected boolean isLevelEnabled(LocalizationLevel level) {
|
||||
boolean enabled = super.isLevelEnabled(level);
|
||||
if (enabled && file.isProtected()) {
|
||||
// Ensure protected level is greater than copy to level
|
||||
enabled = file.getProtectedLevel().compareTo(level) >= 0;
|
||||
}
|
||||
return enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
|
|
@ -70,14 +70,35 @@ public class MoveFileAction extends CopyToAction {
|
|||
setEnabled(delete.isEnabled());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.localization.perspective.view.actions.AbstractToAction
|
||||
* #isLevelEnabled(com.raytheon.uf.common.localization.LocalizationContext.
|
||||
* LocalizationLevel)
|
||||
*/
|
||||
@Override
|
||||
protected boolean isLevelEnabled(LocalizationLevel level) {
|
||||
boolean enabled = super.isLevelEnabled(level);
|
||||
if (enabled && file.isProtected()) {
|
||||
// Ensure protected level is greater than copy to level
|
||||
enabled = file.getProtectedLevel().compareTo(level) >= 0;
|
||||
}
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void run(LocalizationLevel level) {
|
||||
boolean choice = MessageDialog.openQuestion(
|
||||
boolean choice = MessageDialog
|
||||
.openQuestion(
|
||||
page.getWorkbenchWindow().getShell(),
|
||||
"Move Confirmation",
|
||||
"Are you sure you want to move "
|
||||
+ LocalizationUtil.extractName(file.getName()) + " to "
|
||||
+ level + " replacing any existing file?");
|
||||
+ LocalizationUtil.extractName(file.getName())
|
||||
+ " to "
|
||||
+ level
|
||||
+ " replacing any existing file and deleting this file?");
|
||||
if (choice) {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
final LocalizationFile newFile = pm.getLocalizationFile(
|
||||
|
|
|
@ -25,6 +25,7 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
|
|||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.LocalizationFileEntryData;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.LocalizationFileGroupData;
|
||||
import com.raytheon.uf.viz.localization.service.ILocalizationService;
|
||||
|
||||
|
@ -47,15 +48,35 @@ import com.raytheon.uf.viz.localization.service.ILocalizationService;
|
|||
|
||||
public class PasteFileAction extends CopyToAction {
|
||||
|
||||
LocalizationFileGroupData dataToCopyTo;
|
||||
private LocalizationFileGroupData dataToCopyTo;
|
||||
|
||||
private LocalizationLevel pasteToProtectedLevel;
|
||||
|
||||
public PasteFileAction(ILocalizationService service, LocalizationFile file,
|
||||
LocalizationFileGroupData data) {
|
||||
super(file, service);
|
||||
setText(file.isProtected() ? "Paste To (Protected)" : "Paste To");
|
||||
setText("Paste To");
|
||||
this.dataToCopyTo = data;
|
||||
// Grab the level this file is protected at (if any)
|
||||
for (LocalizationFileEntryData entry : dataToCopyTo.getChildrenData()) {
|
||||
pasteToProtectedLevel = entry.getFile().getProtectedLevel();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setEnabled(file.isProtected() == false);
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.localization.perspective.view.actions.CopyToAction
|
||||
* #isLevelEnabled
|
||||
* (com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
|
||||
* )
|
||||
*/
|
||||
@Override
|
||||
protected boolean isLevelEnabled(LocalizationLevel level) {
|
||||
return pasteToProtectedLevel == null
|
||||
|| level.compareTo(pasteToProtectedLevel) <= 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -0,0 +1,149 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.localization.perspective.view.actions;
|
||||
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.ActionContributionItem;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.action.IMenuCreator;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.viz.localization.perspective.view.FileTreeView;
|
||||
|
||||
/**
|
||||
* Action for generating menu items for hiding/showing localization levels in
|
||||
* the {@link FileTreeView}
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 6, 2012 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class ShowLevelsAction extends Action implements IMenuCreator {
|
||||
|
||||
private FileTreeView view;
|
||||
|
||||
private Menu menu;
|
||||
|
||||
public ShowLevelsAction(FileTreeView view) {
|
||||
super("Show", IAction.AS_DROP_DOWN_MENU);
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMenuCreator getMenuCreator() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.action.IMenuCreator#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
if (menu != null) {
|
||||
menu.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets
|
||||
* .Control)
|
||||
*/
|
||||
@Override
|
||||
public Menu getMenu(Control parent) {
|
||||
if (menu != null) {
|
||||
menu.dispose();
|
||||
}
|
||||
|
||||
menu = new Menu(parent);
|
||||
|
||||
fillMenu(menu);
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets
|
||||
* .Menu)
|
||||
*/
|
||||
@Override
|
||||
public Menu getMenu(Menu parent) {
|
||||
if (menu != null) {
|
||||
menu.dispose();
|
||||
}
|
||||
|
||||
menu = new Menu(parent);
|
||||
|
||||
fillMenu(menu);
|
||||
return menu;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void fillMenu(Menu menu) {
|
||||
// Use of LocalizationLevels.values() in this case should be okay since
|
||||
// we are setting a property to display all context names for the level,
|
||||
// doesn't matter if our local context for the level is set
|
||||
for (LocalizationLevel level : PathManagerFactory.getPathManager()
|
||||
.getAvailableLevels()) {
|
||||
ActionContributionItem aci = new ActionContributionItem(
|
||||
new ShowLevelInternalAction(level));
|
||||
aci.fill(menu, -1);
|
||||
}
|
||||
}
|
||||
|
||||
private class ShowLevelInternalAction extends Action {
|
||||
|
||||
private LocalizationLevel level;
|
||||
|
||||
public ShowLevelInternalAction(LocalizationLevel level) {
|
||||
super(level.name(), IAction.AS_CHECK_BOX);
|
||||
this.level = level;
|
||||
setChecked(view.isShown(level));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
view.toggleShowLevel(level);
|
||||
setChecked(view.isShown(level));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -648,6 +648,13 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
sourceName);
|
||||
SourceXML source = getSourceConfig().getSource(sourceName);
|
||||
|
||||
if (source.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
// Always look back for guidance types because of long expiration times,
|
||||
// prevents mosaic brittleness from occurring.
|
||||
retrieveNew = true;
|
||||
}
|
||||
|
||||
if (retrieveNew
|
||||
|| ((time != null) && ((previousQueryTime == null) || (time
|
||||
.getTime() < previousQueryTime.getTime())))) {
|
||||
|
@ -2322,14 +2329,11 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
|
||||
final String fsiteKey;
|
||||
|
||||
final boolean fisProductLoad;
|
||||
|
||||
public FFMPLoadRecord(boolean isProductLoad, String siteKey,
|
||||
FFMPRecord ffmpRec, String source, String huc) throws Exception {
|
||||
this.fffmpRec = ffmpRec;
|
||||
this.fsource = source;
|
||||
this.fsiteKey = siteKey;
|
||||
this.fisProductLoad = isProductLoad;
|
||||
this.fhuc = huc;
|
||||
}
|
||||
|
||||
|
|
|
@ -3339,13 +3339,15 @@ public class FFMPResource extends
|
|||
ArrayList<Double> qpeTimes = new ArrayList<Double>();
|
||||
|
||||
if (qpeBasin != null) {
|
||||
|
||||
for (Date date : qpeBasin.getValues().keySet()) {
|
||||
|
||||
double dtime = FFMPGuiUtils.getTimeDiff(mostRecentRefTime,
|
||||
date);
|
||||
fgd.setQpe(dtime, (double) qpeBasin.getAccumValue(date,
|
||||
double currVal = qpeBasin.getAccumValue(date,
|
||||
mostRecentRefTime, getQpeSourceExpiration(),
|
||||
isRate()));
|
||||
isRate());
|
||||
fgd.setQpe(dtime, currVal);
|
||||
qpeTimes.add(dtime);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.monitor.scan.commondialogs;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.FocusAdapter;
|
||||
import org.eclipse.swt.events.FocusEvent;
|
||||
|
@ -40,8 +42,12 @@ import org.eclipse.swt.widgets.Text;
|
|||
import com.raytheon.uf.common.monitor.scan.config.AbsConfigMgr;
|
||||
import com.raytheon.uf.common.monitor.scan.config.SCANConfig;
|
||||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
||||
import com.raytheon.uf.viz.monitor.scan.ScanMonitor;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANCellTableDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlarmType;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlertedAlarms;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
||||
|
@ -239,6 +245,16 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
alarmChoiceChanged();
|
||||
String columnName = attributeCbo.getText();
|
||||
mgr.clearAlertedAlarms(site, scanTable);
|
||||
AbstractTableDlg tableDlg = ScanMonitor.getInstance()
|
||||
.getDialog(scanTable, site);
|
||||
tableDlg.updateThresh(columnName);
|
||||
if (mgr.getAlertedAlarmCount(site, scanTable) == 0) {
|
||||
tableDlg.turnOffAlarm();
|
||||
} else {
|
||||
tableDlg.turnOnAlarm();
|
||||
}
|
||||
shell.dispose();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -157,7 +157,7 @@ public class ScanResource extends
|
|||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getScanDrawer().font != null) {
|
||||
if (gc != null && getScanDrawer().font != null) {
|
||||
getScanDrawer().font.setMagnification(getCapability(
|
||||
MagnificationCapability.class).getMagnification()
|
||||
.floatValue());
|
||||
|
@ -560,7 +560,7 @@ public class ScanResource extends
|
|||
* @return
|
||||
*/
|
||||
public ScanDrawer getScanDrawer() {
|
||||
if (drawer == null) {
|
||||
if (drawer == null && gc != null) {
|
||||
if (getTable().equals(ScanTables.CELL)) {
|
||||
drawer = new ScanDrawer(SCANConfig.getInstance()
|
||||
.getStormCellConfig(), gc, getScan()
|
||||
|
|
|
@ -765,4 +765,8 @@ public abstract class AbstractTableDlg extends Dialog implements IMonitor,
|
|||
protected abstract void handleRankMenuEvent(SelectionEvent event);
|
||||
|
||||
public abstract void updateThresh(String attr);
|
||||
|
||||
public abstract void turnOffAlarm();
|
||||
|
||||
public abstract void turnOnAlarm();
|
||||
}
|
||||
|
|
|
@ -21,10 +21,13 @@ package com.raytheon.uf.viz.monitor.scan.tables;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
|
@ -36,6 +39,7 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums;
|
|||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
||||
import com.raytheon.uf.viz.monitor.scan.ScanMonitor;
|
||||
import com.raytheon.uf.viz.monitor.scan.data.ScanDataGenerator;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlarmType;
|
||||
|
||||
/**
|
||||
* Manager class to hold between scan dialog and alarming capabilities
|
||||
|
@ -74,11 +78,11 @@ public class SCANAlarmAlertManager {
|
|||
|
||||
private static SCANAlarmAlertManager instance = null;
|
||||
|
||||
private HashMap<String, HashMap<ScanTables, List<ScheduledAlarms>>> scheduledAlarmsMap;
|
||||
private Map<String, Map<ScanTables, List<ScheduledAlarms>>> scheduledAlarmsMap;
|
||||
|
||||
private HashMap<String, HashMap<ScanTables, Set<AlertedAlarms>>> alertedAlarmsMap;
|
||||
private Map<String, Map<ScanTables, Set<AlertedAlarms>>> alertedAlarmsMap;
|
||||
|
||||
private HashMap<String, HashMap<ScanTables, List<String>>> idents;
|
||||
private Map<String, Map<ScanTables, List<String>>> idents;
|
||||
|
||||
private boolean ring = false;
|
||||
|
||||
|
@ -98,7 +102,7 @@ public class SCANAlarmAlertManager {
|
|||
public void addSite(String site) {
|
||||
|
||||
if (!scheduledAlarmsMap.containsKey(site)) {
|
||||
HashMap<ScanTables, List<ScheduledAlarms>> siteScheduledAlarmsMap = new HashMap<ScanTables, List<ScheduledAlarms>>();
|
||||
Map<ScanTables, List<ScheduledAlarms>> siteScheduledAlarmsMap = Collections.synchronizedMap(new HashMap<ScanTables, List<ScheduledAlarms>>());
|
||||
siteScheduledAlarmsMap.put(ScanTables.DMD,
|
||||
new CopyOnWriteArrayList<ScheduledAlarms>());
|
||||
siteScheduledAlarmsMap.put(ScanTables.CELL,
|
||||
|
@ -107,7 +111,7 @@ public class SCANAlarmAlertManager {
|
|||
}
|
||||
|
||||
if (!alertedAlarmsMap.containsKey(site)) {
|
||||
HashMap<ScanTables, Set<AlertedAlarms>> siteAlertedAlarmsSet = new HashMap<ScanTables, Set<AlertedAlarms>>();
|
||||
Map<ScanTables, Set<AlertedAlarms>> siteAlertedAlarmsSet = Collections.synchronizedMap(new HashMap<ScanTables, Set<AlertedAlarms>>());
|
||||
siteAlertedAlarmsSet.put(ScanTables.DMD,
|
||||
new HashSet<AlertedAlarms>());
|
||||
siteAlertedAlarmsSet.put(ScanTables.CELL,
|
||||
|
@ -116,7 +120,7 @@ public class SCANAlarmAlertManager {
|
|||
}
|
||||
|
||||
if (!idents.containsKey(site)) {
|
||||
HashMap<ScanTables, List<String>> siteIdents = new HashMap<ScanTables, List<String>>();
|
||||
Map<ScanTables, List<String>> siteIdents = new HashMap<ScanTables, List<String>>();
|
||||
siteIdents.put(ScanTables.CELL, new ArrayList<String>());
|
||||
siteIdents.put(ScanTables.DMD, new ArrayList<String>());
|
||||
idents.put(site, siteIdents);
|
||||
|
@ -126,15 +130,15 @@ public class SCANAlarmAlertManager {
|
|||
private SCANAlarmAlertManager() {
|
||||
|
||||
if (scheduledAlarmsMap == null) {
|
||||
scheduledAlarmsMap = new HashMap<String, HashMap<ScanTables, List<ScheduledAlarms>>>();
|
||||
scheduledAlarmsMap = Collections.synchronizedMap(new HashMap<String, Map<ScanTables, List<ScheduledAlarms>>>());
|
||||
}
|
||||
|
||||
if (alertedAlarmsMap == null) {
|
||||
alertedAlarmsMap = new HashMap<String, HashMap<ScanTables, Set<AlertedAlarms>>>();
|
||||
alertedAlarmsMap = Collections.synchronizedMap(new HashMap<String, Map<ScanTables, Set<AlertedAlarms>>>());
|
||||
}
|
||||
|
||||
if (idents == null) {
|
||||
idents = new HashMap<String, HashMap<ScanTables, List<String>>>();
|
||||
idents = new HashMap<String, Map<ScanTables, List<String>>>();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -496,6 +500,7 @@ public class SCANAlarmAlertManager {
|
|||
|
||||
public void removeAlertedAlarms(String site, ScanTables tableType) {
|
||||
alertedAlarmsMap.get(site).get(tableType).clear();
|
||||
setRing(false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -603,4 +608,5 @@ public class SCANAlarmAlertManager {
|
|||
+ this.row + "\nCol #:" + this.col + "\nCleared: " + cleared + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -475,8 +475,7 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
alarmDlg.open();
|
||||
if (!alarmBtn.isDisposed()
|
||||
&& (mgr.getAlertedAlarmCount(site, scanTable) == 0)) {
|
||||
alarmBtn.setVisible(false);
|
||||
mgr.setRing(false);
|
||||
turnOffAlarm();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -488,6 +487,22 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
timeLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void turnOffAlarm() {
|
||||
if (alarmBtn != null && !alarmBtn.isDisposed()) {
|
||||
alarmBtn.setVisible(false);
|
||||
}
|
||||
mgr.setRing(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void turnOnAlarm() {
|
||||
if (alarmBtn != null && !alarmBtn.isDisposed()) {
|
||||
alarmBtn.setVisible(true);
|
||||
}
|
||||
mgr.setRing(true);
|
||||
}
|
||||
|
||||
// private void resetButtonForegroundColor(Button btn)
|
||||
// {
|
||||
// btn.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
|
||||
|
|
|
@ -514,8 +514,7 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
alarmsDlg.open();
|
||||
if (!alarmBtn.isDisposed()
|
||||
&& mgr.getAlertedAlarms(site, scanTable).isEmpty()) {
|
||||
alarmBtn.setVisible(false);
|
||||
mgr.setRing(false);
|
||||
turnOffAlarm();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1299,4 +1298,19 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
dmdTableComp.alarmSelection(ident);
|
||||
|
||||
}
|
||||
|
||||
public void turnOffAlarm() {
|
||||
if (alarmBtn != null && !alarmBtn.isDisposed()) {
|
||||
alarmBtn.setVisible(false);
|
||||
}
|
||||
mgr.setRing(false);
|
||||
}
|
||||
|
||||
public void turnOnAlarm() {
|
||||
if (alarmBtn != null && !alarmBtn.isDisposed()) {
|
||||
alarmBtn.setVisible(true);
|
||||
}
|
||||
mgr.setRing(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -647,4 +647,14 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void turnOffAlarm() {
|
||||
mgr.setRing(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void turnOnAlarm() {
|
||||
mgr.setRing(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -609,4 +609,14 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
// Not currently used for TVS
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void turnOffAlarm() {
|
||||
mgr.setRing(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void turnOnAlarm() {
|
||||
mgr.setRing(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,12 +20,11 @@ Developed on the Raytheon Visualization Environment (viz)
|
|||
<launcherArgs>
|
||||
<programArgs>-data @user.home/caveData -user @user.home/caveData -clean</programArgs>
|
||||
<programArgsLin>-consoleLog</programArgsLin>
|
||||
<vmArgs>-Xincgc -Xmx256M -Xss2024k -Dosgi.instance.area.readOnly=true -Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler -Dorg.eclipse.update.reconcile=false -Dqpid.dest_syntax=BURL -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false</vmArgs>
|
||||
<vmArgs>-Xincgc -Xmx256M -Xss2024k -Dosgi.instance.area.readOnly=true -Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler -Dorg.eclipse.update.reconcile=false -Dqpid.dest_syntax=BURL -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dlog4j.configuration=log4j-alertviz.xml</vmArgs>
|
||||
</launcherArgs>
|
||||
|
||||
<windowImages/>
|
||||
|
||||
|
||||
<launcher name="alertviz">
|
||||
<solaris/>
|
||||
<win useIco="false">
|
||||
|
@ -39,7 +38,6 @@ Developed on the Raytheon Visualization Environment (viz)
|
|||
</win>
|
||||
</launcher>
|
||||
|
||||
|
||||
<vm>
|
||||
<linux include="true">jdk1.6.0</linux>
|
||||
<windows include="true">jdk1.6.0</windows>
|
||||
|
|
|
@ -27,11 +27,15 @@ import java.util.Map;
|
|||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
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.viz.core.DescriptorMap;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.catalog.CatalogQuery;
|
||||
import com.raytheon.uf.viz.core.catalog.DbQuery;
|
||||
|
@ -39,6 +43,7 @@ import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay;
|
|||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.map.MapDescriptor;
|
||||
import com.raytheon.uf.viz.core.procedures.Bundle;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceProperties;
|
||||
|
@ -46,7 +51,10 @@ import com.raytheon.uf.viz.core.rsc.ResourceType;
|
|||
import com.raytheon.uf.viz.productbrowser.ProductBrowserPreference.PreferenceType;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.MenuLoader;
|
||||
import com.raytheon.viz.ui.VizWorkbenchManager;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager;
|
||||
import com.raytheon.viz.ui.perspectives.VizPerspectiveListener;
|
||||
|
||||
/**
|
||||
* Product browser abstract requestable implementation
|
||||
|
@ -194,7 +202,10 @@ public abstract class AbstractRequestableProductBrowserDataDefinition<T extends
|
|||
IDescriptor currDesc = null;
|
||||
// retrieves the correct editor
|
||||
getEditor();
|
||||
IDisplayPaneContainer container = EditorUtil.getActiveVizContainer();
|
||||
IDisplayPaneContainer container = getEditor();
|
||||
if (container == null) {
|
||||
return;
|
||||
}
|
||||
AbstractRenderableDisplay display = (AbstractRenderableDisplay) container
|
||||
.getActiveDisplayPane().getRenderableDisplay();
|
||||
display = (AbstractRenderableDisplay) display.createNewDisplay();
|
||||
|
@ -265,8 +276,39 @@ public abstract class AbstractRequestableProductBrowserDataDefinition<T extends
|
|||
return null;
|
||||
}
|
||||
|
||||
public void getEditor() {
|
||||
// do nothing, if user wants a certain editor then overwrite this method
|
||||
protected IDisplayPaneContainer getEditor() {
|
||||
String id = DescriptorMap.getEditorId(getDescriptorClass().getName());
|
||||
IEditorPart editorPart = EditorUtil.getActiveEditor();
|
||||
if (editorPart != null && id.equals(editorPart.getEditorSite().getId())) {
|
||||
return (AbstractEditor) editorPart;
|
||||
}
|
||||
editorPart = EditorUtil.findEditor(id);
|
||||
if (editorPart != null) {
|
||||
return (AbstractEditor) editorPart;
|
||||
}
|
||||
return openNewEditor(id);
|
||||
}
|
||||
|
||||
protected IDisplayPaneContainer openNewEditor(String editorId) {
|
||||
IWorkbenchWindow window = VizWorkbenchManager.getInstance()
|
||||
.getCurrentWindow();
|
||||
AbstractVizPerspectiveManager mgr = VizPerspectiveListener.getInstance(
|
||||
window).getActivePerspectiveManager();
|
||||
if (mgr != null) {
|
||||
AbstractEditor editor = mgr.openNewEditor();
|
||||
if (editor == null) {
|
||||
return null;
|
||||
} else if (editorId.equals(editor.getEditorSite().getId())) {
|
||||
return editor;
|
||||
} else {
|
||||
window.getActivePage().closeEditor(editor, false);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected Class<? extends IDescriptor> getDescriptorClass() {
|
||||
return MapDescriptor.class;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -121,7 +121,7 @@ public class ThinClientLocalizationAdapter extends CAVELocalizationAdapter
|
|||
ListResponse response = new ListResponse();
|
||||
response.context = context;
|
||||
response.isDirectory = localFile.isDirectory();
|
||||
response.isProtected = false;
|
||||
response.protectedLevel = null;
|
||||
response.existsOnServer = false;
|
||||
response.fileName = p;
|
||||
response.date = new Date(localFile.lastModified());
|
||||
|
@ -155,7 +155,7 @@ public class ThinClientLocalizationAdapter extends CAVELocalizationAdapter
|
|||
response.context = ctx;
|
||||
response.existsOnServer = false;
|
||||
response.fileName = fileName;
|
||||
response.isProtected = false;
|
||||
response.protectedLevel = null;
|
||||
File file = getPath(ctx, fileName);
|
||||
if (file == null) {
|
||||
response.isDirectory = false;
|
||||
|
|
|
@ -197,7 +197,7 @@ public class GLStats {
|
|||
" * GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX = %dMB\n",
|
||||
nvxDedicatedMem / 1024));
|
||||
output.append(String.format(
|
||||
" * GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = %dMB\n",
|
||||
" * GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX = %dMB\n",
|
||||
nvxTotalAvailableMem / 1024));
|
||||
output.append(String.format(
|
||||
" * GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = %dMB\n",
|
||||
|
|
|
@ -177,7 +177,7 @@ public class GLShadedShapeBase implements IShape {
|
|||
|
||||
for (FloatBuffer[] contours : polygons) {
|
||||
glu.gluTessProperty(tessellator, GLU.GLU_TESS_WINDING_RULE,
|
||||
GLU.GLU_TESS_WINDING_NONZERO);
|
||||
GLU.GLU_TESS_WINDING_ODD);
|
||||
glu.gluTessBeginPolygon(tessellator, (double[]) null);
|
||||
int polygonStart = vertexBuffer.position() / 2;
|
||||
for (FloatBuffer contour : contours) {
|
||||
|
|
|
@ -53,7 +53,8 @@ import com.raytheon.uf.viz.core.rsc.ResourceList;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 28, 2011 mpduff Initial creation
|
||||
* Jan 28, 2011 mpduff Initial creation.
|
||||
* Sep 11, 2012 1162 mpduff Made mergeMetaDataMap method public.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -117,7 +118,7 @@ public class VizGroupResourceData extends AbstractRequestableResourceData
|
|||
return resource;
|
||||
}
|
||||
|
||||
private void mergeMetadataMap() {
|
||||
public void mergeMetadataMap() {
|
||||
if ((this.metadataMap == null) || this.metadataMap.isEmpty()) {
|
||||
this.metadataMap = new HashMap<String, RequestConstraint>();
|
||||
|
||||
|
|
|
@ -170,10 +170,8 @@ public class GriddedImageDisplay2 extends AbstractTileSet {
|
|||
|
||||
private IImage createShortTile(IGraphicsTarget target, Rectangle rect,
|
||||
int width, int i, int j) {
|
||||
// short is 2 bytes
|
||||
int elemSize = 2;
|
||||
// buffer to copy into
|
||||
short[] dest = new short[rect.width * rect.height * elemSize];
|
||||
short[] dest = new short[rect.width * rect.height];
|
||||
ShortBuffer srcBuff = (ShortBuffer) data;
|
||||
|
||||
short[] tmp = new short[rect.width];
|
||||
|
|
|
@ -23,7 +23,7 @@ Table of Contents<br>
|
|||
<p><br>
|
||||
<tt>cave.sh [-server hostname:port/services] [-mode TEST|PRACTICE|OPERATIONAL] [-site xxx]
|
||||
[-u user] [-component componentName] [-perspective perspecitiveName] [-noredirect]
|
||||
[-consoleLog]<br>
|
||||
[-consoleLog] [-nc TRUE]<br>
|
||||
<br>
|
||||
<table nosave="" border="1" width="100%">
|
||||
<tbody>
|
||||
|
@ -77,6 +77,15 @@ Table of Contents<br>
|
|||
<td>Causes the CAVE log to be output to the console for monitoring/debugging.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-nc</td>
|
||||
<td>YES</td>
|
||||
<td>This option is only used by Service backup. It is used to indicate that the site is
|
||||
a national center, consequently a non-primary site gets special permission to export
|
||||
site configuration to the central server via the Service Backup GUI. This option should
|
||||
be set to 'true', i.e., -nc true.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
|
|
|
@ -159,8 +159,9 @@ This item keyboard shortcuts. You are allowed up to 200
|
|||
shortcuts.
|
||||
IMPORTANT: You should test your shortcuts on your system as many
|
||||
keys are already bound by the system. For example, F10 is bound
|
||||
by
|
||||
some Tk widgets to bring up menus.
|
||||
by some Tk widgets to bring up menus. Please note that AWIPS2 replaces
|
||||
the KP_ syntax with the NUMPAD_ syntax, i.e. KP_Add in AWIPS1 becomes
|
||||
NUMPAD_ADD in AWIPS2.
|
||||
<p>Each shortcut is defined by a list with entries: </p>
|
||||
<blockquote><li>Shortcut key</li>
|
||||
<li>State of ShortCut key</li>
|
||||
|
@ -198,10 +199,10 @@ Examples:
|
|||
<p><b><tt>ShortCut1 = ["F1", "None",
|
||||
"SmartTool","Assign_Value"]
|
||||
# F1</tt></b> <br>
|
||||
<b><tt>ShortCut2 = ["KP_Subtract", "None",
|
||||
<b><tt>ShortCut2 = ["NUMPAD_SUBTRACT", "None",
|
||||
"SmartTool","AdjustValue_Down"]
|
||||
# Keypad -</tt></b> <br>
|
||||
<b><tt>ShortCut3 = ["KP_Add", "None",
|
||||
<b><tt>ShortCut3 = ["NUMPAD_ADD", "None",
|
||||
"SmartTool","AdjustValue_Up"]
|
||||
# Keypad +</tt></b> <br>
|
||||
<b><tt>ShortCut4 = ["F2", "None", "SmartTool","Smooth"]</tt></b> <br>
|
||||
|
|
|
@ -25,6 +25,9 @@ import java.util.Collection;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.slice.DiscreteGridSlice;
|
||||
|
@ -37,6 +40,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.common.util.RWLArrayList;
|
||||
import com.raytheon.viz.gfe.Activator;
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
import com.raytheon.viz.gfe.core.griddata.AbstractGridData;
|
||||
import com.raytheon.viz.gfe.core.griddata.IGridData;
|
||||
|
@ -107,8 +111,13 @@ public class VCParm extends VParm implements IParmListChangedListener,
|
|||
|
||||
// Need to check that the above call to mod.getGpi() did not fail
|
||||
if (!mod.isValid()) {
|
||||
statusHandler.handle(Priority.EVENTB, "Can't get GPI: ",
|
||||
this.mod.getErrorString());
|
||||
//statusHandler.handle(Priority.EVENTB, "Can't get GPI: ",
|
||||
// this.mod.getErrorString());
|
||||
Activator
|
||||
.getDefault()
|
||||
.getLog()
|
||||
.log(new Status(IStatus.INFO, Activator.PLUGIN_ID,
|
||||
"Can't get GPI: " + this.mod.getErrorString()));
|
||||
}
|
||||
|
||||
// set the parm type
|
||||
|
@ -455,9 +464,14 @@ public class VCParm extends VParm implements IParmListChangedListener,
|
|||
// get list of dependent parms
|
||||
List<ParmID> args = new ArrayList<ParmID>(mod.dependentParms());
|
||||
if (!mod.isValid()) {
|
||||
statusHandler.handle(Priority.EVENTB,
|
||||
"Error getting dependent WeatherElements: ",
|
||||
mod.getErrorString());
|
||||
//statusHandler.handle(Priority.EVENTB,
|
||||
// "Error getting dependent WeatherElements: ",
|
||||
// mod.getErrorString());
|
||||
Activator
|
||||
.getDefault()
|
||||
.getLog()
|
||||
.log(new Status(IStatus.INFO, Activator.PLUGIN_ID,
|
||||
"Error getting dependent WeatherElements: " + this.mod.getErrorString()));
|
||||
}
|
||||
|
||||
// get list of currently registered parms
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.viz.gfe.dialogs;
|
|||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
|
@ -32,8 +31,6 @@ import java.util.TimeZone;
|
|||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
import com.raytheon.viz.core.mode.CAVEMode;
|
||||
import com.raytheon.viz.gfe.GFEServerException;
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
import com.raytheon.viz.gfe.core.IParmManager;
|
||||
|
||||
/**
|
||||
|
@ -48,6 +45,10 @@ import com.raytheon.viz.gfe.core.IParmManager;
|
|||
* 04/30/2009 2282 rjpeter Refactored interfaces.
|
||||
* 08/19/2009 2547 rjpeter Implement Test/Prac database display.
|
||||
* 02/22/2012 14351 mli update with incoming databases
|
||||
* 09/12/2012 #1117 dgilling Revert previous changes, force
|
||||
* source list to always rebuild to ensure
|
||||
* up to date db list.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author ebabin
|
||||
|
@ -58,7 +59,7 @@ public class WEBrowserTypeRecord {
|
|||
|
||||
private String type;
|
||||
|
||||
private java.util.List<String> sources = new ArrayList<String>();
|
||||
private List<String> sources = new ArrayList<String>();
|
||||
|
||||
public static final SimpleDateFormat SOURCE_FORMAT = new SimpleDateFormat(
|
||||
"dd/HHmm");
|
||||
|
@ -77,12 +78,14 @@ public class WEBrowserTypeRecord {
|
|||
*/
|
||||
private Map<String, Map<String, List<String>>> miscMap = new HashMap<String, Map<String, List<String>>>();
|
||||
|
||||
private ParmID possibleParms[];
|
||||
private ParmID[] possibleParms;
|
||||
|
||||
private ParmID fields[];
|
||||
private ParmID[] fields;
|
||||
|
||||
private final CAVEMode mode;
|
||||
|
||||
private final IParmManager parmMgr;
|
||||
|
||||
static {
|
||||
SOURCE_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
}
|
||||
|
@ -90,9 +93,10 @@ public class WEBrowserTypeRecord {
|
|||
/**
|
||||
* @return the type
|
||||
*/
|
||||
public WEBrowserTypeRecord(String type, CAVEMode mode) {
|
||||
public WEBrowserTypeRecord(String type, CAVEMode mode, IParmManager parmMgr) {
|
||||
this.type = type;
|
||||
this.mode = mode;
|
||||
this.parmMgr = parmMgr;
|
||||
// create and fill these entries on creation of this type.
|
||||
makeSources();
|
||||
// go ahead and fill the ParmID[] array.
|
||||
|
@ -115,13 +119,6 @@ public class WEBrowserTypeRecord {
|
|||
* @return the sources
|
||||
*/
|
||||
public java.util.List<String> getSources() {
|
||||
return sources;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the sources
|
||||
*/
|
||||
public java.util.List<String> getUpdatedSources() {
|
||||
makeSources();
|
||||
return sources;
|
||||
}
|
||||
|
@ -136,7 +133,7 @@ public class WEBrowserTypeRecord {
|
|||
return fields;
|
||||
}
|
||||
|
||||
private ArrayList<DatabaseID> getDbsForType(String typeLabel) {
|
||||
private List<DatabaseID> getDbsForType(String typeLabel) {
|
||||
boolean pracFlag = false;
|
||||
boolean testFlag = false;
|
||||
|
||||
|
@ -145,19 +142,9 @@ public class WEBrowserTypeRecord {
|
|||
pracFlag = mode.equals(CAVEMode.PRACTICE);
|
||||
testFlag = mode.equals(CAVEMode.TEST);
|
||||
}
|
||||
// List<DatabaseID> dbs = DataManager.getCurrentInstance()
|
||||
// .getParmManager().getAvailableDbs();
|
||||
List<DatabaseID> dbs = parmMgr.getAvailableDbs();
|
||||
|
||||
// Always retrieve updated databases
|
||||
List<DatabaseID> dbs = null;
|
||||
try {
|
||||
dbs = DataManager.getCurrentInstance().getClient().getAvailableDbs();
|
||||
} catch (GFEServerException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
ArrayList<DatabaseID> filtDB = new ArrayList<DatabaseID>();
|
||||
List<DatabaseID> filtDB = new ArrayList<DatabaseID>();
|
||||
|
||||
for (DatabaseID db : dbs) {
|
||||
if (db.getDbType().equalsIgnoreCase(typeLabel)) {
|
||||
|
@ -167,88 +154,89 @@ public class WEBrowserTypeRecord {
|
|||
} else if (db.getDbType().equalsIgnoreCase("Test") && testFlag) {
|
||||
filtDB.add(db);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return filtDB;
|
||||
}
|
||||
|
||||
private void makeSources() {
|
||||
ArrayList<DatabaseID> databases = getDbsForType(type);
|
||||
IParmManager parmMgr = DataManager.getCurrentInstance()
|
||||
.getParmManager();
|
||||
// clear all existing data as we will end up rebuilding it here...
|
||||
sources.clear();
|
||||
fieldMap.clear();
|
||||
miscMap.clear();
|
||||
pressureMap.clear();
|
||||
|
||||
// move mutable to front of list.
|
||||
DatabaseID mutableDb = parmMgr.getMutableDatabase();
|
||||
if (databases.indexOf(mutableDb) > 0) {
|
||||
databases.remove(mutableDb);
|
||||
databases.add(0, mutableDb);
|
||||
}
|
||||
List<DatabaseID> databases = getDbsForType(type);
|
||||
final DatabaseID mutableDb = parmMgr.getMutableDatabase();
|
||||
|
||||
Collections.sort(databases, new Comparator<DatabaseID>() {
|
||||
@Override
|
||||
public int compare(DatabaseID left, DatabaseID right) {
|
||||
String compare1 = null == left.getModelName() ? "" : left
|
||||
.getModelName();
|
||||
String compare2 = null == right.getModelName() ? "" : right
|
||||
.getModelName();
|
||||
|
||||
int returnValue = compare1.compareTo(compare2);
|
||||
if (0 == returnValue) {
|
||||
compare1 = null == left.getModelTime() ? "" : left
|
||||
.getModelTime();
|
||||
compare2 = null == right.getModelTime() ? "" : right
|
||||
.getModelTime();
|
||||
returnValue = -1 * compare1.compareTo(compare2);
|
||||
// sorting rules for WeatherElementBrowser:
|
||||
// mutable first
|
||||
// singletons next in alpha order
|
||||
// rest in order first by name, then time (newest to oldest)
|
||||
if (left.equals(right)) {
|
||||
return 0;
|
||||
}
|
||||
return returnValue;
|
||||
|
||||
if (left.equals(mutableDb)) {
|
||||
return -1;
|
||||
} else if (right.equals(mutableDb)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
String leftModelTime = (left.getModelTime() != null ? left
|
||||
.getModelTime() : "");
|
||||
String rightModelTime = (right.getModelTime() != null ? right
|
||||
.getModelTime() : "");
|
||||
if (leftModelTime.equals(DatabaseID.NO_MODEL_TIME)
|
||||
&& (!rightModelTime.equals(DatabaseID.NO_MODEL_TIME))) {
|
||||
return -1;
|
||||
} else if (!leftModelTime.equals(DatabaseID.NO_MODEL_TIME)
|
||||
&& (rightModelTime.equals(DatabaseID.NO_MODEL_TIME))) {
|
||||
return 1;
|
||||
} else if (leftModelTime.equals(DatabaseID.NO_MODEL_TIME)
|
||||
&& (rightModelTime.equals(DatabaseID.NO_MODEL_TIME))) {
|
||||
return left.getModelName().compareTo(right.getModelName());
|
||||
}
|
||||
|
||||
int modelNameCompare = left.getModelName().compareTo(
|
||||
right.getModelName());
|
||||
if (modelNameCompare != 0) {
|
||||
return modelNameCompare;
|
||||
}
|
||||
return -1 * leftModelTime.compareTo(rightModelTime);
|
||||
}
|
||||
});
|
||||
|
||||
for (DatabaseID dbase : databases) {
|
||||
String sourceTime = dbase.getModelName();
|
||||
if (dbase.getModelDate() != null) {
|
||||
for (DatabaseID dbId : databases) {
|
||||
String sourceString = dbId.getModelName();
|
||||
if (dbId.getModelDate() != null) {
|
||||
synchronized (SOURCE_FORMAT) {
|
||||
sourceTime += " "
|
||||
+ SOURCE_FORMAT.format(dbase.getModelDate());
|
||||
sourceString += " "
|
||||
+ SOURCE_FORMAT.format(dbId.getModelDate());
|
||||
}
|
||||
}
|
||||
boolean srcAdded = false;
|
||||
ParmID[] availParms = parmMgr.getAvailableParms(dbase);
|
||||
if (availParms != null) {
|
||||
sources.add(sourceString);
|
||||
|
||||
ParmID[] availParms = parmMgr.getAvailableParms(dbId);
|
||||
List<ParmID> sortedParms = new ArrayList<ParmID>(availParms.length);
|
||||
for (ParmID parm : availParms) {
|
||||
if (parm.getParmLevel().startsWith("MB")) {
|
||||
addToMap(pressureMap, sourceTime, parm.getParmName(),
|
||||
addToMap(pressureMap, sourceString, parm.getParmName(),
|
||||
parm.getParmLevel());
|
||||
} else {
|
||||
addToMap(miscMap, sourceTime, parm.getParmName(),
|
||||
addToMap(miscMap, sourceString, parm.getParmName(),
|
||||
parm.getParmLevel());
|
||||
}
|
||||
DatabaseID parmDB = parm.getDbId();
|
||||
if (parmDB.getModelName().equalsIgnoreCase(
|
||||
dbase.getModelName())
|
||||
&& parmDB.getModelTime().equalsIgnoreCase(
|
||||
dbase.getModelTime())
|
||||
&& parmDB.getDbType().equalsIgnoreCase(
|
||||
dbase.getDbType())) {
|
||||
if (!sources.contains(sourceTime)) {
|
||||
sources.add(sourceTime);
|
||||
srcAdded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (srcAdded) {
|
||||
// create a list...
|
||||
ArrayList<ParmID> ids = new ArrayList<ParmID>();
|
||||
for (ParmID parm : availParms) {
|
||||
ids.add(parm);
|
||||
}
|
||||
java.util.Collections.sort(ids);
|
||||
|
||||
fieldMap.put(sourceTime,
|
||||
ids.toArray(new ParmID[ids.size()]));
|
||||
}
|
||||
sortedParms.add(parm);
|
||||
}
|
||||
|
||||
Collections.sort(sortedParms);
|
||||
fieldMap.put(sourceString,
|
||||
sortedParms.toArray(new ParmID[sortedParms.size()]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -420,11 +408,10 @@ public class WEBrowserTypeRecord {
|
|||
*/
|
||||
public ParmID[] getPossibleParmIDs() {
|
||||
if (possibleParms == null) {
|
||||
ArrayList<DatabaseID> databases = getDbsForType(type);
|
||||
List<DatabaseID> databases = getDbsForType(type);
|
||||
ArrayList<ParmID> parmIds = new ArrayList<ParmID>();
|
||||
for (DatabaseID db : databases) {
|
||||
ParmID ids[] = DataManager.getCurrentInstance()
|
||||
.getParmManager().getAvailableParms(db);
|
||||
ParmID ids[] = parmMgr.getAvailableParms(db);
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
parmIds.add(ids[i]);
|
||||
}
|
||||
|
@ -437,25 +424,6 @@ public class WEBrowserTypeRecord {
|
|||
return possibleParms;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add ParmIDs for new database
|
||||
*/
|
||||
public void addNewParmIDs(String newSource) {
|
||||
ArrayList<ParmID> parmIds = new ArrayList<ParmID>();
|
||||
possibleParms = getPossibleParmIDs();
|
||||
parmIds.addAll(Arrays.asList(possibleParms));
|
||||
|
||||
ParmID ids[] = getFields(newSource);
|
||||
for ( int i = 0; i < ids.length; i++) {
|
||||
if (!parmIds.contains(ids[i])) {
|
||||
parmIds.add(ids[i]);
|
||||
}
|
||||
}
|
||||
|
||||
possibleParms = new ParmID[parmIds.size()];
|
||||
parmIds.toArray(possibleParms);
|
||||
}
|
||||
|
||||
public ArrayList<ParmID> getFilteredParmIDs(String sources[],
|
||||
String fields[], String planes[]) {
|
||||
ArrayList<ParmID> listToReturn = new ArrayList<ParmID>();
|
||||
|
|
|
@ -51,7 +51,6 @@ import org.eclipse.swt.widgets.ToolItem;
|
|||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
import com.raytheon.viz.core.mode.CAVEMode;
|
||||
import com.raytheon.viz.gfe.GFEServerException;
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
import com.raytheon.viz.gfe.core.parm.Parm;
|
||||
import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
||||
|
@ -70,6 +69,9 @@ import com.raytheon.viz.ui.widgets.ToggleSelectList;
|
|||
* 04/30/2009 2282 rjpeter Refactored.
|
||||
* 08/19/2009 2547 rjpeter Fix Test/Prac database display.
|
||||
* 02/22/2012 14351 mli update with incoming new grids.
|
||||
* 09/12/2012 #1117 dgilling Revert previous changes, retrieve
|
||||
* database list from ParmManager
|
||||
* not EDEX.
|
||||
* </pre>
|
||||
*
|
||||
* @author ebabin
|
||||
|
@ -107,8 +109,6 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
|
|||
|
||||
private ParmID[] currentDisplayedParms;
|
||||
|
||||
private List<DatabaseID> databases;
|
||||
|
||||
private static final Point size = new Point(603, 778);
|
||||
|
||||
private static final String IFP = "IFP";
|
||||
|
@ -499,7 +499,6 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
|
|||
* Automatically checks for dups, and sorts.
|
||||
*/
|
||||
private void updateSourceMenu() {
|
||||
sourceList.removeAll();
|
||||
resetMenu(sourceMenu);
|
||||
List<String> sortedSources = selectedType.getSources();
|
||||
|
||||
|
@ -519,48 +518,6 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* check for incoming new databases
|
||||
*/
|
||||
private void checkForNewSource() {
|
||||
List<String> sortedSources = selectedType.getUpdatedSources();
|
||||
|
||||
if (sortedSources != null) {
|
||||
List<String> newSources = new ArrayList<String>();
|
||||
|
||||
// Check for new new database
|
||||
for (String source : sortedSources) {
|
||||
boolean found = false;
|
||||
for (int i = 0; i < sourceMenu.getItemCount(); i++) {
|
||||
if (sourceMenu.getItem(i).getText().equals(source)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
newSources.add(source);
|
||||
}
|
||||
}
|
||||
|
||||
// create menuItem for new database
|
||||
if (newSources != null) {
|
||||
for (String s : newSources) {
|
||||
selectedType.addNewParmIDs(s);
|
||||
final MenuItem item = new MenuItem(sourceMenu, SWT.PUSH);
|
||||
item.setText(s);
|
||||
item.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
addToList(item.getText(), sourceList);
|
||||
processSourceSelection();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processSourceSelection() {
|
||||
java.util.List<String> currentSourceSelection = java.util.Arrays
|
||||
.asList(sourceList.getSelection());
|
||||
|
@ -858,9 +815,7 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
|
|||
sourceToolItem.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
// Check for new source
|
||||
checkForNewSource();
|
||||
|
||||
updateSourceMenu();
|
||||
Rectangle rect = sourceToolItem.getBounds();
|
||||
Point pt = new Point(rect.x, rect.y + rect.height);
|
||||
pt = sourceToolBar.toDisplay(pt);
|
||||
|
@ -1208,10 +1163,11 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
|
|||
final CAVEMode mode = CAVEMode.getMode();
|
||||
|
||||
if (mutableID.getDbType().equalsIgnoreCase("")) {
|
||||
typeEntries.add(new WEBrowserTypeRecord(IFP, mode));
|
||||
typeEntries.add(new WEBrowserTypeRecord(IFP, mode, dataManager
|
||||
.getParmManager()));
|
||||
} else {
|
||||
typeEntries
|
||||
.add(new WEBrowserTypeRecord(mutableID.getDbType(), mode));
|
||||
typeEntries.add(new WEBrowserTypeRecord(mutableID.getDbType(),
|
||||
mode, dataManager.getParmManager()));
|
||||
}
|
||||
|
||||
for (DatabaseID database : getDatabases()) {
|
||||
|
@ -1229,7 +1185,8 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
|
|||
databaseType = IFP;
|
||||
}
|
||||
|
||||
typeEntries.add(new WEBrowserTypeRecord(databaseType, mode));
|
||||
typeEntries.add(new WEBrowserTypeRecord(databaseType, mode,
|
||||
dataManager.getParmManager()));
|
||||
}
|
||||
if (!siteList.contains(database.getSiteId())) {
|
||||
siteList.add(database.getSiteId());
|
||||
|
@ -1251,19 +1208,7 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
|
|||
}
|
||||
|
||||
private List<DatabaseID> getDatabases() {
|
||||
if (databases == null) {
|
||||
// databases = dataManager.getParmManager().getAvailableDbs();
|
||||
|
||||
// Always Retrieve updated databases
|
||||
try {
|
||||
databases = DataManager.getCurrentInstance().getClient().getAvailableDbs();
|
||||
} catch (GFEServerException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return databases;
|
||||
return dataManager.getParmManager().getAvailableDbs();
|
||||
}
|
||||
|
||||
private ParmID[] getSelectedParmIDS() {
|
||||
|
@ -1294,6 +1239,7 @@ public class WeatherElementBrowserDialog extends CaveJFACEDialog {
|
|||
*
|
||||
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int compare(String s1, String s2) {
|
||||
// we expect pressure strings to read MBnnnn (e.g., MB100 or
|
||||
// MB1000), thus we'll strip the first two letters of the strings
|
||||
|
|
|
@ -57,6 +57,7 @@ import com.raytheon.viz.gfe.textformatter.TextProductManager;
|
|||
* 23 MAY 2012 14859 ryu Select VTEC formatting in practice mode
|
||||
* based on VTECMessageType setting.
|
||||
* 10 AUG 2012 15178 mli Add autoWrite and autoStore capability
|
||||
* 26 SEP 2012 15423 ryu Fix product correction in practice mode
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -432,8 +433,11 @@ public class ProductAreaComp extends Composite implements
|
|||
|
||||
int pracType = 0;
|
||||
if (practiceMode) {
|
||||
String pil = (String) textProductMgr.getProductDefinition(productName)
|
||||
String pil = null;
|
||||
if (textProductMgr.getProductDefinition(productName) != null) {
|
||||
pil = (String) textProductMgr.getProductDefinition(productName)
|
||||
.get("pil");
|
||||
}
|
||||
if (pil != null) {
|
||||
String vtecMode = textProductMgr.getVtecMessageType(
|
||||
pil.substring(0, 3));
|
||||
|
|
|
@ -75,6 +75,7 @@ import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil;
|
|||
* 05 Jan 2008 1784 lvenable Initial creation
|
||||
* 19 Feb 2010 4132 ryu Product correction.
|
||||
* 30 Jul 2010 6719 jnjanga Placed cursor at the end of inserted CTA
|
||||
* 26 Sep 2012 15423 ryu Avoid resetting text when possible.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1036,7 +1037,18 @@ public class StyledTextComp extends Composite {
|
|||
dirty = false;
|
||||
}
|
||||
|
||||
protected boolean isUpperCase(final String word) {
|
||||
for (int index= word.length() - 1; index >= 0; index--) {
|
||||
if (Character.isLowerCase(word.charAt(index)))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void upper() {
|
||||
String text = textEditorST.getText();
|
||||
if (isUpperCase(text))
|
||||
return;
|
||||
int topIdx = textEditorST.getTopIndex();
|
||||
setProductText(textEditorST.getText().toUpperCase());
|
||||
textEditorST.setTopIndex(topIdx);
|
||||
|
|
|
@ -1198,7 +1198,7 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
|
|||
+ UserController.getUserObject().uniqueId());
|
||||
}
|
||||
|
||||
if (!runningAsPrimary) {
|
||||
if ((!runningAsPrimary) && (!LocalizationManager.getInstance().isNationalCenter())) {
|
||||
doExCon.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
|
||||
|
@ -226,6 +227,8 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
|
||||
private boolean running;
|
||||
|
||||
private org.eclipse.swt.widgets.List hazardGroupList;
|
||||
|
||||
public MakeHazardDialog(Shell parent, DataManager dataManager,
|
||||
String colorName, int defaultMapWidth, int timeScaleEndTime,
|
||||
float areaThreshold, String defaultHazardType,
|
||||
|
@ -235,7 +238,8 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
Map<String, List<String>> localEffectAreas,
|
||||
Map<String, List<Object>> localAreaData) {
|
||||
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK
|
||||
| CAVE.NO_PACK);
|
||||
this.dataManager = dataManager;
|
||||
this.defaultMapWidth = defaultMapWidth;
|
||||
this.timeScaleEndTime = timeScaleEndTime;
|
||||
|
@ -279,6 +283,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
protected void initializeComponents(Shell shell) {
|
||||
// Initialize all of the controls and layouts
|
||||
initializeComponents();
|
||||
shell.pack();
|
||||
|
||||
this.comboDict = new HashMap<String, Integer>();
|
||||
setHazardType(this.defaultHazardType);
|
||||
|
@ -1012,9 +1017,8 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
}
|
||||
};
|
||||
|
||||
org.eclipse.swt.widgets.List hazardGroupList = new org.eclipse.swt.widgets.List(
|
||||
hazardTypeGroup, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL
|
||||
| SWT.SINGLE);
|
||||
hazardGroupList = new org.eclipse.swt.widgets.List(hazardTypeGroup,
|
||||
SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE);
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gd.heightHint = hazardGroupList.getItemHeight() * 12
|
||||
+ hazardGroupList.getBorderWidth();
|
||||
|
@ -1100,6 +1104,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
// create the start time slider
|
||||
startTimeSlider = new Scale(startGroup, SWT.HORIZONTAL);
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gd.minimumWidth = 200;
|
||||
startTimeSlider.setLayoutData(gd);
|
||||
startTimeSlider.addSelectionListener(new SelectionListener() {
|
||||
|
||||
|
@ -1130,7 +1135,6 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
startTimeSlider.setMaximum(this.timeScaleEndTime);
|
||||
startTimeSlider.setIncrement(1);
|
||||
startTimeSlider.setPageIncrement(1);
|
||||
startTimeSlider.setLayoutData(new GridData(200, SWT.DEFAULT));
|
||||
|
||||
// Force start time to an hourly boundary
|
||||
Calendar cal = Calendar.getInstance();
|
||||
|
@ -1158,6 +1162,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
// Create the end time slider
|
||||
endTimeSlider = new Scale(endGroup, SWT.HORIZONTAL);
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gd.minimumWidth = 200;
|
||||
endTimeSlider.setLayoutData(gd);
|
||||
|
||||
endTimeSlider.setMinimum(1);
|
||||
|
@ -1165,7 +1170,6 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
endTimeSlider.setIncrement(1);
|
||||
endTimeSlider.setPageIncrement(1);
|
||||
endTimeSlider.setSelection(1);
|
||||
endTimeSlider.setLayoutData(new GridData(200, SWT.DEFAULT));
|
||||
endTimeSlider.addSelectionListener(new SelectionListener() {
|
||||
|
||||
@Override
|
||||
|
@ -1215,6 +1219,21 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
leCombo.setLayoutData(gd);
|
||||
leCombo.addSelectionListener(selAdapt);
|
||||
|
||||
GC gc = new GC(this.getDisplay());
|
||||
String longest = "";
|
||||
int widest = 0;
|
||||
for (List<String> list : localEffectAreas.values()) {
|
||||
for (String s : list) {
|
||||
int width = gc.stringExtent(s).x;
|
||||
if (width > widest) {
|
||||
widest = width;
|
||||
longest = s;
|
||||
}
|
||||
}
|
||||
}
|
||||
gc.dispose();
|
||||
leCombo.add(longest);
|
||||
}
|
||||
|
||||
private Map<String, List<String>> getHazardsDictionary() {
|
||||
|
@ -1317,6 +1336,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
* the hazard type to select.
|
||||
*/
|
||||
public void setHazardType(String hazardType) {
|
||||
hazardGroupList.setSelection(hazardGroupList.indexOf(hazardType));
|
||||
updateSelectedHazardList(hazardType);
|
||||
|
||||
if (this.localEffectAreas.containsKey(hazardType)) {
|
||||
|
@ -1345,9 +1365,15 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
leGroup.setVisible(false);
|
||||
((GridData) leGroup.getLayoutData()).exclude = true;
|
||||
this.hazLocalEffect = "None";
|
||||
String s = etnSegNumberField.getText();
|
||||
for (Entry<String, List<Object>> entry : localAreaData.entrySet()) {
|
||||
if (s.equals(entry.getValue().get(0))) {
|
||||
this.etnSegNumberField.setText("");
|
||||
this.etnSegNumberField.setSelection(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
leGroup.getParent().pack();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1375,9 +1401,9 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
private void hazardLocalEffectSelected(String s) {
|
||||
this.hazLocalEffect = s;
|
||||
List<Object> laData = this.localAreaData.get(s);
|
||||
private void hazardLocalEffectSelected(String le) {
|
||||
this.hazLocalEffect = le;
|
||||
List<Object> laData = this.localAreaData.get(le);
|
||||
if (laData != null) {
|
||||
// get the segment number
|
||||
Integer segment = (Integer) laData.get(0);
|
||||
|
@ -1387,8 +1413,15 @@ public class MakeHazardDialog extends CaveSWTDialog implements
|
|||
this.etnSegNumberField.setSelection(segText.length());
|
||||
|
||||
} else {
|
||||
String s = etnSegNumberField.getText();
|
||||
for (Entry<String, List<Object>> entry : localAreaData
|
||||
.entrySet()) {
|
||||
if (s.equals(entry.getValue().get(0))) {
|
||||
this.etnSegNumberField.setText("");
|
||||
this.etnSegNumberField.setSelection(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
@ -19,6 +19,19 @@
|
|||
**/
|
||||
package com.raytheon.viz.grid.rsc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
||||
import com.raytheon.viz.core.rsc.VizGroupResourceData;
|
||||
|
||||
|
||||
|
@ -31,7 +44,8 @@ import com.raytheon.viz.core.rsc.VizGroupResourceData;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 28, 2011 mpduff Initial creation
|
||||
* Jan 28, 2011 mpduff Initial creation.
|
||||
* Sep 11, 2012 1162 mpduff Override getAvailableTimes method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,4 +58,31 @@ public class FfgVizGroupResourceData extends VizGroupResourceData {
|
|||
// Make name generator here
|
||||
nameGenerator = new FfgGridNameGenerator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataTime[] getAvailableTimes() throws VizException {
|
||||
Set<DataTime> baseTimes = new HashSet<DataTime>();
|
||||
Iterator<ResourcePair> rpIter = resourceList.iterator();
|
||||
super.mergeMetadataMap();
|
||||
|
||||
List<DataTime> availableTimes = new ArrayList<DataTime>();
|
||||
|
||||
while (rpIter.hasNext()) {
|
||||
ResourcePair rp = rpIter.next();
|
||||
|
||||
if (rp.getResourceData() instanceof AbstractRequestableResourceData) {
|
||||
AbstractRequestableResourceData arrd = (AbstractRequestableResourceData) rp
|
||||
.getResourceData();
|
||||
Collection<DataTime> times = Arrays.asList(arrd
|
||||
.getAvailableTimes());
|
||||
|
||||
baseTimes.addAll(times);
|
||||
}
|
||||
}
|
||||
|
||||
availableTimes.addAll(baseTimes);
|
||||
Collections.sort(availableTimes);
|
||||
|
||||
return availableTimes.toArray(new DataTime[availableTimes.size()]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public class TimeSeriesDataManager extends HydroDataManager {
|
|||
|
||||
private static final String TIME_SERIES_DATA_QUERY = "select lid,obstime,lid,product_id from latestobsvalue";
|
||||
|
||||
private String INGEST_FILTER_QUERY = "select lid,pe,ts,extremum,dur from ingestfilter where lid=':lid' and ingest = 'T' order by pe asc,dur asc,ts asc,extremum asc";
|
||||
private String INGEST_FILTER_QUERY = "select lid,pe,ts,extremum,dur from ingestfilter where lid=':lid' and ingest = 'T' order by pe asc,ts_rank asc,dur asc,ts asc,extremum asc";
|
||||
|
||||
private String SHEF_PE_QUERY = "select name||' '|| eng_unit from shefpe where pe=':pe'";
|
||||
|
||||
|
|
|
@ -1165,7 +1165,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements
|
|||
/* loop through each trace and set the min and max values */
|
||||
for (int i = 0; i < gd.getTraces().size(); i++) {
|
||||
td = gd.getTraceData(i);
|
||||
if (td != null) {
|
||||
if (td != null && td.isTraceOn()) {
|
||||
TimeSeriesPoint[] points = null;
|
||||
if (zoomed) {
|
||||
points = td.getZoomedTsData();
|
||||
|
@ -2572,9 +2572,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements
|
|||
traceData.setName(name);
|
||||
traceData.setBasistime(basisTime);
|
||||
traceData.setProductTime(productTime);
|
||||
if (this.latestFcstFlag) {
|
||||
traceData.setTraceOn(false);
|
||||
}
|
||||
traceData.setTraceOn(!this.latestFcstFlag);
|
||||
} else {
|
||||
/* reached max fcst traces, break out of loop */
|
||||
break;
|
||||
|
@ -2802,4 +2800,5 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements
|
|||
public void setZoomed(boolean zoomed) {
|
||||
this.zoomed = zoomed;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -116,6 +116,8 @@ import com.raytheon.viz.hydrocommon.util.StnClassSyncUtil;
|
|||
* 08 Aug 2012 570 mpduff Fix a Ctrl-F in Station list causing IndexOutOfBounds error.
|
||||
* 08 Aug 2012 657 mpduff Fix error when selecting a TS while no selection has been made
|
||||
* in the Station List.
|
||||
* 27 Sep 2012 15302 wkwock TimeSeries start mode should depends on token timeseries_mode
|
||||
* despite start up in CAVE or standalone.
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -173,8 +175,8 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
|
||||
private static final String COLOR = "color";
|
||||
|
||||
private static final String[] TS_LIST = { "RG", "RP", "RZ", "FF", "FX",
|
||||
"FZ" };
|
||||
// private static final String[] TS_LIST = { "RG", "RP", "RZ", "FF", "FX",
|
||||
// "FZ" };
|
||||
|
||||
private final String[] TS_ORDER = { "R", "F", "P", "M", "C" };
|
||||
|
||||
|
@ -675,10 +677,6 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
openTimeSeriesDisplays = false;
|
||||
}
|
||||
|
||||
if (this.standaloneMode) {
|
||||
this.updateInterfaceForStandalone();
|
||||
}
|
||||
|
||||
AbstractVizResource<?,?> rsc = HydroDisplayManager.getInstance().getDisplayedResource();
|
||||
if (rsc instanceof MultiPointResource) {
|
||||
((MultiPointResource) rsc).setTs(this);
|
||||
|
@ -726,8 +724,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
try {
|
||||
populateStationList();
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Failed to populate station list", e);
|
||||
}
|
||||
|
||||
if (startMode.equals("GROUP") && (displayGraph == false)) {
|
||||
|
@ -1143,8 +1140,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
try {
|
||||
populateStationList();
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Failed to populate station list", e);
|
||||
}
|
||||
shell.setCursor(arrowCursor);
|
||||
}
|
||||
|
@ -1188,8 +1184,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
try {
|
||||
populateStationList();
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Failed to populate station list", e);
|
||||
}
|
||||
shell.setCursor(arrowCursor);
|
||||
}
|
||||
|
@ -1629,8 +1624,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
}
|
||||
in.close();
|
||||
} catch (IOException e) {
|
||||
// TODO add log statement about group_definition.cfg not found
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Failed to read group definition configuration.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1642,8 +1636,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
try {
|
||||
populateStationList();
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Failed to populate station list", e);
|
||||
}
|
||||
filteredLidList = new ArrayList<String>();
|
||||
topDataList.removeAll();
|
||||
|
@ -1668,8 +1661,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
try {
|
||||
populateStationList();
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Failed to populate station list", e);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
|
@ -1900,8 +1892,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
} else if (values[0].equalsIgnoreCase(FUTUREHOURS)) {
|
||||
groupInfo.setFutureHours(Integer.parseInt(values[1]));
|
||||
} else {
|
||||
// TODO log a message about invalid key/value pair
|
||||
System.err.println("Invalid key/value pair: " + s);
|
||||
statusHandler.warn("Invalid key/value pair: " + s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1950,8 +1941,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
graphData.setLatestfcstonly(false);
|
||||
}
|
||||
} else {
|
||||
// TODO log a message about invalid key/value pair
|
||||
System.err.println("Invalid key/value pair: " + s);
|
||||
statusHandler.warn("Invalid key/value pair: " + s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1986,8 +1976,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
graphData.setEndDate(endDate);
|
||||
|
||||
} else {
|
||||
// TODO log error here, invalid value
|
||||
System.err.println("Error in Group Definition Config file: " + line);
|
||||
statusHandler.warn("Error in Group Definition Config file: " + line);
|
||||
}
|
||||
|
||||
// select the first item in the list
|
||||
|
@ -2290,20 +2279,6 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the selected mode to group selection mode and display the groups
|
||||
* in the user-defined group configuration file.
|
||||
*/
|
||||
private void updateInterfaceForStandalone() {
|
||||
this.modeCbo.select(0);
|
||||
this.prevModeIdx = 0;
|
||||
stackLayout.topControl = groupGroup;
|
||||
stackComp.layout();
|
||||
stnLayoutDisplayed = false;
|
||||
|
||||
this.populateGroupListForStandalone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the user's selections.
|
||||
*
|
||||
|
@ -2518,8 +2493,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
try {
|
||||
populateStationList();
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Failed to populate station list", e);
|
||||
}
|
||||
setCurrentData();
|
||||
opened();
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.raytheon.viz.hydrocommon.HydroConstants;
|
|||
* Nov 4, 2008 1662 grichard Initial creation.
|
||||
* 11/19/2008 1662 grichard Updated loadPeRaw.
|
||||
* 11/24/2008 1662 grichard Added utility methods for raw precip.
|
||||
* 09/26/2012 15385 lbousaidi fixed duplicate entries in gage table.
|
||||
* </pre>
|
||||
*
|
||||
* @author grichard
|
||||
|
@ -189,7 +190,7 @@ public final class PrecipUtil {
|
|||
public static final String SUM_PC_REPORTS = "sum_pc_reports";
|
||||
|
||||
static {
|
||||
sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
}
|
||||
|
||||
|
@ -1553,10 +1554,18 @@ public final class PrecipUtil {
|
|||
Calendar pTm = null;
|
||||
pTm = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
pTm.setTime(query_begin_time);
|
||||
|
||||
if (pTm.get(Calendar.HOUR_OF_DAY) == 0) {
|
||||
pTm.add(Calendar.HOUR_OF_DAY, -1);
|
||||
pTm.add(Calendar.DAY_OF_MONTH, -1);
|
||||
}
|
||||
/* Need to convert the query begin and end times into dates. */
|
||||
String beginstr = sdf.format(pTm.getTime());
|
||||
|
||||
pTm.setTime(query_end_time);
|
||||
if (pTm.get(Calendar.HOUR_OF_DAY) == 0) {
|
||||
pTm.add(Calendar.DAY_OF_MONTH, -1);
|
||||
}
|
||||
|
||||
String endstr = sdf.format(pTm.getTime());
|
||||
|
||||
/* consider according to whether type-source specified. */
|
||||
/* load data which is not missing value (-9999.0) */
|
||||
|
@ -1572,9 +1581,6 @@ public final class PrecipUtil {
|
|||
where.append(" AND ");
|
||||
}
|
||||
|
||||
/* Need to convert the query begin and end times into dates. */
|
||||
String beginstr = sdf.format(pTm.getTime());
|
||||
String endstr = sdf.format(query_end_time);
|
||||
|
||||
where.append("id.obsdate between '");
|
||||
where.append(beginstr);
|
||||
|
|
|
@ -142,7 +142,12 @@ public class LocalizationEditorInput implements IFileEditorInput,
|
|||
*/
|
||||
@Override
|
||||
public String getToolTipText() {
|
||||
return localizationFile.getName();
|
||||
String tip = localizationFile.getName();
|
||||
if (localizationFile.isProtected()) {
|
||||
tip += " (Protected @ " + localizationFile.getProtectedLevel()
|
||||
+ ")";
|
||||
}
|
||||
return tip;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -99,4 +99,46 @@ public class FileTreeEntryData {
|
|||
return resource instanceof IFolder;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((path == null) ? 0 : path.hashCode());
|
||||
result = prime * result
|
||||
+ ((pathData == null) ? 0 : pathData.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
FileTreeEntryData other = (FileTreeEntryData) obj;
|
||||
if (path == null) {
|
||||
if (other.path != null)
|
||||
return false;
|
||||
} else if (!path.equals(other.path))
|
||||
return false;
|
||||
if (pathData == null) {
|
||||
if (other.pathData != null)
|
||||
return false;
|
||||
} else if (!pathData.equals(other.pathData))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,4 +62,40 @@ public class LocalizationFileEntryData extends FileTreeEntryData {
|
|||
return (IFile) super.getResource();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result
|
||||
+ ((file == null) ? 0 : file.getContext().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (!super.equals(obj))
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
LocalizationFileEntryData other = (LocalizationFileEntryData) obj;
|
||||
if (file == null) {
|
||||
if (other.file != null)
|
||||
return false;
|
||||
} else if (!file.getContext().equals(other.file.getContext()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -198,21 +198,6 @@ public class PathData {
|
|||
return application;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param element
|
||||
* the element to set
|
||||
*/
|
||||
public void setElement(IConfigurationElement element) {
|
||||
this.element = element;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the element
|
||||
*/
|
||||
public IConfigurationElement getElement() {
|
||||
return element;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recursive
|
||||
* the recursive to set
|
||||
|
|
|
@ -145,13 +145,15 @@ public class PlotModelDataRequestJob extends Job {
|
|||
// TODO need to determine if this type of plot is a combination or
|
||||
// not
|
||||
combineData(stationQuery);
|
||||
synchronized (this) {
|
||||
if (monitor.isCanceled()) {
|
||||
break;
|
||||
}
|
||||
|
||||
for (PlotInfo[] infos : stationQuery) {
|
||||
// schedule next work for other jobs
|
||||
// TODO investigate further, shouldn't be possible to get a null
|
||||
// TODO investigate further, shouldn't be possible to get a
|
||||
// null
|
||||
// here, but somehow we do
|
||||
if (infos[0].pdv != null) {
|
||||
switch (task.getRequestType()) {
|
||||
|
@ -168,6 +170,7 @@ public class PlotModelDataRequestJob extends Job {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // end of while !stationQueue.isEmpty()
|
||||
|
||||
|
@ -342,13 +345,8 @@ public class PlotModelDataRequestJob extends Job {
|
|||
&& generatorJob.isDone();
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
public synchronized void shutdown() {
|
||||
this.cancel();
|
||||
try {
|
||||
join();
|
||||
} catch (InterruptedException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
}
|
||||
this.generatorJob.shutdown();
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ import org.eclipse.core.runtime.jobs.Job;
|
|||
|
||||
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.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.data.IRenderedImageCallback;
|
||||
import com.raytheon.uf.viz.core.drawables.IImage;
|
||||
|
@ -119,10 +118,15 @@ public class PlotModelGeneratorJob extends Job {
|
|||
}
|
||||
}
|
||||
}
|
||||
synchronized (this) {
|
||||
if (monitor.isCanceled()) {
|
||||
if(image != null){
|
||||
image.dispose();
|
||||
}
|
||||
break;
|
||||
}
|
||||
caller.modelGenerated(infos, image);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Error creating plot", e);
|
||||
}
|
||||
|
@ -153,14 +157,9 @@ public class PlotModelGeneratorJob extends Job {
|
|||
return getState() != Job.RUNNING && getState() != Job.WAITING;
|
||||
}
|
||||
|
||||
protected void shutdown() {
|
||||
protected synchronized void shutdown() {
|
||||
cancel();
|
||||
taskQueue.clear();
|
||||
try {
|
||||
join();
|
||||
} catch (InterruptedException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
}
|
||||
clearImageCache();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,10 @@ import com.raytheon.uf.viz.core.rsc.ResourceList;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 7, 2009 jsanchez Initial creation
|
||||
*
|
||||
* ======================================
|
||||
* AWIPS2 DR Work
|
||||
* 20120913 1172 jkorman Added code to call postAddListeners when
|
||||
* creating sub-resources.
|
||||
* </pre>
|
||||
*
|
||||
* @author jsanchez
|
||||
|
@ -78,6 +81,18 @@ public class PlotBlendedResourceData extends AbstractResourceData implements
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a resource(s) from this resource data.
|
||||
*
|
||||
* @param loadProperties
|
||||
* The load properties
|
||||
* @param descriptor
|
||||
* The descriptor that the resource will be loaded onto
|
||||
* @throws VizException
|
||||
* if construction fails
|
||||
* @return The renderable capability. Will return null if any of the sub-resources
|
||||
* fail to construct.
|
||||
*/
|
||||
@Override
|
||||
public PlotBlendedResource construct(LoadProperties loadProperties,
|
||||
IDescriptor descriptor) throws VizException {
|
||||
|
@ -85,13 +100,16 @@ public class PlotBlendedResourceData extends AbstractResourceData implements
|
|||
|
||||
for (ResourcePair rp : resourceList) {
|
||||
if (!rp.instantiateResource(descriptor, false)) {
|
||||
// failure to create any sub resources is a failure to construct
|
||||
// failure to create any sub-resource is a failure to construct
|
||||
// the blended resource.
|
||||
return null;
|
||||
}
|
||||
this.addChangeListener((IResourceDataChanged) rp.getResource());
|
||||
}
|
||||
|
||||
// All sub-resources have been instantiated, add the listeners.
|
||||
for (ResourcePair rp : resourceList) {
|
||||
addChangeListener((IResourceDataChanged) rp.getResource());
|
||||
resourceList.firePostAddListeners(rp);
|
||||
}
|
||||
return rsc;
|
||||
}
|
||||
|
||||
|
|
|
@ -402,11 +402,11 @@ public class PlotResource2 extends
|
|||
|
||||
@Override
|
||||
protected void disposeInternal() {
|
||||
resourceData.getPlotInfoRetriever().cancel();
|
||||
progressiveDisclosure.shutdown();
|
||||
if (generator != null) {
|
||||
generator.shutdown();
|
||||
}
|
||||
resourceData.getPlotInfoRetriever().cancel();
|
||||
progressiveDisclosure.shutdown();
|
||||
clearImages();
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<programArgsLin>-consoleLog</programArgsLin>
|
||||
<vmArgs>-Xincgc -Xmx1280M -Dosgi.instance.area.readOnly=true
|
||||
-Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler
|
||||
-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:OnOutOfMemoryError="capture -t no -p $pid &"</vmArgs>
|
||||
-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:OnOutOfMemoryError="capture -t no -p $pid &" -Dlog4j.configuration=log4j-viz-core.xml</vmArgs>
|
||||
<vmArgsWin>-Dfile.encoding=UTF-8</vmArgsWin>
|
||||
</launcherArgs>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<programArgs>-data @user.home/caveData -user @user.home/caveData -clean -consoleLog -alertviz</programArgs>
|
||||
<vmArgs>-Xincgc -Xmx1024M -Dosgi.instance.area.readOnly=true
|
||||
-Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler
|
||||
-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false</vmArgs>
|
||||
-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dlog4j.configuration=log4j-viz-core.xml</vmArgs>
|
||||
<vmArgsWin>-Dfile.encoding=UTF-8</vmArgsWin>
|
||||
</launcherArgs>
|
||||
|
||||
|
@ -36,7 +36,6 @@
|
|||
</launcher>
|
||||
|
||||
<vm>
|
||||
<linux include="true">jdk1.6.0</linux>
|
||||
<windows include="true">jdk1.6.0</windows>
|
||||
</vm>
|
||||
|
||||
|
|
|
@ -27,15 +27,13 @@ import java.util.Collections;
|
|||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.radar.util.RadarInfoDict;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
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.viz.core.drawables.IRenderableDisplay;
|
||||
import com.raytheon.uf.viz.core.DescriptorMap;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||
import com.raytheon.uf.viz.core.rsc.DisplayType;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceType;
|
||||
|
@ -44,9 +42,11 @@ import com.raytheon.uf.viz.productbrowser.AbstractRequestableProductBrowserDataD
|
|||
import com.raytheon.uf.viz.productbrowser.ProductBrowserLabel;
|
||||
import com.raytheon.uf.viz.productbrowser.ProductBrowserPreference;
|
||||
import com.raytheon.viz.radar.rsc.RadarResourceData;
|
||||
import com.raytheon.viz.radar.ui.xy.RadarGraphDescriptor;
|
||||
import com.raytheon.viz.radar.ui.xy.RadarGraphDisplay;
|
||||
import com.raytheon.viz.radar.ui.xy.RadarXYDescriptor;
|
||||
import com.raytheon.viz.radar.ui.xy.RadarXYDisplay;
|
||||
import com.raytheon.viz.ui.editor.EditorInput;
|
||||
import com.raytheon.viz.ui.UiUtil;
|
||||
|
||||
/**
|
||||
* Product browser implementation for radar
|
||||
|
@ -174,40 +174,30 @@ public class RadarProductBrowserDataDefinition extends
|
|||
return new RadarResourceData();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.productbrowser.AbstractProductBrowserDataDefinition
|
||||
* #getEditor()
|
||||
*/
|
||||
@Override
|
||||
public void getEditor() {
|
||||
protected IDisplayPaneContainer openNewEditor(String editorId) {
|
||||
if (editorId.equals(DescriptorMap.getEditorId(RadarXYDescriptor.class
|
||||
.getName()))) {
|
||||
return UiUtil.createEditor(editorId, new RadarXYDisplay());
|
||||
} else if (editorId.equals(DescriptorMap
|
||||
.getEditorId(RadarGraphDescriptor.class.getName()))) {
|
||||
return UiUtil.createEditor(editorId, new RadarGraphDisplay());
|
||||
} else {
|
||||
return super.openNewEditor(editorId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IDescriptor> getDescriptorClass() {
|
||||
int prodCode = Integer.parseInt((resourceData).getMetadataMap()
|
||||
.get("productCode").getConstraintValue());
|
||||
String format = infoDict.getInfo(prodCode).getFormat();
|
||||
if ("XY".equals(format)) {
|
||||
String editor = "com.raytheon.viz.radar.ui.xy.RadarXYEditor";
|
||||
EditorInput cont = new EditorInput(
|
||||
(IRenderableDisplay) new RadarXYDisplay());
|
||||
try {
|
||||
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getActivePage().openEditor(cont, editor, true);
|
||||
} catch (PartInitException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Unable to open editor : " + editor, e);
|
||||
}
|
||||
return RadarXYDescriptor.class;
|
||||
} else if ("Graph".equals(format)) {
|
||||
String editor = "com.raytheon.viz.radar.ui.xy.RadarGraphEditor";
|
||||
EditorInput cont = new EditorInput(
|
||||
(IRenderableDisplay) new RadarGraphDisplay());
|
||||
try {
|
||||
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getActivePage().openEditor(cont, editor, true);
|
||||
} catch (PartInitException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Unable to open editor : " + editor, e);
|
||||
}
|
||||
return RadarGraphDescriptor.class;
|
||||
} else {
|
||||
return super.getDescriptorClass();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,11 +102,13 @@ public class RadarGraphDisplay extends AbstractNonMapDisplay {
|
|||
GraphProperties graphProps) throws VizException {
|
||||
// Plot the resource data on the graph
|
||||
for (ResourcePair rp : getDescriptor().getResourceList()) {
|
||||
if (rp.getResource() != null) {
|
||||
graphProps = (GraphProperties) calcPaintDataTime(graphProps,
|
||||
rp.getResource());
|
||||
rp.getResource().paint(target, graphProps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeGraph(RadarGraphResource aRsc,
|
||||
GraphProperties graphProps) {
|
||||
|
|
|
@ -80,11 +80,13 @@ public class RadarXYDisplay extends AbstractNonMapDisplay {
|
|||
|
||||
// Plot the resource data on the graph
|
||||
for (ResourcePair rp : getDescriptor().getResourceList()) {
|
||||
if (rp.getResource() != null) {
|
||||
graphProps = (GraphProperties) calcPaintDataTime(graphProps,
|
||||
rp.getResource());
|
||||
rp.getResource().paint(target, graphProps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FormData getInsetMapLocation() {
|
||||
|
|
|
@ -42,7 +42,8 @@ import com.raytheon.viz.texteditor.print.PrintDisplay;
|
|||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* This is a dialog to display the desired products from the current alarm
|
||||
* queue.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -58,6 +59,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Nov 15, 2011 11616 rferrel Change font to fixed width; and text now
|
||||
* uses the font.
|
||||
* Feb 03, 2012 14317 mhuang Make alarm display window wider
|
||||
* Sep 6, 2012 13365 rferrel Accumulate and Display fix.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -67,6 +69,15 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
|
||||
public class AlarmDisplayWindow extends CaveSWTDialog {
|
||||
|
||||
/**
|
||||
* State to place the accumulate into after adding products in the preopen.
|
||||
*/
|
||||
public static enum ACCUMULATE_STATE {
|
||||
UNCHANGE, TRUE, FALSE
|
||||
}
|
||||
|
||||
private ACCUMULATE_STATE accum_state;
|
||||
|
||||
private Font font;
|
||||
|
||||
private StyledText text;
|
||||
|
@ -75,6 +86,8 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
|||
|
||||
private static boolean accumulate;
|
||||
|
||||
private Button accumButton;
|
||||
|
||||
private Button printWindow;
|
||||
|
||||
private Button printBuffer;
|
||||
|
@ -85,10 +98,12 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
|||
|
||||
/**
|
||||
* @param parentShell
|
||||
* @param style
|
||||
* @param prodList
|
||||
* @param accum_state
|
||||
*/
|
||||
protected AlarmDisplayWindow(Shell parentShell,
|
||||
java.util.List<StdTextProduct> prodList) {
|
||||
java.util.List<StdTextProduct> prodList,
|
||||
ACCUMULATE_STATE accum_state) {
|
||||
super(parentShell, SWT.RESIZE, CAVE.PERSPECTIVE_INDEPENDENT
|
||||
| CAVE.INDEPENDENT_SHELL);
|
||||
setText("Alarm Display Window");
|
||||
|
@ -96,6 +111,7 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
|||
if (prods == null) {
|
||||
prods = new ArrayList<StdTextProduct>();
|
||||
}
|
||||
this.accum_state = accum_state;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -132,7 +148,6 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
|||
private void initializeComponents() {
|
||||
createMenus();
|
||||
createTextArea();
|
||||
populateText();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,16 +181,9 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
|||
final Button clearButton = new Button(buttonMenuComp, SWT.PUSH);
|
||||
clearButton.setText("Clear");
|
||||
|
||||
final Button accumButton = new Button(buttonMenuComp, SWT.CHECK);
|
||||
accumButton = new Button(buttonMenuComp, SWT.CHECK);
|
||||
accumButton.setText("Accumulate");
|
||||
accumButton.setSelection(accumulate);
|
||||
if (accumulate) {
|
||||
accumButton.setBackground(Display.getCurrent().getSystemColor(
|
||||
SWT.COLOR_YELLOW));
|
||||
} else {
|
||||
accumButton.setBackground(Display.getCurrent().getSystemColor(
|
||||
SWT.COLOR_WIDGET_BACKGROUND));
|
||||
}
|
||||
setAccumulate(accumulate);
|
||||
|
||||
printWindow.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
|
@ -215,14 +223,7 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
|||
accumButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
accumulate = !accumulate;
|
||||
if (accumulate) {
|
||||
accumButton.setBackground(Display.getCurrent()
|
||||
.getSystemColor(SWT.COLOR_YELLOW));
|
||||
} else {
|
||||
accumButton.setBackground(Display.getCurrent()
|
||||
.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
|
||||
}
|
||||
setAccumulate(!accumulate);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -236,22 +237,28 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
private void populateText() {
|
||||
if (prods != null) {
|
||||
if (!prods.isEmpty()) {
|
||||
for (int i = 0; i < prods.size(); i++) {
|
||||
addText(prods.get(i).getProduct());
|
||||
}
|
||||
if (prods == null || prods.isEmpty()) {
|
||||
text.setText(actualText);
|
||||
} else {
|
||||
addText(actualText);
|
||||
}
|
||||
if (accumulate) {
|
||||
text.setText(actualText);
|
||||
} else {
|
||||
addText(actualText);
|
||||
text.setText("");
|
||||
}
|
||||
boolean saveAccumulate = accumulate;
|
||||
|
||||
// Make sure all products in the list are displayed then restore
|
||||
// accumulate.
|
||||
accumulate = true;
|
||||
for (StdTextProduct prod : prods) {
|
||||
addText(prod.getProduct());
|
||||
}
|
||||
accumulate = saveAccumulate;
|
||||
}
|
||||
}
|
||||
|
||||
public void setProds(java.util.List<StdTextProduct> prodList) {
|
||||
prods = prodList;
|
||||
text.setText(actualText);
|
||||
populateText();
|
||||
}
|
||||
|
||||
|
@ -269,20 +276,39 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the accumulate to the desired state and if active updates the
|
||||
* display.
|
||||
*
|
||||
* @param accumulate
|
||||
* the accumulate to set
|
||||
*/
|
||||
public void setAccumulate(boolean accumulate) {
|
||||
AlarmDisplayWindow.accumulate = accumulate;
|
||||
if (accumButton != null && !accumButton.isDisposed()) {
|
||||
accumButton.setSelection(accumulate);
|
||||
if (accumulate) {
|
||||
accumButton.setBackground(Display.getCurrent().getSystemColor(
|
||||
SWT.COLOR_YELLOW));
|
||||
} else {
|
||||
accumButton.setBackground(Display.getCurrent().getSystemColor(
|
||||
SWT.COLOR_WIDGET_BACKGROUND));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// TODO take this method out
|
||||
AlarmDisplayWindow curr = new AlarmDisplayWindow(new Shell(), null);
|
||||
curr.open();
|
||||
@Override
|
||||
protected void preOpened() {
|
||||
super.preOpened();
|
||||
populateText();
|
||||
switch (accum_state) {
|
||||
case TRUE:
|
||||
setAccumulate(true);
|
||||
break;
|
||||
case FALSE:
|
||||
setAccumulate(false);
|
||||
break;
|
||||
}
|
||||
accum_state = ACCUMULATE_STATE.UNCHANGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -53,6 +53,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.services.textdbsrv.IQueryTransport;
|
||||
import com.raytheon.viz.core.mode.CAVEMode;
|
||||
import com.raytheon.viz.texteditor.alarmalert.dialogs.AlarmDisplayWindow.ACCUMULATE_STATE;
|
||||
import com.raytheon.viz.texteditor.alarmalert.util.AlarmAlertFunctions;
|
||||
import com.raytheon.viz.texteditor.alarmalert.util.AlarmAlertLists;
|
||||
import com.raytheon.viz.texteditor.alarmalert.util.CurrentAlarmEvent;
|
||||
|
@ -90,8 +91,9 @@ import com.raytheon.viz.ui.dialogs.ModeListener;
|
|||
* May 23, 2012 14952 rferrel Now use refTime/createtime to display
|
||||
* selected product
|
||||
* Aug 28, 2012 14795 mgamazaychikov Fixed problem with "Unhadled event loop"
|
||||
* exception associated with closing
|
||||
* "Current Alarm Queue" GUI
|
||||
* exception associated with closing "Current
|
||||
* Alarm Queue" GUI
|
||||
* Sep 6, 2012 13365 rferrel Accumulate and Display fix.
|
||||
* </pre>
|
||||
*
|
||||
* @author mnash
|
||||
|
@ -383,7 +385,8 @@ public class CurrentAlarmQueue extends CaveSWTDialog implements
|
|||
}
|
||||
|
||||
if (alarmDisplayDlg == null) {
|
||||
alarmDisplayDlg = new AlarmDisplayWindow(shell, prods);
|
||||
alarmDisplayDlg = new AlarmDisplayWindow(shell, prods,
|
||||
ACCUMULATE_STATE.UNCHANGE);
|
||||
alarmDisplayDlg.open();
|
||||
if (list != null && !list.isDisposed() && list.getItemCount() == 0) {
|
||||
close();
|
||||
|
@ -391,7 +394,8 @@ public class CurrentAlarmQueue extends CaveSWTDialog implements
|
|||
} else {
|
||||
if (alarmDisplayDlg.getShell() == null
|
||||
|| alarmDisplayDlg.getShell().isDisposed()) {
|
||||
alarmDisplayDlg = new AlarmDisplayWindow(shell, prods);
|
||||
alarmDisplayDlg = new AlarmDisplayWindow(shell, prods,
|
||||
ACCUMULATE_STATE.UNCHANGE);
|
||||
alarmDisplayDlg.open();
|
||||
if (list != null && !list.isDisposed()
|
||||
&& list.getItemCount() == 0) {
|
||||
|
@ -445,36 +449,25 @@ public class CurrentAlarmQueue extends CaveSWTDialog implements
|
|||
list.removeAll();
|
||||
AlarmAlertFunctions.getAlarmalertbell().close();
|
||||
}
|
||||
if (alarmDisplayDlg == null) {
|
||||
|
||||
java.util.List<StdTextProduct> prods = new ArrayList<StdTextProduct>();
|
||||
if (command.length > 0) {
|
||||
for (int i = 0; i < command.length; i++) {
|
||||
prods.addAll(produceTextProduct(command[i]));
|
||||
}
|
||||
}
|
||||
alarmDisplayDlg = new AlarmDisplayWindow(shell, prods);
|
||||
alarmDisplayDlg.setAccumulate(true);
|
||||
|
||||
if (alarmDisplayDlg == null) {
|
||||
alarmDisplayDlg = new AlarmDisplayWindow(shell, prods,
|
||||
ACCUMULATE_STATE.TRUE);
|
||||
alarmDisplayDlg.open();
|
||||
} else {
|
||||
if (alarmDisplayDlg.getShell() == null
|
||||
|| alarmDisplayDlg.getShell().isDisposed()) {
|
||||
java.util.List<StdTextProduct> prods = new ArrayList<StdTextProduct>();
|
||||
if (command.length > 0) {
|
||||
for (int i = 0; i < command.length; i++) {
|
||||
prods.addAll(produceTextProduct(command[i]));
|
||||
}
|
||||
}
|
||||
alarmDisplayDlg = new AlarmDisplayWindow(shell, prods);
|
||||
alarmDisplayDlg.setAccumulate(true);
|
||||
alarmDisplayDlg = new AlarmDisplayWindow(shell, prods,
|
||||
ACCUMULATE_STATE.TRUE);
|
||||
alarmDisplayDlg.open();
|
||||
} else {
|
||||
alarmDisplayDlg.setAccumulate(true);
|
||||
java.util.List<StdTextProduct> prods = new ArrayList<StdTextProduct>();
|
||||
if (command.length > 0) {
|
||||
for (int i = 0; i < command.length; i++) {
|
||||
prods.addAll(produceTextProduct(command[i]));
|
||||
}
|
||||
}
|
||||
alarmDisplayDlg.setProds(prods);
|
||||
alarmDisplayDlg.setAccumulate(true);
|
||||
alarmDisplayDlg.setDialogFocus();
|
||||
|
|
|
@ -284,6 +284,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
|
|||
* 25JUL2012 14459 rferrel Strip WMH headers when getting all METARs.
|
||||
* 13AUG2012 14613 M.Gamazaychikov Ensured the WMO and MND header times are the same.
|
||||
* 20AUG2012 15340 D.Friedman Use callbacks for stop sign dialog. Prevent NOR in header.
|
||||
* 10SEP2012 15334 rferrel No longer wrap text pasted to an empty text field.
|
||||
* 10Sep2012 15103 M.Gamazaychikov DR15103 -do not clear AFOS command from the text box
|
||||
* when obs are updated and refactored executeCommand
|
||||
* 10SEP2012 15401 D.Friedman Fix QC problem caused by DR 15340.
|
||||
|
@ -4116,6 +4117,13 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
private void pasteText() {
|
||||
// AWIPS I just does the pasted in both overwrite and insert mode.
|
||||
try {
|
||||
// When pasting to empty editor assume text is properly formatted
|
||||
// and does not need wrapping.
|
||||
boolean doWrap = true;
|
||||
if (textEditor.getText().trim().length() == 0) {
|
||||
doWrap = false;
|
||||
textEditor.setText("");
|
||||
}
|
||||
int start = -1;
|
||||
if (textEditor.getSelectionCount() == 0) {
|
||||
start = textEditor.getCaretOffset();
|
||||
|
@ -4123,7 +4131,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
start = textEditor.getSelectionRange().x;
|
||||
}
|
||||
textEditor.paste();
|
||||
if (doWrap) {
|
||||
rewrap(start, textEditor.getCaretOffset());
|
||||
}
|
||||
} catch (IllegalArgumentException ex) {
|
||||
// Ignore
|
||||
}
|
||||
|
@ -4368,7 +4378,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
final CAVEMode mode = CAVEMode.getMode();
|
||||
StdTextProduct prod = getStdTextProduct();
|
||||
String afosId = prod.getCccid() + prod.getNnnid() + prod.getXxxid();
|
||||
final String title = QualityControl.getProductWarningType(prod.getNnnid());
|
||||
final String title = QualityControl.getProductWarningType(prod
|
||||
.getNnnid());
|
||||
final StringBuilder productMessage = new StringBuilder();
|
||||
|
||||
final StringBuilder modeMessage = new StringBuilder();
|
||||
|
@ -4393,7 +4404,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
@Override
|
||||
public void dialogDismissed(Object dialogResult) {
|
||||
if (Boolean.TRUE.equals(dialogResult))
|
||||
finishSendProduct1(resend, title, mode, productMessage, modeMessage);
|
||||
finishSendProduct1(resend, title, mode,
|
||||
productMessage, modeMessage);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -4403,7 +4415,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
finishSendProduct1(resend, title, mode, productMessage, modeMessage);
|
||||
}
|
||||
|
||||
private void finishSendProduct1(final boolean resend, String title, CAVEMode mode, StringBuilder productMessage, StringBuilder modeMessage) {
|
||||
private void finishSendProduct1(final boolean resend, String title,
|
||||
CAVEMode mode, StringBuilder productMessage,
|
||||
StringBuilder modeMessage) {
|
||||
Pattern p = Pattern.compile(".\\%[s].");
|
||||
Matcher m = p.matcher(STORED_SENT_MSG);
|
||||
|
||||
|
@ -4468,7 +4482,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
token);
|
||||
OUPRequest req = new OUPRequest();
|
||||
OfficialUserProduct oup = new OfficialUserProduct();
|
||||
StdTextProduct prod = getStdTextProduct(); // TODO: makes me nervous...
|
||||
StdTextProduct prod = getStdTextProduct(); // TODO: makes me
|
||||
// nervous...
|
||||
String awipsWanPil = prod.getSite() + prod.getNnnid()
|
||||
+ prod.getXxxid();
|
||||
String awipsID = prod.getNnnid() + prod.getXxxid();
|
||||
|
@ -4623,9 +4638,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
boolean successful = false;
|
||||
|
||||
/*
|
||||
* DR14613 - string currectDate is derived from Date now
|
||||
* ensuring the same time in WMO heading and in the
|
||||
* MND heading.
|
||||
* DR14613 - string currectDate is derived from Date now ensuring the
|
||||
* same time in WMO heading and in the MND heading.
|
||||
*/
|
||||
Date now = SimulatedTime.getSystemTime().getTime();
|
||||
String currentDate = getCurrentDate(now);
|
||||
|
@ -4669,8 +4683,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
if (warnGenFlag) {
|
||||
/*
|
||||
* DR14613 - string currectDate is derived from Date now
|
||||
* ensuring the same time in WMO heading and in the
|
||||
* MND heading.
|
||||
* ensuring the same time in WMO heading and in the MND
|
||||
* heading.
|
||||
*/
|
||||
productText = updateVtecTimes(productText, vtecObj, now);
|
||||
productText = updateHeaderTimes(productText, now);
|
||||
|
@ -5190,7 +5204,6 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
return product;
|
||||
}
|
||||
|
||||
|
||||
public void setCurrentWmoId(String wmoId) {
|
||||
TextDisplayModel.getInstance().setWmoId(token, wmoId);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
|||
import com.raytheon.viz.texteditor.TextWarningConstants;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* A grouping of static methods to obtain site id and to query for site
|
||||
* information in various, seldom changed, tables.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -37,6 +38,7 @@ import com.raytheon.viz.texteditor.TextWarningConstants;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 21, 2009 bwoodle Initial creation
|
||||
* Sep 09, 2012 14668 rferrel Change default WMO ID to 'blank'.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -103,8 +105,7 @@ public class SiteAbbreviationUtil {
|
|||
public static String getTtaaii(String afosId) {
|
||||
String query = "SELECT wmottaaii FROM afos_to_awips WHERE afosid = '"
|
||||
+ afosId + "';";
|
||||
// Keep the same default we previously had.
|
||||
String rval = "SAUS43";
|
||||
String rval = "-";
|
||||
|
||||
try {
|
||||
List<Object[]> results = DirectDbQuery.executeQuery(query,
|
||||
|
|
|
@ -208,6 +208,11 @@
|
|||
<handler
|
||||
class="com.raytheon.viz.ui.actions.ImagePropertiesAction"
|
||||
commandId="com.raytheon.viz.ui.imageProperties">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.ui.personalities.awips.ClosePerspectiveHandler"
|
||||
|
|
|
@ -70,22 +70,47 @@
|
|||
<handler
|
||||
class="com.raytheon.viz.ui.tools.looping.CombinedFrameTool"
|
||||
commandId="com.raytheon.viz.ui.tools.looping.frameTool">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.ui.tools.looping.LoopTool"
|
||||
commandId="com.raytheon.viz.ui.tools.looping.loop">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.ui.tools.looping.LoopPropertiesTool"
|
||||
commandId="com.raytheon.viz.ui.tools.looping.loopProperties">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.ui.tools.looping.FasterLoopSpeedTool"
|
||||
commandId="com.raytheon.viz.ui.tools.looping.fasterLoop">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.ui.tools.looping.SlowerLoopSpeedTool"
|
||||
commandId="com.raytheon.viz.ui.tools.looping.slowerLoop">
|
||||
<activeWhen>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
</extension>
|
||||
|
||||
|
|
|
@ -50,7 +50,9 @@ public class FasterLoopSpeedTool extends AbstractTool {
|
|||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
super.execute(arg0);
|
||||
if (editor != null) {
|
||||
PageUpDownKey.handlePageUp(editor);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,9 +58,9 @@ public class LoopPropertiesTool extends AbstractTool {
|
|||
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
if (editor != null) {
|
||||
LoopPropertiesDialog.openDialog(shell, this.editor);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,9 @@ public class SlowerLoopSpeedTool extends AbstractTool {
|
|||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
super.execute(arg0);
|
||||
if (editor != null) {
|
||||
PageUpDownKey.handlePageDown(editor);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -242,12 +242,21 @@ public class LoadSerializedXml extends AbstractHandler {
|
|||
final boolean multiEditor = container instanceof IMultiPaneEditor;
|
||||
|
||||
if (multiEditor) {
|
||||
while (container.getDisplayPanes().length > b.getDisplays().length) {
|
||||
((IMultiPaneEditor) container)
|
||||
.removePane(container.getDisplayPanes()[container
|
||||
if (container.getDisplayPanes().length > b.getDisplays().length) {
|
||||
VizApp.runSync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
while (container.getDisplayPanes().length > b
|
||||
.getDisplays().length) {
|
||||
((IMultiPaneEditor) container).removePane(container
|
||||
.getDisplayPanes()[container
|
||||
.getDisplayPanes().length - 1]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
List<AbstractRenderableDisplay> orderedDisplays = Arrays.asList(b
|
||||
.getDisplays());
|
||||
IDescriptor firstDesc = orderedDisplays.get(0).getDescriptor();
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
package com.raytheon.viz.ui.dialogs;
|
||||
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
|
@ -47,6 +49,9 @@ import com.raytheon.viz.ui.perspectives.VizPerspectiveListener;
|
|||
* ---------- ---------- ----------- --------------------------
|
||||
* 12/20/07 561 Dan Fitch Initial Creation.
|
||||
* 04/22/08 1088 chammack Added dialog event propagation fix
|
||||
* 09/13/12 1165 lvenable Update for the initial process
|
||||
* of removing the dialog blocking capability.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author Dan Fitch
|
||||
|
@ -55,10 +60,18 @@ import com.raytheon.viz.ui.perspectives.VizPerspectiveListener;
|
|||
public class CaveJFACEDialog extends Dialog implements
|
||||
IPerspectiveSpecificDialog {
|
||||
|
||||
/** Dialog last location on the screen. */
|
||||
protected Point lastLocation;
|
||||
|
||||
/** Flag indicating of the dialog was visible. */
|
||||
private boolean wasVisible = true;
|
||||
|
||||
/** Callback called when the dialog is disposed. */
|
||||
private ICloseCallback closeCallback = null;
|
||||
|
||||
/** Flag indicating if the dialog was blocked when opened. */
|
||||
private boolean blockedOnOpen = false;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentShell
|
||||
|
@ -111,6 +124,8 @@ public class CaveJFACEDialog extends Dialog implements
|
|||
if (mgr != null) {
|
||||
mgr.removePespectiveDialog(CaveJFACEDialog.this);
|
||||
}
|
||||
|
||||
callCloseCallback();
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -165,4 +180,71 @@ public class CaveJFACEDialog extends Dialog implements
|
|||
shell.setLocation(lastLocation);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call the callback method as this dialog has been disposed.
|
||||
*/
|
||||
private void callCloseCallback() {
|
||||
if (closeCallback != null) {
|
||||
closeCallback.dialogClosed(new Integer(getReturnCode()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the dialog has been opened yet or not
|
||||
*
|
||||
* @return True if the dialog was opened, false otherwise.
|
||||
*/
|
||||
public final boolean isOpen() {
|
||||
return (getShell() != null && !getShell().isDisposed());
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a callback to the dialog. This callback will be called when the
|
||||
* dialog is disposed.
|
||||
*
|
||||
* @param callback
|
||||
* Callback to be called when the dialog is disposed.
|
||||
*/
|
||||
public void setCloseCallback(ICloseCallback callback) {
|
||||
|
||||
/*
|
||||
* Since JFACE allows you to call setBlockOnOpen() after the
|
||||
* constructor, if the open() method is called before setBlockOnOpen
|
||||
* then the block is ignored. Here we are checking if the block was set
|
||||
* and if the dialog is already open because that makes the callback
|
||||
* pointless.
|
||||
*/
|
||||
if (blockedOnOpen && isOpen()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("The method setBlockOnOpen() was called and set to true. The callback method ");
|
||||
sb.append("will not run correctly as the dialog has been opened and blocked before this ");
|
||||
sb.append("method was called.");
|
||||
throw new RejectedExecutionException(sb.toString());
|
||||
}
|
||||
|
||||
this.closeCallback = callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method overrides the existing setBlockOnOpen() method. This will
|
||||
* eventually be a catch method that will prevent blocking the dialog on
|
||||
* open. At this time it serves as a placeholder for upcoming work.
|
||||
*
|
||||
* @param blockOnOpen
|
||||
* Flag indicating if the dialog should block when opened.
|
||||
*/
|
||||
public void setBlockOnOpen(boolean blockOnOpen) {
|
||||
/*
|
||||
* If the dialog is already opened then just return because setting the
|
||||
* block won't work. In JFACE the setBlockOnOpen needs to be set before
|
||||
* the open() call, otherwise it is ignored.
|
||||
*/
|
||||
if (isOpen()) {
|
||||
return;
|
||||
}
|
||||
|
||||
super.setBlockOnOpen(blockOnOpen);
|
||||
blockedOnOpen = blockOnOpen;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.viz.ui.dialogs;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
|
@ -49,6 +50,8 @@ import org.eclipse.swt.widgets.Shell;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 2, 2010 mschenke Initial creation
|
||||
* Sep 12, 2012 #1165 lvenable Update for the initial process
|
||||
* of removing the dialog blocking capability.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -113,20 +116,29 @@ public abstract class CaveSWTDialogBase extends Dialog {
|
|||
}
|
||||
}
|
||||
|
||||
/** Style used to determine how the dialog will function. */
|
||||
private int caveStyle = CAVE.NONE;
|
||||
|
||||
/** Display reference. */
|
||||
private Display display;
|
||||
|
||||
/** Dialog last location on the screen. */
|
||||
protected Point lastLocation;
|
||||
|
||||
/** Flag indicating of the dialog was visible. */
|
||||
protected boolean wasVisible = true;
|
||||
|
||||
/** Return value. */
|
||||
private Object returnValue;
|
||||
|
||||
/** Shell reference. */
|
||||
protected Shell shell;
|
||||
|
||||
private List<ListenerPair> listenersToAdd;
|
||||
|
||||
/** Callback called when the dialog is disposed. */
|
||||
private ICloseCallback closeCallback = null;
|
||||
|
||||
/**
|
||||
* Construct default cave dialog
|
||||
*
|
||||
|
@ -220,6 +232,7 @@ public abstract class CaveSWTDialogBase extends Dialog {
|
|||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
disposed();
|
||||
callCloseCallback();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -282,6 +295,16 @@ public abstract class CaveSWTDialogBase extends Dialog {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Call the callback method as this dialog has been disposed. This action is
|
||||
* in a separate method since the disposed method can be overridden.
|
||||
*/
|
||||
private void callCloseCallback() {
|
||||
if (closeCallback != null) {
|
||||
closeCallback.dialogClosed(returnValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the layout for the shell. Defaults to a GridLayout with one
|
||||
* column and margins set to 3
|
||||
|
@ -405,10 +428,25 @@ public abstract class CaveSWTDialogBase extends Dialog {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the caveStyle contains a specified attribute.
|
||||
*
|
||||
* @param attribute
|
||||
* Attribute to check for.
|
||||
* @return True if caveStyle contains the attribute. False if it doesn't.
|
||||
*/
|
||||
protected boolean hasAttribute(int attribute) {
|
||||
return (caveStyle & attribute) == attribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the caveStyle does not contain a specified attribute.
|
||||
*
|
||||
* @param attribute
|
||||
* Attribute to check for.
|
||||
* @return True if caveStyle does not contain the attribute. False if it
|
||||
* does.
|
||||
*/
|
||||
protected boolean doesNotHaveAttribute(int attribute) {
|
||||
return (caveStyle & attribute) != attribute;
|
||||
}
|
||||
|
@ -443,4 +481,29 @@ public abstract class CaveSWTDialogBase extends Dialog {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a callback to the dialog. This callback will be called when the
|
||||
* dialog is disposed. Also, the caveStyle is updated to include
|
||||
* DO_NOT_BLOCK.
|
||||
*
|
||||
* @param callback
|
||||
* Callback to be called when the dialog is disposed.
|
||||
* @throws Throws
|
||||
* a RejectedExecutionException with a message indicating that
|
||||
* this method needs to be called before the open method.
|
||||
*/
|
||||
public void setCloseCallback(ICloseCallback callback) {
|
||||
|
||||
if (isOpen()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("The method addCloseCallback() needs to be called before the open(). ");
|
||||
sb.append("This is due to addCloseCallback setting the caveStyle to DO_NOT_BLOCK");
|
||||
throw new RejectedExecutionException(sb.toString());
|
||||
}
|
||||
|
||||
// Set the DO_NOT_BLOCK on the cave style
|
||||
this.caveStyle = caveStyle | CAVE.DO_NOT_BLOCK;
|
||||
this.closeCallback = callback;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.ui.dialogs;
|
||||
|
||||
/**
|
||||
*
|
||||
* Callback interface used when a dialog using CaveSWTDialog is disposed.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 11, 2012 #1165 lvenable Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface ICloseCallback {
|
||||
/**
|
||||
* Method called when a dialog is closed.
|
||||
*
|
||||
* @param returnValue
|
||||
* Return value set in a dialog.
|
||||
*/
|
||||
public void dialogClosed(Object returnValue);
|
||||
}
|
|
@ -77,6 +77,8 @@ public abstract class AbstractWorkbenchPartContextActivator implements
|
|||
private void activate(IWorkbenchPartReference partRef) {
|
||||
if (isPerspectivePart(partRef)) {
|
||||
contextManager.activateContexts(this);
|
||||
} else {
|
||||
contextManager.deactivateContexts(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -750,6 +750,7 @@
|
|||
<contribute xsi:type="menuItem" menuText="Thom 5" key="Thom5" indentText="false" />
|
||||
<contribute xsi:type="menuItem" menuText="Thom 5a" key="Thom5a" indentText="false" />
|
||||
<contribute xsi:type="menuItem" menuText="Thom 6" key="Thom6" indentText="false" />
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="menuItem" menuText="Vertical Totals" key="vTOT" indentText="false" />
|
||||
<contribute xsi:type="menuItem" menuText="Cross Totals" key="cTOT" indentText="false" />
|
||||
|
|
|
@ -15,6 +15,7 @@ import com.raytheon.uf.common.geospatial.SpatialQueryResult;
|
|||
import com.raytheon.viz.warngen.PreferenceUtil;
|
||||
import com.raytheon.viz.warngen.gis.ClosestPoint;
|
||||
import com.raytheon.viz.warngen.gis.GisUtil;
|
||||
import com.raytheon.viz.warngen.gis.GisUtil.Direction;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
|
@ -94,9 +95,33 @@ public class DbAreaSourceDataAdaptor extends AbstractDbSourceDataAdaptor {
|
|||
partOfArea = GisUtil.asStringList(GisUtil.calculatePortion(geom,
|
||||
intersection, gc, ""));
|
||||
|
||||
String suppressedDirections = String.valueOf(attributes
|
||||
.get(suppressedDirectionsField));
|
||||
partOfArea.remove(suppressedDirections);
|
||||
if (attributes.get(suppressedDirectionsField) != null) {
|
||||
String suppressedDirections = String.valueOf(
|
||||
attributes.get(suppressedDirectionsField))
|
||||
.toLowerCase();
|
||||
// supdirs can be 'nse', for example
|
||||
// TODO create an enum constructor for Directions
|
||||
for (int i = 0; i < suppressedDirections.length(); i++) {
|
||||
switch (suppressedDirections.charAt(i)) {
|
||||
case 'n':
|
||||
partOfArea.remove(Direction.NORTH.toString());
|
||||
break;
|
||||
case 's':
|
||||
partOfArea.remove(Direction.SOUTH.toString());
|
||||
break;
|
||||
case 'e':
|
||||
partOfArea.remove(Direction.EAST.toString());
|
||||
break;
|
||||
case 'w':
|
||||
partOfArea.remove(Direction.WEST.toString());
|
||||
break;
|
||||
case 'c':
|
||||
partOfArea.remove(Direction.CENTRAL.toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return partOfArea;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue