Rewrite our build as modular maven components
This refactoring splits the code up into different components, with their own per-component CLASSPATH. By moving all of our classes into isolated components we can better isolate the classpaths and try to avoid unexpected dependency problems. It also allows us to more clearly define which components are used by the GWT UI and thus must be compiled under GWT, and which components are run on the server and can therefore use more of the J2SE API. Change-Id: I833cc22bacc5655d1c9099ed7c2b0e0a5b08855a Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,11 +1,3 @@
|
||||
/target
|
||||
/GerritServer.properties
|
||||
/.classpath
|
||||
/.project
|
||||
/.settings/org.maven.ide.eclipse.prefs
|
||||
/src/main/java/GerritServer.properties
|
||||
/src/main/java/com/google/gerrit/client/GerritVersion.properties
|
||||
/src/main/java/com/google/gerrit/client/GerritVersion_*.properties
|
||||
/src/main/webapp/gerrit
|
||||
/src/main/webapp/WEB-INF/lib
|
||||
/hs_err_pid*.log
|
||||
/GerritServer.properties
|
||||
|
@@ -40,8 +40,8 @@ http://m2eclipse.codehaus.org/[m2eclipse]
|
||||
Code Formatter Settings
|
||||
-----------------------
|
||||
|
||||
Import GoogleFormat.xml using Window -> Preferences -> Java ->
|
||||
Code Style -> Formatter -> Import...
|
||||
Import `tools/GoogleFormat.xml` using Window -> Preferences ->
|
||||
Java -> Code Style -> Formatter -> Import...
|
||||
|
||||
This will define the 'Google Format' profile, which the project
|
||||
settings prefer when formatting source code.
|
||||
@@ -59,7 +59,7 @@ builds are used.
|
||||
|
||||
[NOTE]
|
||||
Some of the source code is generated with ANTLR sources. To
|
||||
build these files, you need to right click on the imported project,
|
||||
build these files, you need to right click on the imported projects,
|
||||
Maven -> Update Project Configuration. This should fix the compile
|
||||
errors identified after import.
|
||||
|
||||
@@ -74,19 +74,10 @@ Configure Database
|
||||
You may have already done this step earlier, based on the
|
||||
instructions in link:dev-readme.html[Developer Setup].
|
||||
|
||||
* Open gerrit/src/main/java
|
||||
* Copy `GerritServer.properties_example` to `GerritServer.properties`
|
||||
* Navigate to gerrit-war/src/main/webapp/WEB-INF/extra/
|
||||
* Copy `GerritServer.properties_example` to `gerrit-parent/GerritServer.properties`
|
||||
* Configure your database for debugging in hosted mode.
|
||||
|
||||
Bootstrap Compile
|
||||
-----------------
|
||||
|
||||
From the command line we have to bootstrap the environment:
|
||||
|
||||
----
|
||||
./to_hosted.sh
|
||||
----
|
||||
|
||||
Production Compile
|
||||
------------------
|
||||
|
||||
@@ -96,17 +87,15 @@ Production Compile
|
||||
mvn clean package
|
||||
----
|
||||
|
||||
to create a production build. The `./to_hosted.sh` used above
|
||||
to setup the development environment for Eclipse hosted mode also
|
||||
creates a state that produces a corrupt production build.
|
||||
to create a production build.
|
||||
|
||||
Launch Gerrit
|
||||
-------------
|
||||
|
||||
Open Run->Debug Configurations...
|
||||
|
||||
Under Java Application find `gerrit_debug` (not Mac OS X)
|
||||
or `gerrit_macos` (Mac OS X only) to start the GWT hosted
|
||||
Under Java Application find `gwtui_any` (not Mac OS X)
|
||||
or `gwtui_mac` (Mac OS X only) to start the GWT hosted
|
||||
mode browser and debug through Eclipse.
|
||||
|
||||
Final Setup
|
||||
|
@@ -43,8 +43,7 @@ gwtorm supports (or add the necessary dialect support to gwtorm,
|
||||
and then configure your workspace anyway).
|
||||
|
||||
====
|
||||
cd src/main/java
|
||||
cp GerritServer.properties_example GerritServer.properties
|
||||
cp gerrit-war/src/main/webapp/WEB-INF/extra/GerritServer.properties_example GerritServer.properties
|
||||
====
|
||||
|
||||
Now edit GerritServer.properties to uncomment the database you are
|
||||
@@ -104,7 +103,7 @@ From the command line:
|
||||
Output WAR will be placed in:
|
||||
|
||||
====
|
||||
target/gerrit-*.war
|
||||
gerrit-war/target/gerrit-*.war
|
||||
====
|
||||
|
||||
When debugging browser specific issues use gwtStyle `DETAILED` so
|
||||
|
@@ -47,7 +47,7 @@ Maven from a source download obtained directly from Git:
|
||||
git clone git://android.git.kernel.org/tools/gerrit.git
|
||||
cd gerrit
|
||||
mvn clean package
|
||||
cp target/gerrit-*.war ...YOUR.DEST.../gerrit.war
|
||||
cp gerrit-war/target/gerrit-*.war ...YOUR.DEST.../gerrit.war
|
||||
====
|
||||
|
||||
The first build may take a while as dependencies are searched
|
||||
|
5
gerrit-common/.gitignore
vendored
Normal file
5
gerrit-common/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/target
|
||||
/.classpath
|
||||
/.project
|
||||
/.settings/org.maven.ide.eclipse.prefs
|
||||
/src/main/java/com/google/gerrit/common/Version.properties
|
85
gerrit-common/pom.xml
Normal file
85
gerrit-common/pom.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 The Android Open Source Project
|
||||
|
||||
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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-parent</artifactId>
|
||||
<version>2.0.25-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>gerrit-common</artifactId>
|
||||
<name>Gerrit Code Review - Common</name>
|
||||
|
||||
<description>
|
||||
Classes common to both server and client.
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-servlet</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>gwtexpui</groupId>
|
||||
<artifactId>gwtexpui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-reviewdb</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-patch-jgit</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-version</id>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<property name="src" location="${basedir}/src/main/java/" />
|
||||
<property name="pkg" location="${src}/com/google/gerrit/common" />
|
||||
<exec executable="git" outputproperty="v">
|
||||
<arg value="describe"/>
|
||||
<arg value="HEAD"/>
|
||||
</exec>
|
||||
<echo file="${pkg}/Version.properties">version=${v}</echo>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
20
gerrit-common/src/main/java/com/google/gerrit/Common.gwt.xml
Normal file
20
gerrit-common/src/main/java/com/google/gerrit/Common.gwt.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<!--
|
||||
Copyright (C) 2009 The Android Open Source Project
|
||||
|
||||
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.
|
||||
-->
|
||||
<module>
|
||||
<inherits name='com.google.gerrit.ReviewDB' />
|
||||
<inherits name='com.google.gwtjsonrpc.GWTJSONRPC'/>
|
||||
<source path='common' />
|
||||
</module>
|
@@ -0,0 +1,68 @@
|
||||
// Copyright (C) 2008 The Android Open Source Project
|
||||
//
|
||||
// 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.gerrit.common;
|
||||
|
||||
import com.google.gerrit.common.data.AccountInfo;
|
||||
import com.google.gerrit.common.data.ChangeInfo;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gwtorm.client.KeyUtil;
|
||||
|
||||
public class PageLinks {
|
||||
public static final String SETTINGS = "settings";
|
||||
public static final String SETTINGS_SSHKEYS = "settings,ssh-keys";
|
||||
public static final String SETTINGS_WEBIDENT = "settings,web-identities";
|
||||
public static final String SETTINGS_MYGROUPS = "settings,group-memberships";
|
||||
public static final String SETTINGS_AGREEMENTS = "settings,agreements";
|
||||
public static final String SETTINGS_CONTACT = "settings,contact";
|
||||
public static final String SETTINGS_PROJECTS = "settings,projects";
|
||||
public static final String SETTINGS_NEW_AGREEMENT = "settings,new-agreement";
|
||||
public static final String REGISTER = "register";
|
||||
|
||||
public static final String MINE = "mine";
|
||||
public static final String MINE_STARRED = "mine,starred";
|
||||
public static final String MINE_DRAFTS = "mine,drafts";
|
||||
|
||||
public static final String ALL_ABANDONED = "all,abandoned,n,z";
|
||||
public static final String ALL_MERGED = "all,merged,n,z";
|
||||
public static final String ALL_OPEN = "all,open,n,z";
|
||||
|
||||
public static final String ADMIN_PEOPLE = "admin,people";
|
||||
public static final String ADMIN_GROUPS = "admin,groups";
|
||||
public static final String ADMIN_PROJECTS = "admin,projects";
|
||||
|
||||
public static String toChange(final ChangeInfo c) {
|
||||
return toChange(c.getId());
|
||||
}
|
||||
|
||||
public static String toChange(final Change.Id c) {
|
||||
return "change," + c.toString();
|
||||
}
|
||||
|
||||
public static String toAccountDashboard(final AccountInfo acct) {
|
||||
return toAccountDashboard(acct.getId());
|
||||
}
|
||||
|
||||
public static String toAccountDashboard(final Account.Id acct) {
|
||||
return "dashboard," + acct.toString();
|
||||
}
|
||||
|
||||
public static String toChangeQuery(final String query) {
|
||||
return "q," + KeyUtil.encode(query) + ",n,z";
|
||||
}
|
||||
|
||||
protected PageLinks() {
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
// Copyright (C) 2008 The Android Open Source Project
|
||||
//
|
||||
// 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.gerrit.common.auth;
|
||||
|
||||
public enum SignInMode {
|
||||
SIGN_IN, LINK_IDENTIY, REGISTER;
|
||||
}
|
@@ -12,7 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.auth;
|
||||
|
||||
import com.google.gerrit.common.errors.NotSignedInException;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -23,8 +25,7 @@ import java.lang.annotation.Target;
|
||||
* Annotation indicating a service method requires a current user.
|
||||
* <p>
|
||||
* If there is no current user then {@link NotSignedInException} will be given
|
||||
* to the callback's onFailure method. Methods tagged with this will never get
|
||||
* null from {@link Common#getAccountId()}.
|
||||
* to the callback's onFailure method.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.auth.openid;
|
||||
package com.google.gerrit.common.auth.openid;
|
||||
|
||||
import java.util.Map;
|
||||
|
@@ -12,16 +12,16 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.auth.openid;
|
||||
package com.google.gerrit.common.auth.openid;
|
||||
|
||||
import com.google.gerrit.client.SignInDialog;
|
||||
import com.google.gerrit.common.auth.SignInMode;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.AllowCrossSiteRequest;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
|
||||
public interface OpenIdService extends RemoteJsonService {
|
||||
@AllowCrossSiteRequest
|
||||
void discover(String openidIdentifier, SignInDialog.Mode mode,
|
||||
void discover(String openidIdentifier, SignInMode mode,
|
||||
boolean remember, String returnToken,
|
||||
AsyncCallback<DiscoveryResult> callback);
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2009 The Android Open Source Project
|
||||
//
|
||||
// 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.gerrit.common.auth.openid;
|
||||
|
||||
public class OpenIdUrls {
|
||||
public static final String OPENID_IDENTIFIER = "openid_identifier";
|
||||
public static final String LASTID_COOKIE = "gerrit.last_openid";
|
||||
|
||||
public static final String URL_YAHOO = "https://me.yahoo.com";
|
||||
public static final String URL_GOOGLE =
|
||||
"https://www.google.com/accounts/o8/id";
|
||||
}
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.auth.userpass;
|
||||
package com.google.gerrit.common.auth.userpass;
|
||||
|
||||
public class LoginResult {
|
||||
public boolean success;
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.auth.userpass;
|
||||
package com.google.gerrit.common.auth.userpass;
|
||||
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.AllowCrossSiteRequest;
|
@@ -12,14 +12,13 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.changes.AccountDashboardScreen;
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** Summary information needed for {@link AccountDashboardScreen}. */
|
||||
/** Summary information needed to display an account dashboard. */
|
||||
public class AccountDashboardInfo {
|
||||
protected AccountInfoCache accounts;
|
||||
protected Account.Id owner;
|
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
|
||||
/** Summary information about an {@link Account}, for simple tabular displays. */
|
||||
public class AccountInfo {
|
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
@@ -12,10 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.account;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.AccountProjectWatch;
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.reviewdb.AccountProjectWatch;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
|
||||
public final class AccountProjectWatchInfo {
|
||||
protected AccountProjectWatch watch;
|
@@ -12,15 +12,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.account;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.AccountExternalId;
|
||||
import com.google.gerrit.client.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.client.reviewdb.AccountSshKey;
|
||||
import com.google.gerrit.client.reviewdb.ContactInformation;
|
||||
import com.google.gerrit.client.reviewdb.ContributorAgreement;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.AccountExternalId;
|
||||
import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.AccountSshKey;
|
||||
import com.google.gerrit.reviewdb.ContactInformation;
|
||||
import com.google.gerrit.reviewdb.ContributorAgreement;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
import com.google.gwtjsonrpc.client.VoidResult;
|
@@ -12,12 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.account;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.AccountGeneralPreferences;
|
||||
import com.google.gerrit.client.reviewdb.AccountProjectWatch;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.AccountGeneralPreferences;
|
||||
import com.google.gerrit.reviewdb.AccountProjectWatch;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
import com.google.gwtjsonrpc.client.VoidResult;
|
@@ -12,9 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.patches;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.ChangeDetail;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@@ -12,19 +12,19 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.account;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.AccountAgreement;
|
||||
import com.google.gerrit.client.reviewdb.AccountGroupAgreement;
|
||||
import com.google.gerrit.client.reviewdb.ContributorAgreement;
|
||||
import com.google.gerrit.reviewdb.AccountAgreement;
|
||||
import com.google.gerrit.reviewdb.AccountGroupAgreement;
|
||||
import com.google.gerrit.reviewdb.ContributorAgreement;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AgreementInfo {
|
||||
protected List<AccountAgreement> userAccepted;
|
||||
protected List<AccountGroupAgreement> groupAccepted;
|
||||
protected Map<ContributorAgreement.Id, ContributorAgreement> agreements;
|
||||
public List<AccountAgreement> userAccepted;
|
||||
public List<AccountGroupAgreement> groupAccepted;
|
||||
public Map<ContributorAgreement.Id, ContributorAgreement> agreements;
|
||||
|
||||
public AgreementInfo() {
|
||||
}
|
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.client.reviewdb.PatchSetApproval;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.PatchSetApproval;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
@@ -12,10 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.client.reviewdb.PatchSetApproval;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.PatchSetApproval;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategoryValue;
|
||||
import com.google.gerrit.client.reviewdb.PatchSetApproval;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategoryValue;
|
||||
import com.google.gerrit.reviewdb.PatchSetApproval;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
@@ -12,13 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.changes.ChangeScreen;
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.client.reviewdb.ChangeMessage;
|
||||
import com.google.gerrit.client.reviewdb.PatchSet;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.ChangeMessage;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -26,7 +25,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/** Detail necessary to display {@link ChangeScreen}. */
|
||||
/** Detail necessary to display a change. */
|
||||
public class ChangeDetail {
|
||||
protected AccountInfoCache accounts;
|
||||
protected boolean allowsAnonymous;
|
@@ -12,13 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.changes;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.ChangeDetail;
|
||||
import com.google.gerrit.client.data.PatchSetDetail;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.client.reviewdb.PatchSet;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
|
@@ -12,10 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
@@ -12,14 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.changes;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.AccountDashboardInfo;
|
||||
import com.google.gerrit.client.data.SingleListChangeInfo;
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
import com.google.gwtjsonrpc.client.VoidResult;
|
||||
@@ -73,7 +71,7 @@ public interface ChangeListService extends RemoteJsonService {
|
||||
void allQueryNext(String query, String pos, int limit,
|
||||
AsyncCallback<SingleListChangeInfo> callback);
|
||||
|
||||
/** Get the data to show {@link AccountDashboardScreen} for an account. */
|
||||
/** Get the data to show AccountDashboardScreen for an account. */
|
||||
void forAccount(Account.Id id, AsyncCallback<AccountDashboardInfo> callback);
|
||||
|
||||
/** Get the changes starred by the caller. */
|
@@ -12,11 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.changes;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.ChangeDetail;
|
||||
import com.google.gerrit.client.reviewdb.PatchSet;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
|
@@ -12,12 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.patches;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.AccountInfoCache;
|
||||
import com.google.gerrit.client.reviewdb.Patch;
|
||||
import com.google.gerrit.client.reviewdb.PatchLineComment;
|
||||
import com.google.gerrit.client.reviewdb.PatchSet;
|
||||
import com.google.gerrit.reviewdb.Patch;
|
||||
import com.google.gerrit.reviewdb.PatchLineComment;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import org.eclipse.jgit.diff.Edit;
|
||||
|
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.AuthType;
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.AuthType;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gwtexpui.safehtml.client.RegexFindReplace;
|
||||
|
||||
import java.util.List;
|
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Branch;
|
||||
import com.google.gerrit.client.reviewdb.PatchSet;
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.reviewdb.Branch;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gwt.http.client.URL;
|
||||
|
||||
/** Link to an external gitweb server. */
|
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.admin;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.client.reviewdb.AccountGroupMember;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.AccountGroupMember;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
import com.google.gwtjsonrpc.client.VoidResult;
|
@@ -12,19 +12,18 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.admin;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.AccountInfoCache;
|
||||
import com.google.gerrit.client.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.client.reviewdb.AccountGroupMember;
|
||||
import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.AccountGroupMember;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GroupDetail {
|
||||
protected AccountInfoCache accounts;
|
||||
protected AccountGroup group;
|
||||
protected List<AccountGroupMember> members;
|
||||
protected AccountGroup ownerGroup;
|
||||
public AccountInfoCache accounts;
|
||||
public AccountGroup group;
|
||||
public List<AccountGroupMember> members;
|
||||
public AccountGroup ownerGroup;
|
||||
|
||||
public GroupDetail() {
|
||||
}
|
@@ -12,10 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.GerritConfig;
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
|
||||
/** Data sent as part of the host page, to bootstrap the UI. */
|
||||
public class HostPageData {
|
@@ -12,19 +12,16 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.patches;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.ApprovalSummarySet;
|
||||
import com.google.gerrit.client.data.PatchScript;
|
||||
import com.google.gerrit.client.data.PatchScriptSettings;
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategoryValue;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.client.reviewdb.Patch;
|
||||
import com.google.gerrit.client.reviewdb.PatchLineComment;
|
||||
import com.google.gerrit.client.reviewdb.PatchSet;
|
||||
import com.google.gerrit.client.reviewdb.Patch.Key;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategoryValue;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.Patch;
|
||||
import com.google.gerrit.reviewdb.PatchLineComment;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
import com.google.gerrit.reviewdb.Patch.Key;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
import com.google.gwtjsonrpc.client.VoidResult;
|
@@ -12,12 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
|
||||
|
||||
import com.google.gerrit.client.data.PatchScriptSettings.Whitespace;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.common.data.PatchScriptSettings.Whitespace;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
|
||||
import org.eclipse.jgit.diff.Edit;
|
||||
|
@@ -12,10 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.AccountGeneralPreferences;
|
||||
import com.google.gerrit.client.rpc.CodedEnum;
|
||||
import com.google.gerrit.reviewdb.AccountGeneralPreferences;
|
||||
import com.google.gerrit.reviewdb.CodedEnum;
|
||||
|
||||
public class PatchScriptSettings {
|
||||
public static enum Whitespace implements CodedEnum {
|
@@ -12,11 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Patch;
|
||||
import com.google.gerrit.client.reviewdb.PatchSet;
|
||||
import com.google.gerrit.client.reviewdb.PatchSetInfo;
|
||||
import com.google.gerrit.reviewdb.Patch;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
import com.google.gerrit.reviewdb.PatchSetInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
@@ -12,15 +12,14 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.changes;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.AccountInfoCache;
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategoryValue;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.client.reviewdb.PatchSetApproval;
|
||||
import com.google.gerrit.client.reviewdb.PatchLineComment;
|
||||
import com.google.gerrit.client.reviewdb.PatchSetInfo;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategoryValue;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.PatchLineComment;
|
||||
import com.google.gerrit.reviewdb.PatchSetApproval;
|
||||
import com.google.gerrit.reviewdb.PatchSetInfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
@@ -12,13 +12,13 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.admin;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.client.reviewdb.Branch;
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.client.reviewdb.ProjectRight;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.Branch;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gerrit.reviewdb.ProjectRight;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
import com.google.gwtjsonrpc.client.VoidResult;
|
@@ -12,19 +12,19 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.admin;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.client.reviewdb.ProjectRight;
|
||||
import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gerrit.reviewdb.ProjectRight;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ProjectDetail {
|
||||
protected Project project;
|
||||
protected Map<AccountGroup.Id, AccountGroup> groups;
|
||||
protected List<ProjectRight> rights;
|
||||
public Project project;
|
||||
public Map<AccountGroup.Id, AccountGroup> groups;
|
||||
public List<ProjectRight> rights;
|
||||
|
||||
public ProjectDetail() {
|
||||
}
|
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
|
||||
public class ProjectInfo {
|
||||
protected Project.NameKey key;
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import java.util.List;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
/** Description of the SSH daemon host key used by Gerrit. */
|
||||
public class SshHostKey {
|
@@ -12,11 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.ui;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.data.AccountInfo;
|
||||
import com.google.gerrit.client.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
|
@@ -12,10 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.data;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.ContributorAgreement;
|
||||
import com.google.gerrit.client.rpc.SignInRequired;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.reviewdb.ContributorAgreement;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.AllowCrossSiteRequest;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.changes;
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error indicating the server cannot store contact information. */
|
||||
public class ContactInformationStoreException extends Exception {
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
import com.google.gwtorm.client.Key;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error indicating the entity name is invalid as supplied. */
|
||||
public class InvalidNameException extends Exception {
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error indicating the revision is invalid as supplied. */
|
||||
public class InvalidRevisionException extends Exception {
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error indicating the SSH key string is invalid as supplied. */
|
||||
public class InvalidSshKeyException extends Exception {
|
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
|
||||
/** Error indicating the SSH user name does not match {@link Account#SSH_USER_NAME_PATTERN} pattern. */
|
||||
public class InvalidSshUserNameException extends Exception {
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error indicating entity name is already taken by another entity. */
|
||||
public class NameAlreadyUsedException extends Exception {
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error indicating the account requested doesn't exist. */
|
||||
public class NoSuchAccountException extends Exception {
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error indicating the entity requested doesn't exist. */
|
||||
public class NoSuchEntityException extends Exception {
|
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.rpc;
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error stating the user must be signed-in in order to perform this action. */
|
||||
public class NotSignedInException extends Exception {
|
4
gerrit-gwtdebug/.gitignore
vendored
Normal file
4
gerrit-gwtdebug/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/target
|
||||
/.classpath
|
||||
/.project
|
||||
/.settings/org.maven.ide.eclipse.prefs
|
@@ -0,0 +1,3 @@
|
||||
#Tue Sep 02 16:59:24 PDT 2008
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
3
gerrit-gwtdebug/.settings/org.eclipse.core.runtime.prefs
Normal file
3
gerrit-gwtdebug/.settings/org.eclipse.core.runtime.prefs
Normal file
@@ -0,0 +1,3 @@
|
||||
#Tue Sep 02 16:59:24 PDT 2008
|
||||
eclipse.preferences.version=1
|
||||
line.separator=\n
|
268
gerrit-gwtdebug/.settings/org.eclipse.jdt.core.prefs
Normal file
268
gerrit-gwtdebug/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,268 @@
|
||||
#Tue May 12 17:44:13 PDT 2009
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=80
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=2
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
61
gerrit-gwtdebug/.settings/org.eclipse.jdt.ui.prefs
Normal file
61
gerrit-gwtdebug/.settings/org.eclipse.jdt.ui.prefs
Normal file
@@ -0,0 +1,61 @@
|
||||
#Wed Jul 29 11:31:38 PDT 2009
|
||||
eclipse.preferences.version=1
|
||||
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||
formatter_profile=_Google Format
|
||||
formatter_settings_version=11
|
||||
org.eclipse.jdt.ui.ignorelowercasenames=true
|
||||
org.eclipse.jdt.ui.importorder=com.google;com;junit;net;org;java;javax;
|
||||
org.eclipse.jdt.ui.ondemandthreshold=99
|
||||
org.eclipse.jdt.ui.staticondemandthreshold=99
|
||||
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
|
||||
sp_cleanup.add_default_serial_version_id=true
|
||||
sp_cleanup.add_generated_serial_version_id=false
|
||||
sp_cleanup.add_missing_annotations=false
|
||||
sp_cleanup.add_missing_deprecated_annotations=true
|
||||
sp_cleanup.add_missing_methods=false
|
||||
sp_cleanup.add_missing_nls_tags=false
|
||||
sp_cleanup.add_missing_override_annotations=true
|
||||
sp_cleanup.add_serial_version_id=false
|
||||
sp_cleanup.always_use_blocks=true
|
||||
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||
sp_cleanup.always_use_this_for_non_static_field_access=false
|
||||
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||
sp_cleanup.convert_to_enhanced_for_loop=false
|
||||
sp_cleanup.correct_indentation=false
|
||||
sp_cleanup.format_source_code=false
|
||||
sp_cleanup.format_source_code_changes_only=false
|
||||
sp_cleanup.make_local_variable_final=true
|
||||
sp_cleanup.make_parameters_final=true
|
||||
sp_cleanup.make_private_fields_final=true
|
||||
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||
sp_cleanup.make_variable_declarations_final=false
|
||||
sp_cleanup.never_use_blocks=false
|
||||
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||
sp_cleanup.on_save_use_additional_actions=true
|
||||
sp_cleanup.organize_imports=false
|
||||
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||
sp_cleanup.remove_private_constructors=true
|
||||
sp_cleanup.remove_trailing_whitespaces=true
|
||||
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||
sp_cleanup.remove_unnecessary_casts=false
|
||||
sp_cleanup.remove_unnecessary_nls_tags=false
|
||||
sp_cleanup.remove_unused_imports=false
|
||||
sp_cleanup.remove_unused_local_variables=false
|
||||
sp_cleanup.remove_unused_private_fields=true
|
||||
sp_cleanup.remove_unused_private_members=false
|
||||
sp_cleanup.remove_unused_private_methods=true
|
||||
sp_cleanup.remove_unused_private_types=true
|
||||
sp_cleanup.sort_members=false
|
||||
sp_cleanup.sort_members_all=false
|
||||
sp_cleanup.use_blocks=false
|
||||
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||
sp_cleanup.use_parentheses_in_expressions=false
|
||||
sp_cleanup.use_this_for_non_static_field_access=false
|
||||
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||
sp_cleanup.use_this_for_non_static_method_access=false
|
||||
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
66
gerrit-gwtdebug/pom.xml
Normal file
66
gerrit-gwtdebug/pom.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 The Android Open Source Project
|
||||
|
||||
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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-parent</artifactId>
|
||||
<version>2.0.25-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>gerrit-gwtdbug</artifactId>
|
||||
<name>Gerrit Code Review - GWT UI Debugging Support</name>
|
||||
|
||||
<description>
|
||||
Debugging support for the GWT UI
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-dev</artifactId>
|
||||
<classifier>${platform}</classifier>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-gwtui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-war</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15</artifactId>
|
||||
<version>140</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>bouncycastle</groupId>
|
||||
<artifactId>bcpg-jdk15</artifactId>
|
||||
<version>140</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@@ -0,0 +1,419 @@
|
||||
/*
|
||||
* Copyright 2008 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.gerrit.gwtdebug;
|
||||
|
||||
import com.google.gwt.core.ext.ServletContainer;
|
||||
import com.google.gwt.core.ext.ServletContainerLauncher;
|
||||
import com.google.gwt.core.ext.TreeLogger;
|
||||
import com.google.gwt.core.ext.UnableToCompleteException;
|
||||
import com.google.gwt.dev.shell.jetty.JettyNullLogger;
|
||||
|
||||
import org.mortbay.component.AbstractLifeCycle;
|
||||
import org.mortbay.jetty.AbstractConnector;
|
||||
import org.mortbay.jetty.Request;
|
||||
import org.mortbay.jetty.RequestLog;
|
||||
import org.mortbay.jetty.Response;
|
||||
import org.mortbay.jetty.Server;
|
||||
import org.mortbay.jetty.HttpFields.Field;
|
||||
import org.mortbay.jetty.handler.RequestLogHandler;
|
||||
import org.mortbay.jetty.nio.SelectChannelConnector;
|
||||
import org.mortbay.jetty.webapp.WebAppClassLoader;
|
||||
import org.mortbay.jetty.webapp.WebAppContext;
|
||||
import org.mortbay.log.Log;
|
||||
import org.mortbay.log.Logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class GerritDebugLauncher extends ServletContainerLauncher {
|
||||
/**
|
||||
* Log jetty requests/responses to TreeLogger.
|
||||
*/
|
||||
public static class JettyRequestLogger extends AbstractLifeCycle implements
|
||||
RequestLog {
|
||||
|
||||
private final TreeLogger logger;
|
||||
|
||||
public JettyRequestLogger(TreeLogger logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log an HTTP request/response to TreeLogger.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void log(Request request, Response response) {
|
||||
int status = response.getStatus();
|
||||
if (status < 0) {
|
||||
// Copied from NCSARequestLog
|
||||
status = 404;
|
||||
}
|
||||
TreeLogger.Type logStatus, logHeaders;
|
||||
if (status >= 500) {
|
||||
logStatus = TreeLogger.ERROR;
|
||||
logHeaders = TreeLogger.INFO;
|
||||
} else if (status >= 400) {
|
||||
logStatus = TreeLogger.WARN;
|
||||
logHeaders = TreeLogger.INFO;
|
||||
} else {
|
||||
logStatus = TreeLogger.INFO;
|
||||
logHeaders = TreeLogger.DEBUG;
|
||||
}
|
||||
String userString = request.getRemoteUser();
|
||||
if (userString == null) {
|
||||
userString = "";
|
||||
} else {
|
||||
userString += "@";
|
||||
}
|
||||
String bytesString = "";
|
||||
if (response.getContentCount() > 0) {
|
||||
bytesString = " " + response.getContentCount() + " bytes";
|
||||
}
|
||||
if (logger.isLoggable(logStatus)) {
|
||||
TreeLogger branch =
|
||||
logger.branch(logStatus, String.valueOf(status) + " - "
|
||||
+ request.getMethod() + ' ' + request.getUri() + " ("
|
||||
+ userString + request.getRemoteHost() + ')' + bytesString);
|
||||
if (branch.isLoggable(logHeaders)) {
|
||||
// Request headers
|
||||
TreeLogger headers = branch.branch(logHeaders, "Request headers");
|
||||
Iterator<Field> headerFields =
|
||||
request.getConnection().getRequestFields().getFields();
|
||||
while (headerFields.hasNext()) {
|
||||
Field headerField = headerFields.next();
|
||||
headers.log(logHeaders, headerField.getName() + ": "
|
||||
+ headerField.getValue());
|
||||
}
|
||||
// Response headers
|
||||
headers = branch.branch(logHeaders, "Response headers");
|
||||
headerFields = response.getHttpFields().getFields();
|
||||
while (headerFields.hasNext()) {
|
||||
Field headerField = headerFields.next();
|
||||
headers.log(logHeaders, headerField.getName() + ": "
|
||||
+ headerField.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An adapter for the Jetty logging system to GWT's TreeLogger. This
|
||||
* implementation class is only public to allow {@link Log} to instantiate it.
|
||||
*
|
||||
* The weird static data / default construction setup is a game we play with
|
||||
* {@link Log}'s static initializer to prevent the initial log message from
|
||||
* going to stderr.
|
||||
*/
|
||||
public static class JettyTreeLogger implements Logger {
|
||||
private final TreeLogger logger;
|
||||
|
||||
public JettyTreeLogger(TreeLogger logger) {
|
||||
if (logger == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
public void debug(String msg, Object arg0, Object arg1) {
|
||||
logger.log(TreeLogger.SPAM, format(msg, arg0, arg1));
|
||||
}
|
||||
|
||||
public void debug(String msg, Throwable th) {
|
||||
logger.log(TreeLogger.SPAM, msg, th);
|
||||
}
|
||||
|
||||
public Logger getLogger(String name) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void info(String msg, Object arg0, Object arg1) {
|
||||
logger.log(TreeLogger.INFO, format(msg, arg0, arg1));
|
||||
}
|
||||
|
||||
public boolean isDebugEnabled() {
|
||||
return logger.isLoggable(TreeLogger.SPAM);
|
||||
}
|
||||
|
||||
public void setDebugEnabled(boolean enabled) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public void warn(String msg, Object arg0, Object arg1) {
|
||||
logger.log(TreeLogger.WARN, format(msg, arg0, arg1));
|
||||
}
|
||||
|
||||
public void warn(String msg, Throwable th) {
|
||||
logger.log(TreeLogger.WARN, msg, th);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copied from org.mortbay.log.StdErrLog.
|
||||
*/
|
||||
private String format(String msg, Object arg0, Object arg1) {
|
||||
int i0 = msg.indexOf("{}");
|
||||
int i1 = i0 < 0 ? -1 : msg.indexOf("{}", i0 + 2);
|
||||
|
||||
if (arg1 != null && i1 >= 0) {
|
||||
msg = msg.substring(0, i1) + arg1 + msg.substring(i1 + 2);
|
||||
}
|
||||
if (arg0 != null && i0 >= 0) {
|
||||
msg = msg.substring(0, i0) + arg0 + msg.substring(i0 + 2);
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The resulting {@link ServletContainer} this is launched.
|
||||
*/
|
||||
protected static class JettyServletContainer extends ServletContainer {
|
||||
private final int actualPort;
|
||||
private final File appRootDir;
|
||||
private final TreeLogger logger;
|
||||
private final Server server;
|
||||
private final WebAppContext wac;
|
||||
|
||||
public JettyServletContainer(TreeLogger logger, Server server,
|
||||
WebAppContext wac, int actualPort, File appRootDir) {
|
||||
this.logger = logger;
|
||||
this.server = server;
|
||||
this.wac = wac;
|
||||
this.actualPort = actualPort;
|
||||
this.appRootDir = appRootDir;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPort() {
|
||||
return actualPort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh() throws UnableToCompleteException {
|
||||
String msg =
|
||||
"Reloading web app to reflect changes in "
|
||||
+ appRootDir.getAbsolutePath();
|
||||
TreeLogger branch = logger.branch(TreeLogger.INFO, msg);
|
||||
// Temporarily log Jetty on the branch.
|
||||
Log.setLog(new JettyTreeLogger(branch));
|
||||
try {
|
||||
wac.stop();
|
||||
wac.start();
|
||||
branch.log(TreeLogger.INFO, "Reload completed successfully");
|
||||
} catch (Exception e) {
|
||||
branch.log(TreeLogger.ERROR, "Unable to restart embedded Jetty server",
|
||||
e);
|
||||
throw new UnableToCompleteException();
|
||||
} finally {
|
||||
// Reset the top-level logger.
|
||||
Log.setLog(new JettyTreeLogger(logger));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() throws UnableToCompleteException {
|
||||
TreeLogger branch =
|
||||
logger.branch(TreeLogger.INFO, "Stopping Jetty server");
|
||||
// Temporarily log Jetty on the branch.
|
||||
Log.setLog(new JettyTreeLogger(branch));
|
||||
try {
|
||||
server.stop();
|
||||
server.setStopAtShutdown(false);
|
||||
branch.log(TreeLogger.INFO, "Stopped successfully");
|
||||
} catch (Exception e) {
|
||||
branch.log(TreeLogger.ERROR, "Unable to stop embedded Jetty server", e);
|
||||
throw new UnableToCompleteException();
|
||||
} finally {
|
||||
// Reset the top-level logger.
|
||||
Log.setLog(new JettyTreeLogger(logger));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A {@link WebAppContext} tailored to GWT hosted mode. Features hot-reload
|
||||
* with a new {@link WebAppClassLoader} to pick up disk changes. The default
|
||||
* Jetty {@code WebAppContext} will create new instances of servlets, but it
|
||||
* will not create a brand new {@link ClassLoader}. By creating a new {@code
|
||||
* ClassLoader} each time, we re-read updated classes from disk.
|
||||
*
|
||||
* Also provides special class filtering to isolate the web app from the GWT
|
||||
* hosting environment.
|
||||
*/
|
||||
protected final class MyWebAppContext extends WebAppContext {
|
||||
/**
|
||||
* Parent ClassLoader for the Jetty web app, which can only load JVM
|
||||
* classes. We would just use <code>null</code> for the parent ClassLoader
|
||||
* except this makes Jetty unhappy.
|
||||
*/
|
||||
private final ClassLoader bootStrapOnlyClassLoader =
|
||||
new ClassLoader(null) {};
|
||||
|
||||
private final ClassLoader systemClassLoader =
|
||||
Thread.currentThread().getContextClassLoader();
|
||||
|
||||
private final TreeLogger logger;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private MyWebAppContext(TreeLogger logger, String webApp, String contextPath) {
|
||||
super(webApp, contextPath);
|
||||
this.logger = logger;
|
||||
|
||||
// Prevent file locking on Windows; pick up file changes.
|
||||
getInitParams().put(
|
||||
"org.mortbay.jetty.servlet.Default.useFileMappedBuffer", "false");
|
||||
|
||||
// Since the parent class loader is bootstrap-only, prefer it first.
|
||||
setParentLoaderPriority(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStart() throws Exception {
|
||||
setClassLoader(new MyLoader());
|
||||
super.doStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStop() throws Exception {
|
||||
super.doStop();
|
||||
setClassLoader(null);
|
||||
}
|
||||
|
||||
private class MyLoader extends WebAppClassLoader {
|
||||
MyLoader() throws IOException {
|
||||
super(bootStrapOnlyClassLoader, MyWebAppContext.this);
|
||||
|
||||
final URLClassLoader scl = (URLClassLoader) systemClassLoader;
|
||||
final URL[] urls = scl.getURLs();
|
||||
for (URL u : urls) {
|
||||
if ("file".equals(u.getProtocol())) {
|
||||
addClassPath(u.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSystemPath(String name) {
|
||||
name = name.replace('/', '.');
|
||||
return super.isSystemPath(name) //
|
||||
|| name.startsWith("org.bouncycastle.");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<?> findClass(String name) throws ClassNotFoundException {
|
||||
// For system path, always prefer the outside world.
|
||||
if (isSystemPath(name)) {
|
||||
try {
|
||||
return systemClassLoader.loadClass(name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
}
|
||||
return super.findClass(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
// Suppress spammy Jetty log initialization.
|
||||
System
|
||||
.setProperty("org.mortbay.log.class", JettyNullLogger.class.getName());
|
||||
Log.getLog();
|
||||
|
||||
/*
|
||||
* Make JDT the default Ant compiler so that JSP compilation just works
|
||||
* out-of-the-box. If we don't set this, it's very, very difficult to make
|
||||
* JSP compilation work.
|
||||
*/
|
||||
String antJavaC =
|
||||
System.getProperty("build.compiler",
|
||||
"org.eclipse.jdt.core.JDTCompilerAdapter");
|
||||
System.setProperty("build.compiler", antJavaC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServletContainer start(TreeLogger logger, int port, File warDir)
|
||||
throws Exception {
|
||||
TreeLogger branch =
|
||||
logger.branch(TreeLogger.INFO, "Starting Jetty on port " + port, null);
|
||||
|
||||
checkStartParams(branch, port, warDir);
|
||||
|
||||
// Setup our branch logger during startup.
|
||||
Log.setLog(new JettyTreeLogger(branch));
|
||||
|
||||
// Turn off XML validation.
|
||||
System.setProperty("org.mortbay.xml.XmlParser.Validating", "false");
|
||||
|
||||
AbstractConnector connector = getConnector();
|
||||
connector.setPort(port);
|
||||
|
||||
// Don't share ports with an existing process.
|
||||
connector.setReuseAddress(false);
|
||||
|
||||
// Linux keeps the port blocked after shutdown if we don't disable this.
|
||||
connector.setSoLingerTime(0);
|
||||
|
||||
Server server = new Server();
|
||||
server.addConnector(connector);
|
||||
|
||||
// warDir is "$top/gerrit-gwtui/target/gwt-hosted-mode"
|
||||
//
|
||||
File top = warDir.getParentFile().getParentFile().getParentFile();
|
||||
File app = new File(top, "gerrit-war/src/main/webapp");
|
||||
File webxml = new File(app, "WEB-INF/web.xml");
|
||||
|
||||
// Create a new web app in the war directory.
|
||||
//
|
||||
WebAppContext wac =
|
||||
new MyWebAppContext(logger, warDir.getAbsolutePath(), "/");
|
||||
wac.setDescriptor(webxml.getAbsolutePath());
|
||||
|
||||
RequestLogHandler logHandler = new RequestLogHandler();
|
||||
logHandler.setRequestLog(new JettyRequestLogger(logger));
|
||||
logHandler.setHandler(wac);
|
||||
server.setHandler(logHandler);
|
||||
server.start();
|
||||
server.setStopAtShutdown(true);
|
||||
|
||||
// Now that we're started, log to the top level logger.
|
||||
Log.setLog(new JettyTreeLogger(logger));
|
||||
|
||||
return new JettyServletContainer(logger, server, wac, connector
|
||||
.getLocalPort(), warDir);
|
||||
}
|
||||
|
||||
protected AbstractConnector getConnector() {
|
||||
return new SelectChannelConnector();
|
||||
}
|
||||
|
||||
private void checkStartParams(TreeLogger logger, int port, File appRootDir) {
|
||||
if (logger == null) {
|
||||
throw new NullPointerException("logger cannot be null");
|
||||
}
|
||||
|
||||
if (port < 0 || port > 65535) {
|
||||
throw new IllegalArgumentException(
|
||||
"port must be either 0 (for auto) or less than 65536");
|
||||
}
|
||||
|
||||
if (appRootDir == null) {
|
||||
throw new NullPointerException("app root direcotry cannot be null");
|
||||
}
|
||||
}
|
||||
}
|
4
gerrit-gwtui/.gitignore
vendored
Normal file
4
gerrit-gwtui/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/target
|
||||
/.classpath
|
||||
/.project
|
||||
/.settings/org.maven.ide.eclipse.prefs
|
3
gerrit-gwtui/.settings/org.eclipse.core.resources.prefs
Normal file
3
gerrit-gwtui/.settings/org.eclipse.core.resources.prefs
Normal file
@@ -0,0 +1,3 @@
|
||||
#Tue Sep 02 16:59:24 PDT 2008
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
3
gerrit-gwtui/.settings/org.eclipse.core.runtime.prefs
Normal file
3
gerrit-gwtui/.settings/org.eclipse.core.runtime.prefs
Normal file
@@ -0,0 +1,3 @@
|
||||
#Tue Sep 02 16:59:24 PDT 2008
|
||||
eclipse.preferences.version=1
|
||||
line.separator=\n
|
268
gerrit-gwtui/.settings/org.eclipse.jdt.core.prefs
Normal file
268
gerrit-gwtui/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,268 @@
|
||||
#Tue May 12 17:44:13 PDT 2009
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=80
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=2
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
61
gerrit-gwtui/.settings/org.eclipse.jdt.ui.prefs
Normal file
61
gerrit-gwtui/.settings/org.eclipse.jdt.ui.prefs
Normal file
@@ -0,0 +1,61 @@
|
||||
#Wed Jul 29 11:31:38 PDT 2009
|
||||
eclipse.preferences.version=1
|
||||
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||
formatter_profile=_Google Format
|
||||
formatter_settings_version=11
|
||||
org.eclipse.jdt.ui.ignorelowercasenames=true
|
||||
org.eclipse.jdt.ui.importorder=com.google;com;junit;net;org;java;javax;
|
||||
org.eclipse.jdt.ui.ondemandthreshold=99
|
||||
org.eclipse.jdt.ui.staticondemandthreshold=99
|
||||
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
|
||||
sp_cleanup.add_default_serial_version_id=true
|
||||
sp_cleanup.add_generated_serial_version_id=false
|
||||
sp_cleanup.add_missing_annotations=false
|
||||
sp_cleanup.add_missing_deprecated_annotations=true
|
||||
sp_cleanup.add_missing_methods=false
|
||||
sp_cleanup.add_missing_nls_tags=false
|
||||
sp_cleanup.add_missing_override_annotations=true
|
||||
sp_cleanup.add_serial_version_id=false
|
||||
sp_cleanup.always_use_blocks=true
|
||||
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||
sp_cleanup.always_use_this_for_non_static_field_access=false
|
||||
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||
sp_cleanup.convert_to_enhanced_for_loop=false
|
||||
sp_cleanup.correct_indentation=false
|
||||
sp_cleanup.format_source_code=false
|
||||
sp_cleanup.format_source_code_changes_only=false
|
||||
sp_cleanup.make_local_variable_final=true
|
||||
sp_cleanup.make_parameters_final=true
|
||||
sp_cleanup.make_private_fields_final=true
|
||||
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||
sp_cleanup.make_variable_declarations_final=false
|
||||
sp_cleanup.never_use_blocks=false
|
||||
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||
sp_cleanup.on_save_use_additional_actions=true
|
||||
sp_cleanup.organize_imports=false
|
||||
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||
sp_cleanup.remove_private_constructors=true
|
||||
sp_cleanup.remove_trailing_whitespaces=true
|
||||
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||
sp_cleanup.remove_unnecessary_casts=false
|
||||
sp_cleanup.remove_unnecessary_nls_tags=false
|
||||
sp_cleanup.remove_unused_imports=false
|
||||
sp_cleanup.remove_unused_local_variables=false
|
||||
sp_cleanup.remove_unused_private_fields=true
|
||||
sp_cleanup.remove_unused_private_members=false
|
||||
sp_cleanup.remove_unused_private_methods=true
|
||||
sp_cleanup.remove_unused_private_types=true
|
||||
sp_cleanup.sort_members=false
|
||||
sp_cleanup.sort_members_all=false
|
||||
sp_cleanup.use_blocks=false
|
||||
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||
sp_cleanup.use_parentheses_in_expressions=false
|
||||
sp_cleanup.use_this_for_non_static_field_access=false
|
||||
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||
sp_cleanup.use_this_for_non_static_method_access=false
|
||||
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
259
gerrit-gwtui/pom.xml
Normal file
259
gerrit-gwtui/pom.xml
Normal file
@@ -0,0 +1,259 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 The Android Open Source Project
|
||||
|
||||
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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-parent</artifactId>
|
||||
<version>2.0.25-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>gerrit-gwtui</artifactId>
|
||||
<name>Gerrit Code Review - GWT UI</name>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<description>
|
||||
Web interface built on top of Google Web Toolkit
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-user</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>gwtexpui</groupId>
|
||||
<artifactId>gwtexpui</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>gwtexpui</groupId>
|
||||
<artifactId>gwtexpui</artifactId>
|
||||
<scope>compile</scope>
|
||||
<classifier>sources</classifier>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>gwtjsonrpc</groupId>
|
||||
<artifactId>gwtjsonrpc</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>gwtjsonrpc</groupId>
|
||||
<artifactId>gwtjsonrpc</artifactId>
|
||||
<scope>compile</scope>
|
||||
<classifier>sources</classifier>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>gwtorm</groupId>
|
||||
<artifactId>gwtorm</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>gwtorm</groupId>
|
||||
<artifactId>gwtorm</artifactId>
|
||||
<scope>compile</scope>
|
||||
<classifier>sources</classifier>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-reviewdb</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-reviewdb</artifactId>
|
||||
<scope>compile</scope>
|
||||
<classifier>sources</classifier>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-common</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-common</artifactId>
|
||||
<scope>compile</scope>
|
||||
<classifier>sources</classifier>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-patch-jgit</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-patch-jgit</artifactId>
|
||||
<scope>compile</scope>
|
||||
<classifier>sources</classifier>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse</groupId>
|
||||
<artifactId>jgit</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse</groupId>
|
||||
<artifactId>jgit</artifactId>
|
||||
<scope>compile</scope>
|
||||
<classifier>sources</classifier>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-patch-gwtexpui</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-patch-gwtexpui</artifactId>
|
||||
<scope>compile</scope>
|
||||
<classifier>sources</classifier>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
<configuration>
|
||||
<module>com.google.gerrit.GerritGwtUI</module>
|
||||
<extraJvmArgs>-Xmx512m</extraJvmArgs>
|
||||
<style>${gwtStyle}</style>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>get-keyapplet</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>gerrit</groupId>
|
||||
<artifactId>gerrit-keyapplet</artifactId>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${project.build.directory}/gerrit-keyapplet</outputDirectory>
|
||||
<includes>**/*</includes>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<packagingExcludes>WEB-INF/classes/**,WEB-INF/lib/**</packagingExcludes>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compress-html</id>
|
||||
<phase>process-classes</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<property name="dst" location="${project.build.directory}/${project.build.finalName}"/>
|
||||
<property name="app" location="${dst}/gerrit"/>
|
||||
|
||||
<mkdir dir="${app}"/>
|
||||
<apply executable="gzip" addsourcefile="false">
|
||||
<arg value="-9"/>
|
||||
<fileset dir="${app}"
|
||||
includes="**/*.html,**/*.css"/>
|
||||
<redirector>
|
||||
<inputmapper type="glob" from="*" to="${app}/*"/>
|
||||
<outputmapper type="glob" from="*" to="${app}/*.gz"/>
|
||||
</redirector>
|
||||
</apply>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>include-keyapplet</id>
|
||||
<phase>process-classes</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<property name="dst" location="${project.build.directory}/${project.build.finalName}"/>
|
||||
<property name="app" location="${dst}/gerrit"/>
|
||||
<property name="src" location="${basedir}/target/gerrit-keyapplet" />
|
||||
|
||||
<mkdir dir="${app}"/>
|
||||
<zip
|
||||
destfile="${app}/gerrit-keyapplet.cache.jar"
|
||||
compress="true"
|
||||
level="9">
|
||||
<fileset dir="${src}" includes="**/*" />
|
||||
</zip>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@@ -16,17 +16,16 @@
|
||||
<module rename-to="gerrit">
|
||||
<inherits name='com.google.gwt.user.User'/>
|
||||
<inherits name='com.google.gwt.user.theme.chrome.Chrome'/>
|
||||
<inherits name='com.google.gwtjsonrpc.GWTJSONRPC'/>
|
||||
<inherits name='com.google.gwtorm.GWTORM'/>
|
||||
<inherits name='com.google.gwtexpui.css.CSS'/>
|
||||
<inherits name='com.google.gwtexpui.clippy.Clippy'/>
|
||||
<inherits name='com.google.gwtexpui.globalkey.GlobalKey'/>
|
||||
<inherits name='com.google.gwtexpui.progress.Progress'/>
|
||||
<inherits name='com.google.gwtexpui.safehtml.SafeHtml'/>
|
||||
<inherits name='com.google.gwtexpui.safehtml.PrettyFormatter'/>
|
||||
<inherits name='com.google.gerrit.Common'/>
|
||||
<inherits name='com.google.gerrit.UserAgent'/>
|
||||
<inherits name='org.eclipse.jgit.JGit'/>
|
||||
<stylesheet src='gerrit.css' />
|
||||
<stylesheet src='prettify20090521/prettify.css' />
|
||||
<extend-property name="locale" values="en"/>
|
||||
|
||||
<entry-point class='com.google.gerrit.client.Gerrit'/>
|
@@ -14,8 +14,8 @@
|
||||
|
||||
package com.google.gerrit.client;
|
||||
|
||||
import com.google.gerrit.client.data.AccountInfo;
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.common.data.AccountInfo;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
@@ -16,14 +16,18 @@ package com.google.gerrit.client;
|
||||
|
||||
import com.google.gerrit.client.auth.openid.OpenIdSignInDialog;
|
||||
import com.google.gerrit.client.auth.userpass.UserPassSignInDialog;
|
||||
import com.google.gerrit.client.data.GerritConfig;
|
||||
import com.google.gerrit.client.data.SystemInfoService;
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.AccountGeneralPreferences;
|
||||
import com.google.gerrit.client.rpc.GerritCallback;
|
||||
import com.google.gerrit.client.ui.LinkMenuBar;
|
||||
import com.google.gerrit.client.ui.LinkMenuItem;
|
||||
import com.google.gerrit.client.ui.Screen;
|
||||
import com.google.gerrit.common.Version;
|
||||
import com.google.gerrit.common.PageLinks;
|
||||
import com.google.gerrit.common.auth.SignInMode;
|
||||
import com.google.gerrit.common.data.GerritConfig;
|
||||
import com.google.gerrit.common.data.HostPageData;
|
||||
import com.google.gerrit.common.data.SystemInfoService;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.AccountGeneralPreferences;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
@@ -141,7 +145,7 @@ public class Gerrit implements EntryPoint {
|
||||
break;
|
||||
|
||||
case OPENID:
|
||||
new OpenIdSignInDialog(SignInDialog.Mode.SIGN_IN, null).center();
|
||||
new OpenIdSignInDialog(SignInMode.SIGN_IN, null).center();
|
||||
break;
|
||||
|
||||
case LDAP:
|
||||
@@ -274,7 +278,7 @@ public class Gerrit implements EntryPoint {
|
||||
public static String getVersion() {
|
||||
if (myVersion == null) {
|
||||
if (GWT.isScript()) {
|
||||
final GerritVersion v = GWT.create(GerritVersion.class);
|
||||
final Version v = GWT.create(Version.class);
|
||||
myVersion = v.version();
|
||||
} else {
|
||||
myVersion = "dev";
|
||||
@@ -291,14 +295,14 @@ public class Gerrit implements EntryPoint {
|
||||
sg.getElement().getParentElement().removeChild(sg.getElement());
|
||||
RootPanel.detachNow(sg);
|
||||
|
||||
History.addValueChangeHandler(new Link());
|
||||
History.addValueChangeHandler(new HistoryHandler());
|
||||
JumpKeys.register(body);
|
||||
|
||||
if ("".equals(History.getToken())) {
|
||||
if (isSignedIn()) {
|
||||
History.newItem(Link.MINE);
|
||||
History.newItem(PageLinks.MINE);
|
||||
} else {
|
||||
History.newItem(Link.ALL_OPEN);
|
||||
History.newItem(PageLinks.ALL_OPEN);
|
||||
}
|
||||
} else {
|
||||
History.fireCurrentHistoryState();
|
||||
@@ -313,16 +317,16 @@ public class Gerrit implements EntryPoint {
|
||||
LinkMenuBar m;
|
||||
|
||||
m = new LinkMenuBar();
|
||||
addLink(m, C.menuAllOpen(), Link.ALL_OPEN);
|
||||
addLink(m, C.menuAllMerged(), Link.ALL_MERGED);
|
||||
addLink(m, C.menuAllAbandoned(), Link.ALL_ABANDONED);
|
||||
addLink(m, C.menuAllOpen(), PageLinks.ALL_OPEN);
|
||||
addLink(m, C.menuAllMerged(), PageLinks.ALL_MERGED);
|
||||
addLink(m, C.menuAllAbandoned(), PageLinks.ALL_ABANDONED);
|
||||
menuLeft.add(m, C.menuAll());
|
||||
|
||||
if (signedIn) {
|
||||
m = new LinkMenuBar();
|
||||
addLink(m, C.menuMyChanges(), Link.MINE);
|
||||
addLink(m, C.menyMyDrafts(), Link.MINE_DRAFTS);
|
||||
addLink(m, C.menuMyStarredChanges(), Link.MINE_STARRED);
|
||||
addLink(m, C.menuMyChanges(), PageLinks.MINE);
|
||||
addLink(m, C.menyMyDrafts(), PageLinks.MINE_DRAFTS);
|
||||
addLink(m, C.menuMyStarredChanges(), PageLinks.MINE_STARRED);
|
||||
menuLeft.add(m, C.menuMine());
|
||||
menuLeft.selectTab(1);
|
||||
} else {
|
||||
@@ -331,14 +335,14 @@ public class Gerrit implements EntryPoint {
|
||||
|
||||
if (signedIn) {
|
||||
m = new LinkMenuBar();
|
||||
addLink(m, C.menuGroups(), Link.ADMIN_GROUPS);
|
||||
addLink(m, C.menuProjects(), Link.ADMIN_PROJECTS);
|
||||
addLink(m, C.menuGroups(), PageLinks.ADMIN_GROUPS);
|
||||
addLink(m, C.menuProjects(), PageLinks.ADMIN_PROJECTS);
|
||||
menuLeft.add(m, C.menuAdmin());
|
||||
}
|
||||
|
||||
if (signedIn) {
|
||||
whoAmI();
|
||||
addLink(menuRight, C.menuSettings(), Link.SETTINGS);
|
||||
addLink(menuRight, C.menuSettings(), PageLinks.SETTINGS);
|
||||
menuRight.add(anchor(C.menuSignOut(), "logout"));
|
||||
} else {
|
||||
switch (getConfig().getAuthType()) {
|
||||
@@ -349,7 +353,7 @@ public class Gerrit implements EntryPoint {
|
||||
case OPENID:
|
||||
menuRight.addItem(C.menuRegister(), new Command() {
|
||||
public void execute() {
|
||||
new OpenIdSignInDialog(SignInDialog.Mode.REGISTER, null).center();
|
||||
new OpenIdSignInDialog(SignInMode.REGISTER, null).center();
|
||||
}
|
||||
});
|
||||
// fall through
|
@@ -14,6 +14,17 @@
|
||||
|
||||
package com.google.gerrit.client;
|
||||
|
||||
import static com.google.gerrit.common.PageLinks.ADMIN_GROUPS;
|
||||
import static com.google.gerrit.common.PageLinks.ADMIN_PROJECTS;
|
||||
import static com.google.gerrit.common.PageLinks.ALL_OPEN;
|
||||
import static com.google.gerrit.common.PageLinks.MINE;
|
||||
import static com.google.gerrit.common.PageLinks.MINE_DRAFTS;
|
||||
import static com.google.gerrit.common.PageLinks.MINE_STARRED;
|
||||
import static com.google.gerrit.common.PageLinks.REGISTER;
|
||||
import static com.google.gerrit.common.PageLinks.SETTINGS;
|
||||
import static com.google.gerrit.common.PageLinks.SETTINGS_NEW_AGREEMENT;
|
||||
import static com.google.gerrit.common.PageLinks.SETTINGS_WEBIDENT;
|
||||
|
||||
import com.google.gerrit.client.account.AccountSettings;
|
||||
import com.google.gerrit.client.account.NewAgreementScreen;
|
||||
import com.google.gerrit.client.account.RegisterScreen;
|
||||
@@ -36,61 +47,22 @@ import com.google.gerrit.client.changes.ChangeScreen;
|
||||
import com.google.gerrit.client.changes.MineDraftsScreen;
|
||||
import com.google.gerrit.client.changes.MineStarredScreen;
|
||||
import com.google.gerrit.client.changes.PublishCommentScreen;
|
||||
import com.google.gerrit.client.data.AccountInfo;
|
||||
import com.google.gerrit.client.data.ChangeInfo;
|
||||
import com.google.gerrit.client.patches.PatchScreen;
|
||||
import com.google.gerrit.client.reviewdb.Account;
|
||||
import com.google.gerrit.client.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.client.reviewdb.Patch;
|
||||
import com.google.gerrit.client.reviewdb.PatchSet;
|
||||
import com.google.gerrit.client.reviewdb.Project;
|
||||
import com.google.gerrit.client.reviewdb.Change.Status;
|
||||
import com.google.gerrit.client.ui.Screen;
|
||||
import com.google.gerrit.common.auth.SignInMode;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.Patch;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gerrit.reviewdb.Change.Status;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeEvent;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeHandler;
|
||||
import com.google.gwtorm.client.KeyUtil;
|
||||
|
||||
public class Link implements ValueChangeHandler<String> {
|
||||
public static final String SETTINGS = "settings";
|
||||
public static final String SETTINGS_SSHKEYS = "settings,ssh-keys";
|
||||
public static final String SETTINGS_WEBIDENT = "settings,web-identities";
|
||||
public static final String SETTINGS_MYGROUPS = "settings,group-memberships";
|
||||
public static final String SETTINGS_AGREEMENTS = "settings,agreements";
|
||||
public static final String SETTINGS_CONTACT = "settings,contact";
|
||||
public static final String SETTINGS_PROJECTS = "settings,projects";
|
||||
public static final String SETTINGS_NEW_AGREEMENT = "settings,new-agreement";
|
||||
public static final String REGISTER = "register";
|
||||
|
||||
public static final String MINE = "mine";
|
||||
public static final String MINE_STARRED = "mine,starred";
|
||||
public static final String MINE_DRAFTS = "mine,drafts";
|
||||
|
||||
public static final String ALL_ABANDONED = "all,abandoned,n,z";
|
||||
public static final String ALL_MERGED = "all,merged,n,z";
|
||||
public static final String ALL_OPEN = "all,open,n,z";
|
||||
|
||||
public static final String ADMIN_PEOPLE = "admin,people";
|
||||
public static final String ADMIN_GROUPS = "admin,groups";
|
||||
public static final String ADMIN_PROJECTS = "admin,projects";
|
||||
|
||||
public static String toChange(final ChangeInfo c) {
|
||||
return toChange(c.getId());
|
||||
}
|
||||
|
||||
public static String toChange(final Change.Id c) {
|
||||
return "change," + c.toString();
|
||||
}
|
||||
|
||||
public static String toAccountDashboard(final AccountInfo acct) {
|
||||
return toAccountDashboard(acct.getId());
|
||||
}
|
||||
|
||||
public static String toAccountDashboard(final Account.Id acct) {
|
||||
return "dashboard," + acct.toString();
|
||||
}
|
||||
|
||||
public class HistoryHandler implements ValueChangeHandler<String> {
|
||||
public static String toPatchSideBySide(final Patch.Key id) {
|
||||
return toPatch("sidebyside", id);
|
||||
}
|
||||
@@ -126,10 +98,6 @@ public class Link implements ValueChangeHandler<String> {
|
||||
}
|
||||
}
|
||||
|
||||
public static String toChangeQuery(final String query) {
|
||||
return "q," + KeyUtil.encode(query) + ",n,z";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onValueChange(final ValueChangeEvent<String> event) {
|
||||
final String token = event.getValue();
|
||||
@@ -295,7 +263,7 @@ public class Link implements ValueChangeHandler<String> {
|
||||
p = "SignInFailure,";
|
||||
if (token.startsWith(p)) {
|
||||
final String[] args = skip(p, token).split(",");
|
||||
final SignInDialog.Mode mode = SignInDialog.Mode.valueOf(args[0]);
|
||||
final SignInMode mode = SignInMode.valueOf(args[0]);
|
||||
final String msg = KeyUtil.decode(args[1]);
|
||||
switch (Gerrit.getConfig().getAuthType()) {
|
||||
case OPENID:
|
@@ -14,6 +14,7 @@
|
||||
|
||||
package com.google.gerrit.client;
|
||||
|
||||
import com.google.gerrit.common.data.HostPageData;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.HostPageCache;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
@@ -14,6 +14,7 @@
|
||||
|
||||
package com.google.gerrit.client;
|
||||
|
||||
import com.google.gerrit.common.PageLinks;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwtexpui.globalkey.client.CompoundKeyCommand;
|
||||
@@ -28,13 +29,13 @@ class JumpKeys {
|
||||
jumps.add(new KeyCommand(0, 'o', Gerrit.C.jumpAllOpen()) {
|
||||
@Override
|
||||
public void onKeyPress(final KeyPressEvent event) {
|
||||
Gerrit.display(Link.ALL_OPEN, true);
|
||||
Gerrit.display(PageLinks.ALL_OPEN, true);
|
||||
}
|
||||
});
|
||||
jumps.add(new KeyCommand(0, 'm', Gerrit.C.jumpAllMerged()) {
|
||||
@Override
|
||||
public void onKeyPress(final KeyPressEvent event) {
|
||||
Gerrit.display(Link.ALL_MERGED, true);
|
||||
Gerrit.display(PageLinks.ALL_MERGED, true);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -42,19 +43,19 @@ class JumpKeys {
|
||||
jumps.add(new KeyCommand(0, 'i', Gerrit.C.jumpMine()) {
|
||||
@Override
|
||||
public void onKeyPress(final KeyPressEvent event) {
|
||||
Gerrit.display(Link.MINE, true);
|
||||
Gerrit.display(PageLinks.MINE, true);
|
||||
}
|
||||
});
|
||||
jumps.add(new KeyCommand(0, 'd', Gerrit.C.jumpMineDrafts()) {
|
||||
@Override
|
||||
public void onKeyPress(final KeyPressEvent event) {
|
||||
Gerrit.display(Link.MINE_DRAFTS, true);
|
||||
Gerrit.display(PageLinks.MINE_DRAFTS, true);
|
||||
}
|
||||
});
|
||||
jumps.add(new KeyCommand(0, 's', Gerrit.C.jumpMineStarred()) {
|
||||
@Override
|
||||
public void onKeyPress(final KeyPressEvent event) {
|
||||
Gerrit.display(Link.MINE_STARRED, true);
|
||||
Gerrit.display(PageLinks.MINE_STARRED, true);
|
||||
}
|
||||
});
|
||||
}
|
@@ -15,7 +15,8 @@
|
||||
package com.google.gerrit.client;
|
||||
|
||||
import com.google.gerrit.client.changes.ChangeScreen;
|
||||
import com.google.gerrit.client.reviewdb.Change;
|
||||
import com.google.gerrit.common.PageLinks;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gwt.event.dom.client.BlurEvent;
|
||||
import com.google.gwt.event.dom.client.BlurHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
@@ -136,9 +137,9 @@ class SearchPanel extends Composite {
|
||||
|
||||
if (query.matches("^[1-9][0-9]*$")) {
|
||||
final Change.Id ck = Change.Id.parse(query);
|
||||
Gerrit.display(Link.toChange(ck), new ChangeScreen(ck));
|
||||
Gerrit.display(PageLinks.toChange(ck), new ChangeScreen(ck));
|
||||
} else {
|
||||
Gerrit.display(Link.toChangeQuery(query), true);
|
||||
Gerrit.display(PageLinks.toChangeQuery(query), true);
|
||||
}
|
||||
}
|
||||
}
|
@@ -14,22 +14,19 @@
|
||||
|
||||
package com.google.gerrit.client;
|
||||
|
||||
import com.google.gerrit.common.auth.SignInMode;
|
||||
import com.google.gwtexpui.user.client.AutoCenterDialogBox;
|
||||
|
||||
/** Prompts the user to sign in to their account. */
|
||||
public abstract class SignInDialog extends AutoCenterDialogBox {
|
||||
public static enum Mode {
|
||||
SIGN_IN, LINK_IDENTIY, REGISTER;
|
||||
}
|
||||
|
||||
protected final SignInDialog.Mode mode;
|
||||
protected final SignInMode mode;
|
||||
|
||||
/**
|
||||
* Create a new dialog to handle user sign in.
|
||||
*
|
||||
* @param signInMode type of mode the login will perform.
|
||||
*/
|
||||
protected SignInDialog(final Mode signInMode) {
|
||||
protected SignInDialog(final SignInMode signInMode) {
|
||||
super(/* auto hide */true, /* modal */true);
|
||||
mode = signInMode;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user