Revision: 8267
Author: gwt.mirror...@gmail.com
Date: Wed Jun 16 13:56:33 2010
Log: earlier mirror fix only got the additive changes; here are the subtractives.
http://code.google.com/p/google-web-toolkit/source/detail?r=8267

Deleted:
 /trunk/bikeshed/src/com/google/gwt/app/client/ListBoxPlacePickerView.java
 /trunk/bikeshed/src/com/google/gwt/app/util
 /trunk/bikeshed/src/com/google/gwt/bikeshed
 /trunk/bikeshed/src/com/google/gwt/requestfactory/shared/SyncResult.java
 /trunk/bikeshed/src/com/google/gwt/sample/bikeshed/stocks
/trunk/bikeshed/src/com/google/gwt/sample/expenses/server/ExpensesDataServlet.java /trunk/bikeshed/src/com/google/gwt/valuestore/ui/AbstractRecordEditActivity.java /trunk/bikeshed/src/com/google/gwt/valuestore/ui/AbstractRecordListActivity.java
 /trunk/bikeshed/war/Stocks.html
 /trunk/bikeshed/war/StocksMobile.html
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/testdata/cpe1/com/google/gwt/user/client/empty /trunk/dev/core/test/com/google/gwt/dev/resource/impl/testdata/cpe1/org/example/bar/server /trunk/dev/core/test/com/google/gwt/dev/resource/impl/testdata/cpe2/org/example/bar/server
 /trunk/doc/src/com
 /trunk/plugins/npapi/extension
 /trunk/plugins/webkit/oophm.pmdoc
 /trunk/plugins/xpcom/prebuilt/extension/lib/Darwin-gcc3/ff2
 /trunk/plugins/xpcom/prebuilt/extension/lib/WINNT_x86-msvc/ff2
 /trunk/tools/soyc-vis/src
 /trunk/user/src/com/google/gwt/uibinder/parsers
 /trunk/user/src/com/google/gwt/uibinder/testing
/trunk/user/super/com/google/gwt/benchmarks/translatable/com/google/gwt/benchmarks/client/impl
 /trunk/user/test/com/google/gwt/i18n/client/cldr
 /trunk/user/test/com/google/gwt/resources/rebind
 /trunk/user/test/com/google/gwt/uibinder/parsers

=======================================
--- /trunk/bikeshed/src/com/google/gwt/app/client/ListBoxPlacePickerView.java Fri May 28 04:09:54 2010
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.app.client;
-
-import com.google.gwt.app.place.Place;
-import com.google.gwt.app.place.PlacePickerView;
-import com.google.gwt.event.logical.shared.ValueChangeEvent;
-import com.google.gwt.event.logical.shared.ValueChangeHandler;
-import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.user.client.ui.ValueListBox;
-
-/**
- * Hacky ValueListBox based implementation of PlacePickerView, to be replaced by
- * new data widget, or at least something less ugly.
- *
- * @param <P> the type of places listed
- */
-public class ListBoxPlacePickerView<P extends Place> extends ValueListBox<P>
-    implements PlacePickerView<P> {
-  private HandlerRegistration handlerRegistration;
-
-  /**
-   * @return this view
-   */
-  public ListBoxPlacePickerView<P> asWidget() {
-    return this;
-  }
-
-  /**
-   * Set the listener.
-   */
-  public void setListener(final PlacePickerView.Listener<P> listener) {
-    if (handlerRegistration != null) {
-      handlerRegistration.removeHandler();
-      handlerRegistration = null;
-    }
-
- handlerRegistration = addValueChangeHandler(new ValueChangeHandler<P>() {
-      public void onValueChange(ValueChangeEvent<P> event) {
-        listener.placePicked(event.getValue());
-      }
-    });
-  }
-}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/requestfactory/shared/SyncResult.java Fri May 28 08:44:36 2010
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.requestfactory.shared;
-
-import com.google.gwt.valuestore.shared.Record;
-
-import java.util.Map;
-
-/**
- * Result per record of a SyncRequest.
- */
-public interface SyncResult {
-  boolean hasViolations();
-
-  Record getRecord();
-
-  Map<String, String> getViolations();
-}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/sample/expenses/server/ExpensesDataServlet.java Fri May 28 08:44:36 2010
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.expenses.server;
-
-import com.google.gwt.requestfactory.server.RequestFactoryServlet;
-import com.google.gwt.sample.expenses.server.domain.Employee;
-import com.google.gwt.sample.expenses.server.domain.Expense;
-import com.google.gwt.sample.expenses.server.domain.Report;
-
-import java.util.Date;
-import java.util.Random;
-
-/**
- * Dwindling interim servlet that calls our mock storage backend directly
- * instead of reflectively. Should soon vanish completely.
- */
-...@suppresswarnings("serial")
-public class ExpensesDataServlet extends RequestFactoryServlet {
-
-  // Must be in sync with DESCRIPTIONS
-  private static final String[] CATEGORIES = {
-      "Dining", "Dining", "Dining", "Lodging", "Lodging",
- "Local Transportation", "Local Transportation", "Local Transportation",
-      "Air Travel", "Air Travel", "Office Supplies", "Office Supplies",
-      "Office Supplies", "Office Supplies",};
-
-  private static final String[] DEPARTMENTS = {
-      "Sales", "Marketing", "Engineering", "Operations"};
-
-  // Must be in sync with CATEGORIES
-  private static final String[] DESCRIPTIONS = {
- "Breakfast", "Lunch", "Dinner", "Hotel", "Bed & Breakfast", "Train fare",
-      "Taxi fare", "Bus ticket", "Flight from ATL to SFO",
- "Flight from SFO to ATL", "Paperclips", "Stapler", "Scissors", "Paste",};
-
-  private static final String[] FIRST_NAMES = {
-      "Amy", "Bob", "Catherine", "Dave", "Earl", "Flin", "George", "Harriot",
-      "Ingrid", "John", "Katy", "Leo", "Mike", "Nancy", "Owen", "Paul",
-      "Reece", "Sally", "Terry", "Val", "Wes", "Xavier", "Zack"};
-
-  private static final String[] LAST_NAMES = {
-      "Awesome", "Bravo", "Cool", "Fantastic", "Great", "Happy",
-      "Ignoranomous", "Krazy", "Luminous", "Magnanimous", "Outstanding",
-      "Perfect", "Radical", "Stellar", "Terrific", "Wonderful"};
-
-  private static final String[] NOTES = {
-      // Some entries do not have notes.
-      "", "Need approval by Monday", "Show me the money",
- "Please bill to the Widgets project", "High priority", "Review A.S.A.P."};
-
-  private static final String[] PURPOSES = {
-      "Spending lots of money", "Team building diamond cutting offsite",
-      "Visit to Istanbul", "ISDN modem for telecommuting", "Sushi offsite",
-      "Baseball card research", "Potato chip cooking offsite",
-      "Money laundering", "Donut day"};
-
-  Random rand = new Random();
-
-  @Override
-  protected void initDb() {
-    long size = Employee.countEmployees();
-    if (size > 1) {
-      return;
-    }
-
-    // Initialize the database.
-    for (int i = 0; i < 100; i++) {
-      addEmployee();
-    }
-  }
-
-  /**
-   * Add a randomly generated employee.
-   */
-  private void addEmployee() {
-    Employee abc = new Employee();
-    String firstName = nextValue(FIRST_NAMES);
-    String lastName = nextValue(LAST_NAMES);
-    String username = (firstName.charAt(0) + lastName).toLowerCase();
-    abc.setUserName(username);
-    abc.setDisplayName(firstName + " " + lastName);
-    abc.setDepartment(nextValue(DEPARTMENTS));
-    abc.persist();
-
-    addReports(abc.getId());
-  }
-
-  private void addExpenses(Long reportId) {
-    int num = rand.nextInt(5) + 1;
-    for (int i = 0; i < num; i++) {
-      int index = rand.nextInt(DESCRIPTIONS.length);
-      Expense detail = new Expense();
-      detail.setReportId(reportId);
-      detail.setDescription(DESCRIPTIONS[index]);
-      detail.setDate(getDate());
-      detail.setAmount(rand.nextInt(25000) / 100.0);
-      detail.setCategory(CATEGORIES[index]);
-      detail.setApproval("");
-      detail.setReasonDenied("");
-      detail.persist();
-    }
-  }
-
-  /**
-   * Add a randomly generated report.
-   *
-   * @param employeeId the id of the employee who created the report
-   */
-  private void addReports(Long employeeId) {
-    // Add 1-20 expense reports.
-    int reportCount = 1 + rand.nextInt(20);
-    for (int i = 0; i < reportCount; i++) {
-      Report report = new Report();
-      report.setCreated(getDate());
-      report.setReporterKey(employeeId);
-      report.setPurpose(nextValue(PURPOSES));
-      report.setNotes(nextValue(NOTES));
-      report.persist();
-
-      addExpenses(report.getId());
-    }
-  }
-
-  private Date getDate() {
-    long now = new Date().getTime();
-    // Go back up to 90 days from the current date
-    long dateOffset = rand.nextInt(60 * 60 * 24 * 90) * 1000L;
-    return new Date(now - dateOffset);
-  }
-
-  /**
-   * Get the next random value from an array.
-   *
-   * @param array the array
-   * @return a random value from the array
-   */
-  private String nextValue(String[] array) {
-    return array[rand.nextInt(array.length)];
-  }
-}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/valuestore/ui/AbstractRecordEditActivity.java Fri May 28 08:44:36 2010
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.valuestore.ui;
-
-import com.google.gwt.app.place.Activity;
-import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.SyncResult;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.valuestore.shared.DeltaValueStore;
-import com.google.gwt.valuestore.shared.Record;
-import com.google.gwt.valuestore.shared.Value;
-
-import java.util.Set;
-
-/**
- * Abstract activity for editing a record.
- *
- * @param <R> the type of Record being edited
- */
-public abstract class AbstractRecordEditActivity<R extends Record> implements
-    Activity, RecordEditView.Delegate {
-
-  private final RecordEditView<R> view;
-  private final String id;
-  private DeltaValueStore deltas;
-  private final RequestFactory requests;
-  private boolean dead = false;
-
-  public AbstractRecordEditActivity(RecordEditView<R> view, String id,
-      RequestFactory requests) {
-    this.view = view;
-    this.id = id;
-    this.requests = requests;
-    this.deltas = requests.getValueStore().spawnDeltaView();
-    view.setDelegate(this);
-    view.setDeltaValueStore(deltas);
-  }
-
-  public void cancelClicked() {
-    if (willStop()) {
-      exit();
-    }
-  }
-
-  public void onCancel() {
-    this.dead = true;
-  }
-
-  public void onStop() {
-    this.dead = true;
-  }
-
-  public void saveClicked() {
-    if (deltas.isChanged()) {
-      view.setEnabled(false);
-
-      final DeltaValueStore toCommit = deltas;
-      deltas = null;
-
- Receiver<Set<SyncResult>> receiver = new Receiver<Set<SyncResult>>() {
-        public void onSuccess(Set<SyncResult> response) {
-          if (dead) {
-            return;
-          }
-          boolean hasViolations = false;
-          for (SyncResult syncResult : response) {
-            if (syncResult.getRecord().getId().equals(id)) {
-              if (syncResult.hasViolations()) {
-                hasViolations = true;
-                view.showErrors(syncResult.getViolations());
-              }
-            }
-          }
-          if (!hasViolations) {
-            exit();
-          } else {
-            deltas = toCommit;
-            deltas.clearUsed();
-            view.setEnabled(true);
-            deltas.clearUsed();
-          }
-        }
-
-      };
-      requests.syncRequest(toCommit).to(receiver).fire();
-    }
-  }
-
-  public void start(final Display display) {
-    Receiver<R> callback = new Receiver<R>() {
-      public void onSuccess(R record) {
-        if (dead) {
-          return;
-        }
-        view.setEnabled(true);
-        view.setValue(record);
-        view.showErrors(null);
-        display.showActivityWidget(view);
-      }
-    };
-
-    fireFindRequest(Value.of(id), callback);
-  }
-
-  public boolean willStop() {
-    return deltas == null || !deltas.isChanged()
- || Window.confirm("Are you sure you want to abandon your changes?");
-  }
-
-  /**
-   * Called when the user has clicked Cancel or has successfully saved.
-   */
-  protected abstract void exit();
-
-  /**
-   * Called to fetch the details of the edited record.
-   */
- protected abstract void fireFindRequest(Value<String> id, Receiver<R> callback);
-
-  protected String getId() {
-    return id;
-  }
-
-}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/valuestore/ui/AbstractRecordListActivity.java Fri May 28 08:44:36 2010
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.valuestore.ui;
-
-import com.google.gwt.app.place.Activity;
-import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RecordListRequest;
-import com.google.gwt.valuestore.shared.Record;
-import com.google.gwt.view.client.ListView;
-import com.google.gwt.view.client.Range;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Abstract activity for requesting and displaying a list of {...@record}.
- * <p>
- * Subclasses must:
- *
- * <ul>
- * <li>implement a method for creating request objects
- * <li>provide a {...@link RecordListView}
- * <li>respond to "show" and "edit" requests
- * </ul>
- *
- * Only the properties required by the view will be requested.
- *
- * @param <R> the type of {...@link Record} listed
- */
-public abstract class AbstractRecordListActivity<R extends Record> implements
-    Activity, RecordListView.Delegate<R> {
- private final Map<String, Integer> recordToRow = new HashMap<String, Integer>();
-
-  private RecordListView<R> view;
-  private Display display;
-
-  public AbstractRecordListActivity(RecordListView<R> view) {
-    this.view = view;
-    view.setDelegate(this);
-  }
-
-  public RecordListView<R> getView() {
-    return view;
-  }
-
-  public void onCancel() {
-    onStop();
-  }
-
-  /**
-   * Called by the table as it needs data.
-   */
-  public void onRangeChanged(ListView<R> listView) {
-    final Range range = listView.getRange();
-
-    final Receiver<List<R>> callback = new Receiver<List<R>>() {
-      public void onSuccess(List<R> values) {
-        recordToRow.clear();
- for (int i = 0, r = range.getStart(); i < values.size(); i++, r++) {
-          recordToRow.put(values.get(i).getId(), r);
-        }
-        getView().setData(range.getStart(), range.getLength(), values);
-        if (display != null) {
-          display.showActivityWidget(getView());
-        }
-      }
-    };
-
-    createRangeRequest(range).forProperties(getView().getProperties()).to(
-        callback).fire();
-  }
-
-  public void onStop() {
-    view.setDelegate((RecordListView.Delegate<R>) null);
-  }
-
-  public void start(Display display) {
-    this.display = display;
-    init();
-  }
-
-  public void update(R record) {
-    // TODO Must handle delete, new
-    Integer row = recordToRow.get(record.getId());
-    getView().setData(row, 1, Collections.singletonList(record));
-  }
-
-  public boolean willStop() {
-    return true;
-  }
-
-  protected abstract RecordListRequest<R> createRangeRequest(Range range);
-
-  protected abstract void fireCountRequest(Receiver<Long> callback);
-
-  private void init() {
-    fireCountRequest(new Receiver<Long>() {
-      public void onSuccess(Long response) {
-        getView().setDataSize(response.intValue(), true);
-        onRangeChanged(view);
-      }
-    });
-  }
-}
=======================================
--- /trunk/bikeshed/war/Stocks.html     Thu Apr 22 06:58:10 2010
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-    <title>Stock Game Sample</title>
- <script type="text/javascript" language="javascript" src="stocksdesktop/stocksdesktop.nocache.js"></script>
-  </head>
-
-  <body>
- <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
-    <noscript>
- <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
-        Your web browser must have JavaScript enabled
-        in order for this application to display correctly.
-      </div>
-    </noscript>
-  </body>
-</html>
=======================================
--- /trunk/bikeshed/war/StocksMobile.html       Thu Apr 22 06:58:10 2010
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-    <title>Stock Game Sample</title>
- <script type="text/javascript" language="javascript" src="stocksmobile/stocksmobile.nocache.js"></script>
-  </head>
-
-  <body>
- <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
-    <noscript>
- <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
-        Your web browser must have JavaScript enabled
-        in order for this application to display correctly.
-      </div>
-    </noscript>
-  </body>
-</html>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to