Merge branch 'master_13.5.1' (13.5.1-15) into omaha_13.5.1

Conflicts:
	cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/FollowupData.java
	cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java
	cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java
	edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPBasinData.java

Former-commit-id: 2608dfe1d8 [formerly c61afa1bfa] [formerly ee6b9eb11a [formerly 87a1f8f44cbdfb9006eb5e222ae2c220c6a324b3]]
Former-commit-id: ee6b9eb11a
Former-commit-id: 58a4aaa080
This commit is contained in:
Richard Peter 2013-08-14 14:29:55 -05:00
commit 3f65eaf74b
8 changed files with 80 additions and 36 deletions

View file

@ -39,6 +39,10 @@ import org.eclipse.swt.widgets.Event;
*/
public interface IInputHandler {
/*
* Note that these values are not only used for priority. They are also used
* to determine which event handlers are swapped in SideView.swapPanes.
*/
public static enum InputPriority {
LOWEST(0), SYSTEM_RESOURCE_LOW(1), RESOURCE(3), SYSTEM_RESOURCE(4), PART(5), PERSPECTIVE(6),
WINDOW(7);

View file

@ -501,9 +501,15 @@ public class D2DLegendResource extends
legendFont = target.initializeFont(D2DLegendResource.class.getName());
IDisplayPaneContainer rc = getResourceContainer();
if (rc != null) {
/*
* The legendHandler needs to have higher priority that the
* changeModeHandler. The following assumes that the legendHandler,
* by being added later, runs before the changeModelHandler. See
* InputManager.handeMouseXxx.
*/
rc.registerMouseHandler(changeModeHandler, InputPriority.SYSTEM_RESOURCE_LOW);
rc.registerMouseHandler(legendHandler,
InputPriority.SYSTEM_RESOURCE_LOW);
rc.registerMouseHandler(changeModeHandler, InputPriority.RESOURCE);
}
}

View file

@ -73,6 +73,7 @@ import com.raytheon.uf.viz.d2d.core.D2DLoadProperties;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 10, 2009 chammack Initial creation
* Aug 9, 2013 DR 16448 D. Friedman Validate time match basis in redoTimeMatching
*
* </pre>
*
@ -191,6 +192,8 @@ public class D2DTimeMatcher extends AbstractTimeMatcher {
@Override
public void redoTimeMatching(IDescriptor descriptor) throws VizException {
synchronized (this) {
if (timeMatchBasis != null && ! validateTimeMatchBasis(descriptor.getResourceList()))
timeMatchBasis = null;
if (timeMatchBasis != null) {
IDescriptor tmDescriptor = timeMatchBasis.getDescriptor();
if (tmDescriptor != null && tmDescriptor != descriptor) {
@ -990,4 +993,22 @@ public class D2DTimeMatcher extends AbstractTimeMatcher {
configFactory.resetMultiload();
}
private boolean validateTimeMatchBasis(ResourceList list) {
for (ResourcePair rp : list) {
AbstractVizResource<?, ?> rsc = rp.getResource();
if (rsc == timeMatchBasis) {
return true;
} else if (rp.getProperties().isMapLayer()
|| rp.getProperties().isSystemResource()) {
continue;
} else if (rsc.getResourceData() instanceof IResourceGroup) {
if (validateTimeMatchBasis(((IResourceGroup) rsc.getResourceData())
.getResourceList())) {
return true;
}
}
}
return false;
}
}

View file

@ -21,6 +21,7 @@
package com.raytheon.uf.viz.d2d.ui.map;
import java.io.File;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@ -96,6 +97,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Nov 20, 2012 DR 15524 M.Porricelli Changed so interactive screens still editable when
* swapped to side panel
* Mar 21, 2013 1638 mschenke Changed map scales not tied to d2d
* Aug 9, 2013 DR 16427 D. Friedman Swap additional input handlers.
*
* </pre>
*
@ -347,37 +349,38 @@ public class SideView extends ViewPart implements IMultiPaneEditor,
// First thing to do, swap input handlers
// Get editor resource handlers and unregister on editor
IInputHandler[] editorResourceHandlers = theEditor
.getMouseManager().getHandlersForPriority(
InputPriority.RESOURCE);
IInputHandler[] editorSystemRscHandlers = theEditor
.getMouseManager().getHandlersForPriority(
InputPriority.SYSTEM_RESOURCE);
for (IInputHandler handler : editorResourceHandlers) {
theEditor.getMouseManager().unregisterMouseHandler(handler);
}
for (IInputHandler handler : editorSystemRscHandlers) {
theEditor.getMouseManager().unregisterMouseHandler(handler);
final InputPriority[] SWAPPABLE_PRIORITIES = { InputPriority.RESOURCE,
InputPriority.SYSTEM_RESOURCE,
InputPriority.SYSTEM_RESOURCE_LOW };
HashMap<InputPriority, IInputHandler[]> editorHandlers =
new HashMap<IInputHandler.InputPriority, IInputHandler[]>();
for (InputPriority priority : SWAPPABLE_PRIORITIES) {
IInputHandler[] handlers = theEditor.getMouseManager()
.getHandlersForPriority(priority);
editorHandlers.put(priority, handlers);
for (IInputHandler handler : handlers) {
theEditor.getMouseManager().unregisterMouseHandler(handler);
}
}
// Store and unregister input handlers on ourself
IInputHandler[] myResourceHandlers = paneManager.getMouseManager()
.getHandlersForPriority(InputPriority.RESOURCE);
IInputHandler[] mySystemRscHandlers = paneManager.getMouseManager()
.getHandlersForPriority(InputPriority.SYSTEM_RESOURCE);
for (IInputHandler handler : myResourceHandlers) {
unregisterMouseHandler(handler);
}
for (IInputHandler handler : mySystemRscHandlers) {
unregisterMouseHandler(handler);
HashMap<InputPriority, IInputHandler[]> myHandlers =
new HashMap<IInputHandler.InputPriority, IInputHandler[]>();
for (InputPriority priority : SWAPPABLE_PRIORITIES) {
IInputHandler[] handlers = paneManager.getMouseManager()
.getHandlersForPriority(priority);
myHandlers.put(priority, handlers);
for (IInputHandler handler : handlers) {
unregisterMouseHandler(handler);
}
}
// Register editor handlers on ourself
for (IInputHandler handler : editorResourceHandlers) {
registerMouseHandler(handler, InputPriority.RESOURCE);
}
for (IInputHandler handler : editorSystemRscHandlers) {
registerMouseHandler(handler, InputPriority.SYSTEM_RESOURCE);
for (InputPriority priority : SWAPPABLE_PRIORITIES) {
IInputHandler[] handlers = editorHandlers.get(priority);
for (IInputHandler handler : handlers) {
registerMouseHandler(handler, priority);
}
}
IDisplayPane[] editorPanes = theEditor.getDisplayPanes();
@ -587,13 +590,12 @@ public class SideView extends ViewPart implements IMultiPaneEditor,
D2DLegendResource.LegendMode.PRODUCT,
D2DLegendResource.LegendMode.SHORT_PRODUCT);
for (IInputHandler handler : myResourceHandlers) {
theEditor.registerMouseHandler(handler,
InputPriority.RESOURCE);
}
for (IInputHandler handler : mySystemRscHandlers) {
theEditor.registerMouseHandler(handler,
InputPriority.SYSTEM_RESOURCE);
for (InputPriority priority : SWAPPABLE_PRIORITIES) {
IInputHandler[] handlers = myHandlers.get(priority);
for (IInputHandler handler : handlers) {
theEditor.registerMouseHandler(handler,
priority);
}
}
// Set up editableness

View file

@ -62,6 +62,7 @@ import com.vividsolutions.jts.geom.Point;
* the Storm Track Display that it
* needs to update the track because
* the point has been moved.
* 08-12-2013 DR 16427 D. Friedman Prevent NPE.
*
* </pre>
*
@ -260,7 +261,7 @@ public class StormTrackUIManager extends InputAdapter {
StormTrackState state = controller.getStormTrackState();
boolean rval = false;
if (((mouseButton == 1) || (mouseButton == 2 && pointCreated))
&& moveType != null) {
&& moveType != null && state.mouseDownGeom != null) {
state.dragMeGeom = state.mouseDownGeom;
state.mouseDownGeom = null;
if (state.mode == Mode.DRAG_ME) {

View file

@ -69,7 +69,6 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.SimulatedTime;
import com.raytheon.uf.common.time.TimeRange;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
import com.raytheon.uf.viz.core.VizApp;
@ -936,10 +935,12 @@ public class WarngenDialog extends CaveSWTDialog implements
// Select the previously selected item.
invalidFollowUpAction = false;
if (currentSelection != null) {
boolean isValid = false;
for (int i = 0; i < updateListCbo.getItemCount(); i++) {
if (updateListCbo.getItem(i).startsWith(
currentSelection.getEquvialentString())) {
updateListCbo.select(i);
isValid = true;
break;
}
}

View file

@ -93,6 +93,8 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
* 05/22/13 #2025 dgilling Re-implement functions needed by
* GetLatestDbTimeRequest and GetLatestModelDbIdRequest.
* 05/20/13 #2127 rjpeter Set session's to read only and switched to stateless where possible.
* 08/08/13 DR16485 ryu Remove call to getDatabaseId() from getMaxInsertTimeByDbId()
* so new GFE databases aren't accidentally created.
* </pre>
*
* @author bphillip
@ -1126,7 +1128,13 @@ public class GFEDao extends DefaultPluginDao {
public Date getMaxInsertTimeByDbId(final DatabaseID dbId)
throws DataAccessLayerException {
DatabaseQuery query = new DatabaseQuery(this.daoClass);
query.addQueryParam("parmId.dbId", getDatabaseId(dbId),
query.addQueryParam("parmId.dbId.siteId", dbId.getSiteId(),
QueryOperand.EQUALS);
query.addQueryParam("parmId.dbId.format", dbId.getFormat(),
QueryOperand.EQUALS);
query.addQueryParam("parmId.dbId.modelName", dbId.getModelName(),
QueryOperand.EQUALS);
query.addQueryParam("parmId.dbId.modelTime", dbId.getModelTime(),
QueryOperand.EQUALS);
query.addReturnedField("insertTime");
query.addOrder("insertTime", false);

View file

@ -688,6 +688,7 @@ public class FFMPBasinData implements ISerializableObject {
* @param times
*/
public void populate(List<Long> times) {
if (mapFactory == null) {
mapFactory = new BasinMapFactory<Date>(Collections.reverseOrder(),
getBasins().size());