Merge remote-tracking branch 'origin/master' into mark-rounding-inference

This commit is contained in:
Nick Klose committed 2013-12-20 15:35:21 +01:00
commit b85f03b62c
4 files changed
+48 -55

No files matched your search

+4 -12
View File
@@ -1,7 +1,6 @@
#!/bin/bash
set -o functrace
find_project_home ()
{
if [[ $1 == '/' ]] || [[ $1 == "" ]]; then
@@ -104,7 +103,8 @@ if [ $# -eq 0 ]; then
echo ""
echo "build: builds the server code using Maven to $PROJECT_HOME (log to $START_DIR/build.log)"
echo ""
echo "install: installs product and configuration to $SERVERS_HOME/$active_branch. Overwrites any configuration by using config from branch."
echo "install: installs product files to $SERVERS_HOME/$active_branch. Does NOT overwrite any configuration in env.sh! If you want to
echo " overwrite the configuration then use the refreshInstance.sh script that comes with the instance. ""
echo ""
echo "all: invokes build and then install"
echo ""
@@ -553,9 +553,6 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
if [ ! -f "$ACDIR/env.sh" ]; then
cp -v $PROJECT_HOME/java/target/env.sh $ACDIR/
fi
if [ ! -f $ACDIR/no-overwrite ]; then
cp -v $p2PluginRepository/configuration/config.ini configuration/
mkdir -p configuration/jetty/etc
@@ -564,11 +561,8 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
cp -v $PROJECT_HOME/java/target/configuration/jetty/etc/jetty-deployer.xml configuration/jetty/etc
cp -v $PROJECT_HOME/java/target/configuration/jetty/etc/realm.properties configuration/jetty/etc
cp -v $PROJECT_HOME/java/target/configuration/monitoring.properties configuration/
cp -v $PROJECT_HOME/configuration/mongodb.cfg $ACDIR/
cp -v $PROJECT_HOME/java/target/env.sh $ACDIR/
cp -v $PROJECT_HOME/java/target/udpmirror $ACDIR/
cp -v $PROJECT_HOME/java/target/http2udpmirror $ACDIR
cp -v $PROJECT_HOME/java/target/configuration/logging.properties $ACDIR/configuration
fi
@@ -581,7 +575,7 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
# Make sure this script is up2date at least for the next run
cp -v $PROJECT_HOME/configuration/buildAndUpdateProduct.sh $ACDIR/
# make sure to save the information from env.sh
# make sure to read the information from env.sh
. $ACDIR/env.sh
echo "$VERSION_INFO System:" > $ACDIR/configuration/jetty/version.txt
@@ -612,9 +606,7 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
echo "REPLICATION_CHANNEL: $REPLICATION_CHANNEL"
echo ""
if [ -f $ACDIR/no-overwrite ]; then
echo "ATTENTION: I found the file $ACDIR/no-overwrite. This means that I did NOT use env.sh from this branch."
fi
echo "I did NOT overwrite env.sh if it already existed! Use the refreshInstance.sh script to update your configuration!"
echo "Installation complete. You may now start the server using ./start"
fi
+12 -14
View File
@@ -160,20 +160,18 @@ def compute_branch(branch_name)
end
end
end
Mutex.new.synchronize do
puts "\tbranch: %s" % branch_name
puts "\tblobs: %s" % branch.blobs.count
puts "\tnon shared:"
puts "\t\tpacked: %s kb" % (branch.non_shared_packed_size / 1000)
puts "\t\tnon packed: %s kb" % (branch.non_shared_size / 1000)
puts "\t\tall: %s kb" % ((branch.non_shared_packed_size + branch.non_shared_size) / 1000)
puts "\tnon shared but with dependencies on it:"
puts "\t\tpacked: %s kb" % (branch.non_shared_dependable_packed_size / 1000)
puts "\t\tnon packed: %s kb" % (branch.non_shared_dependable_size / 1000)
puts "\tshared:"
puts "\t\tpacked: %s kb" % (branch.shared_packed_size / 1000)
puts "\t\tnon packed: %s kb" % (branch.shared_size / 1000), ""
end
puts "\tbranch: %s" % branch_name
puts "\tblobs: %s" % branch.blobs.count
puts "\tnon shared:"
puts "\t\tpacked: %s kb" % (branch.non_shared_packed_size / 1000)
puts "\t\tnon packed: %s kb" % (branch.non_shared_size / 1000)
puts "\t\tall: %s kb" % ((branch.non_shared_packed_size + branch.non_shared_size) / 1000)
puts "\tnon shared but with dependencies on it:"
puts "\t\tpacked: %s kb" % (branch.non_shared_dependable_packed_size / 1000)
puts "\t\tnon packed: %s kb" % (branch.non_shared_dependable_size / 1000)
puts "\tshared:"
puts "\t\tpacked: %s kb" % (branch.shared_packed_size / 1000)
puts "\t\tnon packed: %s kb" % (branch.shared_size / 1000), ""
end
end
@@ -1,12 +1,11 @@
package com.sap.sailing.gwt.ui.client.shared.racemap;
import com.google.gwt.maps.client.MapWidget;
import com.google.gwt.maps.client.base.LatLng;
import com.google.gwt.maps.client.base.LatLngBounds;
import com.google.gwt.maps.client.base.Point;
import com.google.gwt.maps.client.base.Size;
import com.google.gwt.maps.client.events.zoom.ZoomChangeMapEvent;
import com.google.gwt.maps.client.events.zoom.ZoomChangeMapHandler;
import com.google.gwt.maps.client.events.bounds.BoundsChangeMapEvent;
import com.google.gwt.maps.client.events.bounds.BoundsChangeMapHandler;
import com.google.gwt.maps.client.geometrylib.SphericalUtils;
import com.sap.sailing.domain.common.dto.BoatClassDTO;
import com.sap.sailing.domain.common.dto.CompetitorDTO;
@@ -37,16 +36,26 @@ public class BoatOverlay extends CanvasOverlayV3 {
private final BoatClassImageData boatClassImageData;
public BoatOverlay(MapWidget map, int zIndex, final CompetitorDTO competitorDTO) {
super(map, zIndex);
map.addZoomChangeHandler(new ZoomChangeMapHandler() {
@Override
public void onEvent(ZoomChangeMapEvent event) {
removeCanvasPositionTransition(); // re-activate upon next position change if player is in correct state
}
});
/**
* The map bounds as last received by map callbacks; used to determine whether to suppress the boat animation during zoom/pan
*/
private LatLngBounds currentMapBounds;
public BoatOverlay(final RaceMap map, int zIndex, final CompetitorDTO competitorDTO) {
super(map.getMap(), zIndex);
this.boatClass = competitorDTO.getBoatClass();
this.boatClassImageData = BoatClassImageDataResolver.resolveBoatClassImages(boatClass.getName());
map.getMap().addBoundsChangeHandler(new BoundsChangeMapHandler() {
@Override
public void onEvent(BoundsChangeMapEvent event) {
if (!map.getMap().getBounds().equals(currentMapBounds)) {
for (BoatOverlay boatOverlay : map.getBoatOverlays().values()) {
boatOverlay.removeCanvasPositionTransition();
}
}
currentMapBounds = map.getMap().getBounds();
}
});
}
@Override
@@ -255,7 +255,7 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
private final CombinedWindPanel combinedWindPanel;
private final AsyncActionsExecutor asyncActionsExecutor;
public RaceMap(SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor, ErrorReporter errorReporter, Timer timer,
CompetitorSelectionProvider competitorSelection, StringMessages stringMessages) {
this.setSize("100%", "100%");
@@ -335,28 +335,15 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
map.addZoomChangeHandler(new ZoomChangeMapHandler() {
@Override
public void onEvent(ZoomChangeMapEvent event) {
map.triggerResize();
// stop automatic zoom after a manual zoom event; automatic zoom in zoomMapToNewBounds will restore old settings
final List<RaceMapZoomSettings.ZoomTypes> emptyList = Collections.emptyList();
settings.getZoomSettings().setTypesToConsiderOnZoom(emptyList);
Set<CompetitorDTO> competitorDTOsOfUnusedMarkers = new HashSet<CompetitorDTO>(boatOverlays.keySet());
for (CompetitorDTO competitorDTO : getCompetitorsToShow()) {
boolean usedExistingMarker = updateBoatCanvasForCompetitor(competitorDTO, timer.getTime(),
/* timeForPositionTransitionMillis; don't animate during zoom */ -1);
if (usedExistingMarker) {
competitorDTOsOfUnusedMarkers.remove(competitorDTO);
}
}
for (CompetitorDTO unusedMarkerCompetitorDTO : competitorDTOsOfUnusedMarkers) {
BoatOverlay boatOverlay = boatOverlays.get(unusedMarkerCompetitorDTO);
boatOverlay.removeFromMap();
boatOverlays.remove(unusedMarkerCompetitorDTO);
}
}
});
map.addDragEndHandler(new DragEndMapHandler() {
@Override
public void onEvent(DragEndMapEvent event) {
// stop automatic zoom after a manual drag event
final List<RaceMapZoomSettings.ZoomTypes> emptyList = Collections.emptyList();
settings.getZoomSettings().setTypesToConsiderOnZoom(emptyList);
}
@@ -379,6 +366,14 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
timeChanged(timer.getTime());
}
Map<CompetitorDTO, BoatOverlay> getBoatOverlays() {
return Collections.unmodifiableMap(boatOverlays);
}
MapWidget getMap() {
return map;
}
@Override
public void onRaceSelectionChange(List<RegattaAndRaceIdentifier> selectedRaces) {
mapFirstZoomDone = false;
@@ -1047,7 +1042,6 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
if (newBounds != null) {
List<ZoomTypes> oldZoomSettings = settings.getZoomSettings().getTypesToConsiderOnZoom();
map.setCenter(newBounds.getCenter());
//map.setZoomLevel(map.getBoundsZoomLevel(newBounds));
map.fitBounds(newBounds);
settings.getZoomSettings().setTypesToConsiderOnZoom(oldZoomSettings);
}
@@ -1100,7 +1094,7 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
}
private BoatOverlay createBoatOverlay(int zIndex, final CompetitorDTO competitorDTO, boolean highlighted) {
final BoatOverlay boatCanvas = new BoatOverlay(map, zIndex, competitorDTO);
final BoatOverlay boatCanvas = new BoatOverlay(this, zIndex, competitorDTO);
boatCanvas.setSelected(highlighted);
boatCanvas.addClickHandler(new ClickMapHandler() {
@Override