LGTM, with a minor update to the WARN message, as we discussed on IM. Final text of the WARN message: "The class com.google.gwt.dev.HostedMode is deprecated and will be removed -- use com.google.gwt.dev.DevMode instead for launching development mode"
On Thu, Oct 15, 2009 at 11:40 AM, <[email protected]> wrote: > Reviewers: amitmanjhi, > > Description: > This is the class which will take the place of the existing HostedMode > entry point (which will be renamed to DevMode). > > All it does is log a warning and run the real DevMode main. > > As noted in the code, this is suitable for testing in current trunk but > things will be renamed before submit. > > Please review this at http://gwt-code-reviews.appspot.com/79802 > > Affected files: > dev/core/src/com/google/gwt/dev/OldHostedMode.java > > > Index: dev/core/src/com/google/gwt/dev/OldHostedMode.java > =================================================================== > --- dev/core/src/com/google/gwt/dev/OldHostedMode.java (revision 0) > +++ dev/core/src/com/google/gwt/dev/OldHostedMode.java (revision 0) > @@ -0,0 +1,56 @@ > +/* > + * Copyright 2009 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.dev; > + > +import com.google.gwt.core.ext.TreeLogger; > + > +/** > + * Support old name for this entry point, logging a warning message before > + * redirecting to the new name. > + * > + * TODO(jat): after trunk merge, rename this to HostedMode and HostedMode > to > + * DevMode. > + */ > +...@deprecated > +public class OldHostedMode extends HostedMode { > + > + /** > + * Support old name for this entry point, logging a warning message > before > + * redirecting to the new name. > + * > + * @param args command-line arguments > + */ > + public static void main(String[] args) { > + OldHostedMode hostedMode = new OldHostedMode(); > + if (new ArgProcessor(hostedMode.options).processArgs(args)) { > + hostedMode.run(); > + // Exit w/ success code. > + System.exit(0); > + } > + // Exit w/ non-success code. > + System.exit(-1); > + } > + > + @Override > + protected boolean doStartup() { > + if (!super.doStartup()) { > + return false; > + } > + getTopLogger().log(TreeLogger.WARN, > + "HostedMode is deprecated -- use DevMode instead"); > + return true; > + } > +} > > Property changes on: dev/core/src/com/google/gwt/dev/OldHostedMode.java > ___________________________________________________________________ > Added: svn:mime-type > + text/x-java > Added: svn:eol-style > + native > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
