Update bazlets to latest stable-3.0 Remove GWT examples. Change-Id: I8bb35edda5d639378b23b7398bdd1a611f2c9356
diff --git a/BUILD b/BUILD index c0edb29..41c9ddd 100644 --- a/BUILD +++ b/BUILD
@@ -30,14 +30,6 @@ "//example-webLinkFileHistory", "//example-webLinkPatchSet", "//example-webLinkProject", - "//example-wuiChangeScreenBelowChangeInfoBlock-GWT", - "//example-wuiChangeScreenHeader-GWT", - "//example-wuiChangeScreenHeaderRightOfButtons-GWT", - "//example-wuiChangeScreenHeaderRightOfPopDowns-GWT", - "//example-wuiPluginScreen-GWT", - "//example-wuiPreferenceScreenBottom-GWT", - "//example-wuiProfileExtensionBottom-GWT", - "//example-wuiSettingsScreen-GWT", ], outs = ["all.zip"], cmd = " && ".join([
diff --git a/WORKSPACE b/WORKSPACE index 541e54f..1cd1cc9 100644 --- a/WORKSPACE +++ b/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", ) @@ -19,15 +19,8 @@ # "gerrit_api_maven_local", #) -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - # Load release Plugin API gerrit_api() # Load snapshot Plugin API #gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-adminSshCommand/WORKSPACE b/example-adminSshCommand/WORKSPACE index 3cacf24..a5abc61 100644 --- a/example-adminSshCommand/WORKSPACE +++ b/example-adminSshCommand/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-changeHasOperator/WORKSPACE b/example-changeHasOperator/WORKSPACE index 3bfa5a1..210e00f 100644 --- a/example-changeHasOperator/WORKSPACE +++ b/example-changeHasOperator/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-changeOperator/WORKSPACE b/example-changeOperator/WORKSPACE index 241bbea..f543198 100644 --- a/example-changeOperator/WORKSPACE +++ b/example-changeOperator/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-changeQueryAttributes/WORKSPACE b/example-changeQueryAttributes/WORKSPACE index e8de92c..2fafee6 100644 --- a/example-changeQueryAttributes/WORKSPACE +++ b/example-changeQueryAttributes/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-changeQueryAttributes/src/main/java/com/googlesource/gerrit/plugins/examples/changequeryattributes/AttributeFactory.java b/example-changeQueryAttributes/src/main/java/com/googlesource/gerrit/plugins/examples/changequeryattributes/AttributeFactory.java index dbf4e43..e67d5c9 100644 --- a/example-changeQueryAttributes/src/main/java/com/googlesource/gerrit/plugins/examples/changequeryattributes/AttributeFactory.java +++ b/example-changeQueryAttributes/src/main/java/com/googlesource/gerrit/plugins/examples/changequeryattributes/AttributeFactory.java
@@ -15,9 +15,9 @@ package com.googlesource.gerrit.plugins.examples.changequeryattributes; import com.google.gerrit.extensions.common.PluginDefinedInfo; +import com.google.gerrit.server.DynamicOptions.BeanProvider; +import com.google.gerrit.server.change.ChangeAttributeFactory; import com.google.gerrit.server.query.change.ChangeData; -import com.google.gerrit.server.query.change.ChangeQueryProcessor; -import com.google.gerrit.server.query.change.ChangeQueryProcessor.ChangeAttributeFactory; public class AttributeFactory implements ChangeAttributeFactory { @@ -32,7 +32,7 @@ } @Override - public PluginDefinedInfo create(ChangeData c, ChangeQueryProcessor qp, String plugin) { + public PluginDefinedInfo create(ChangeData c, BeanProvider bp, String plugin) { return new PluginAttribute(c); } }
diff --git a/example-changeQueryAttributes/src/main/java/com/googlesource/gerrit/plugins/examples/changequeryattributes/Module.java b/example-changeQueryAttributes/src/main/java/com/googlesource/gerrit/plugins/examples/changequeryattributes/Module.java index f01989d..9db4619 100644 --- a/example-changeQueryAttributes/src/main/java/com/googlesource/gerrit/plugins/examples/changequeryattributes/Module.java +++ b/example-changeQueryAttributes/src/main/java/com/googlesource/gerrit/plugins/examples/changequeryattributes/Module.java
@@ -15,7 +15,7 @@ package com.googlesource.gerrit.plugins.examples.changequeryattributes; import com.google.gerrit.extensions.annotations.Exports; -import com.google.gerrit.server.query.change.ChangeQueryProcessor.ChangeAttributeFactory; +import com.google.gerrit.server.change.ChangeAttributeFactory; import com.google.inject.AbstractModule; public class Module extends AbstractModule {
diff --git a/example-commitValidator/WORKSPACE b/example-commitValidator/WORKSPACE index 8075bc0..332dd62 100644 --- a/example-commitValidator/WORKSPACE +++ b/example-commitValidator/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-consoleMetricReporter/WORKSPACE b/example-consoleMetricReporter/WORKSPACE index 7cc23b4..c392a47 100644 --- a/example-consoleMetricReporter/WORKSPACE +++ b/example-consoleMetricReporter/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-deployedOnIncludedInExtension/WORKSPACE b/example-deployedOnIncludedInExtension/WORKSPACE index d5e6861..703939e 100644 --- a/example-deployedOnIncludedInExtension/WORKSPACE +++ b/example-deployedOnIncludedInExtension/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-restApiCommandOption/WORKSPACE b/example-restApiCommandOption/WORKSPACE index 31c206a..1f5c34f 100644 --- a/example-restApiCommandOption/WORKSPACE +++ b/example-restApiCommandOption/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-restApiGetRevision/WORKSPACE b/example-restApiGetRevision/WORKSPACE index 1638a80..c48fce8 100644 --- a/example-restApiGetRevision/WORKSPACE +++ b/example-restApiGetRevision/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-restApiPostProject/WORKSPACE b/example-restApiPostProject/WORKSPACE index 36b64d1..bc56e4b 100644 --- a/example-restApiPostProject/WORKSPACE +++ b/example-restApiPostProject/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-restApiPostRevision/WORKSPACE b/example-restApiPostRevision/WORKSPACE index 8edc777..978c4eb 100644 --- a/example-restApiPostRevision/WORKSPACE +++ b/example-restApiPostRevision/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-servlet/WORKSPACE b/example-servlet/WORKSPACE index c343747..f901950 100644 --- a/example-servlet/WORKSPACE +++ b/example-servlet/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-simpleSshCommand/WORKSPACE b/example-simpleSshCommand/WORKSPACE index d509de5..26fb228 100644 --- a/example-simpleSshCommand/WORKSPACE +++ b/example-simpleSshCommand/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-sshAndRestCommandOptionBeanParseListener/WORKSPACE b/example-sshAndRestCommandOptionBeanParseListener/WORKSPACE index 2cfadab..0c7702e 100644 --- a/example-sshAndRestCommandOptionBeanParseListener/WORKSPACE +++ b/example-sshAndRestCommandOptionBeanParseListener/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-sshCommandAlias/WORKSPACE b/example-sshCommandAlias/WORKSPACE index d509de5..26fb228 100644 --- a/example-sshCommandAlias/WORKSPACE +++ b/example-sshCommandAlias/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-sshCommandDelegateDynamicBean/WORKSPACE b/example-sshCommandDelegateDynamicBean/WORKSPACE index e24adca..0cd4580 100644 --- a/example-sshCommandDelegateDynamicBean/WORKSPACE +++ b/example-sshCommandDelegateDynamicBean/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-sshCommandOption/WORKSPACE b/example-sshCommandOption/WORKSPACE index 54b640d..3479e41 100644 --- a/example-sshCommandOption/WORKSPACE +++ b/example-sshCommandOption/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-topMenu/WORKSPACE b/example-topMenu/WORKSPACE index d509de5..26fb228 100644 --- a/example-topMenu/WORKSPACE +++ b/example-topMenu/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-usageDataLogger/WORKSPACE b/example-usageDataLogger/WORKSPACE index a8084d7..ed4388e 100644 --- a/example-usageDataLogger/WORKSPACE +++ b/example-usageDataLogger/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-validationListenerAssignee/WORKSPACE b/example-validationListenerAssignee/WORKSPACE index a6a6aae..60a936f 100644 --- a/example-validationListenerAssignee/WORKSPACE +++ b/example-validationListenerAssignee/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-validationListenerAssignee/src/main/java/com/googlesource/gerrit/plugins/examples/validationlistenerassignee/AssigneeValidator.java b/example-validationListenerAssignee/src/main/java/com/googlesource/gerrit/plugins/examples/validationlistenerassignee/AssigneeValidator.java index 5de9af0..61d8926 100644 --- a/example-validationListenerAssignee/src/main/java/com/googlesource/gerrit/plugins/examples/validationlistenerassignee/AssigneeValidator.java +++ b/example-validationListenerAssignee/src/main/java/com/googlesource/gerrit/plugins/examples/validationlistenerassignee/AssigneeValidator.java
@@ -14,6 +14,7 @@ package com.googlesource.gerrit.plugins.examples.validationlistenerassignee; +import com.google.gerrit.exceptions.StorageException; import com.google.gerrit.index.query.QueryParseException; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.Change; @@ -21,7 +22,6 @@ import com.google.gerrit.server.query.change.ChangeQueryProcessor; import com.google.gerrit.server.validators.AssigneeValidationListener; import com.google.gerrit.server.validators.ValidationException; -import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import java.io.IOException; import org.eclipse.jgit.errors.ConfigInvalidException; @@ -48,7 +48,7 @@ throw new ValidationException( "Cannot assign user to more than " + MAX_ASSIGNED_CHANGES + " changes"); } - } catch (OrmException | IOException | ConfigInvalidException | QueryParseException e) { + } catch (StorageException | IOException | ConfigInvalidException | QueryParseException e) { log.error("Failed to validate assignee for change " + change.getId(), e); // Allow assignee. }
diff --git a/example-validationListenerCommit/WORKSPACE b/example-validationListenerCommit/WORKSPACE index 57364e5..c11391b 100644 --- a/example-validationListenerCommit/WORKSPACE +++ b/example-validationListenerCommit/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-validationListenerHashtag/WORKSPACE b/example-validationListenerHashtag/WORKSPACE index 68f8e1b..5515954 100644 --- a/example-validationListenerHashtag/WORKSPACE +++ b/example-validationListenerHashtag/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-validationListenerMerge/WORKSPACE b/example-validationListenerMerge/WORKSPACE index fb8fe0a..0df7caa 100644 --- a/example-validationListenerMerge/WORKSPACE +++ b/example-validationListenerMerge/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-validationListenerNewProjectCreated/WORKSPACE b/example-validationListenerNewProjectCreated/WORKSPACE index 4588ca1..59b7b63 100644 --- a/example-validationListenerNewProjectCreated/WORKSPACE +++ b/example-validationListenerNewProjectCreated/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-validationListenerRefOperation/WORKSPACE b/example-validationListenerRefOperation/WORKSPACE index 5c40730..158f9f4 100644 --- a/example-validationListenerRefOperation/WORKSPACE +++ b/example-validationListenerRefOperation/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-validationListenerUpload/WORKSPACE b/example-validationListenerUpload/WORKSPACE index 7eb0a1a..083e583 100644 --- a/example-validationListenerUpload/WORKSPACE +++ b/example-validationListenerUpload/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-webLinkBranch/WORKSPACE b/example-webLinkBranch/WORKSPACE index f54c13a..de4c8c2 100644 --- a/example-webLinkBranch/WORKSPACE +++ b/example-webLinkBranch/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-webLinkFileHistory/WORKSPACE b/example-webLinkFileHistory/WORKSPACE index d509de5..26fb228 100644 --- a/example-webLinkFileHistory/WORKSPACE +++ b/example-webLinkFileHistory/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-webLinkPatchSet/WORKSPACE b/example-webLinkPatchSet/WORKSPACE index d509de5..26fb228 100644 --- a/example-webLinkPatchSet/WORKSPACE +++ b/example-webLinkPatchSet/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-webLinkProject/WORKSPACE b/example-webLinkProject/WORKSPACE index d509de5..26fb228 100644 --- a/example-webLinkProject/WORKSPACE +++ b/example-webLinkProject/WORKSPACE
@@ -3,7 +3,7 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", + commit = "ca31f016a3130c3eeb032538d2832bf555559b28", # local_path = "/home/<user>/projects/bazlets", )
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/.bazelrc b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/.bazelrc deleted file mode 100644 index 4ed16cf..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command=./tools/workspace-status.sh -test --build_tests_only
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/BUILD b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/BUILD deleted file mode 100644 index 0b72aa6..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/BUILD +++ /dev/null
@@ -1,15 +0,0 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") - -MODULE = "com.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock.HelloForm" - -gerrit_plugin( - name = "example-wuiChangeScreenBelowChangeInfoBlock-GWT", - srcs = glob(["src/main/java/**/*.java"]), - gwt_module = MODULE, - manifest_entries = [ - "Gerrit-PluginName: example-wuiChangeScreenBelowChangeInfoBlock-GWT", - "Gerrit-Module: com.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock.Module", - "Implementation-Title: Example Change Screen Extension Below Change Info Block", - ], - resources = glob(["src/main/**/*"]), -)
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/LICENSE b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/LICENSE +++ /dev/null
@@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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.
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/WORKSPACE b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/WORKSPACE deleted file mode 100644 index 803e640..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/WORKSPACE +++ /dev/null
@@ -1,33 +0,0 @@ -workspace(name = "wuiChangeScreenBelowChangeInfoBlock") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", - # local_path = "/home/<user>/projects/bazlets", -) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/bazlets.bzl b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/bazlets.bzl deleted file mode 100644 index 6c4fffc..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/bazlets.bzl +++ /dev/null
@@ -1,19 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None - ): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/pom.xml b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/pom.xml deleted file mode 100644 index be081a9..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/pom.xml +++ /dev/null
@@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (C) 2013 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> - - <groupId>com.googlesource.gerrit.plugins</groupId> - <artifactId>example-wuiChangeScreenBelowChangeInfoBlock</artifactId> - <packaging>jar</packaging> - <version>2.16.13</version> - <properties> - <Gerrit-ApiType>plugin</Gerrit-ApiType> - <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion> - <GWT-Version>2.8.2</GWT-Version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <configuration> - <archive> - <manifestEntries> - <Gerrit-PluginName>example-wuiChangeScreenBelowChangeInfoBlock</Gerrit-PluginName> - <Gerrit-Module>com.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock.Module</Gerrit-Module> - - <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor> - <Implementation-URL>https://gerrit-review.googlesource.com/#/admin/projects/plugins/examples</Implementation-URL> - - <Implementation-Title>Example Change Screen Extension Below Change Info Block</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - - <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> - <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>gwt-maven-plugin</artifactId> - <version>${GWT-Version}</version> - <configuration> - <module>com.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock.HelloForm</module> - <disableClassMetadata>true</disableClassMetadata> - <disableCastChecking>true</disableCastChecking> - <webappDirectory>${project.build.directory}/classes/static</webappDirectory> - </configuration> - <executions> - <execution> - <goals> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-plugin-gwtui</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${GWT-Version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <repositories> - <repository> - <id>maven.org</id> - <url>http://repo1.maven.org/maven2</url> - </repository> - </repositories> -</project>
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/HelloForm.gwt.xml b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/HelloForm.gwt.xml deleted file mode 100644 index c15cafe..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/HelloForm.gwt.xml +++ /dev/null
@@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (C) 2017 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 rename-to="example"> - <!-- Inherit the core Web Toolkit stuff. --> - <inherits name="com.google.gwt.user.User"/> - <!-- Other module inherits --> - <inherits name="com.google.gerrit.GerritGwtUICommon"/> - <inherits name="com.google.gerrit.Plugin"/> - <inherits name="com.google.gwt.http.HTTP"/> - <inherits name="com.google.gwt.json.JSON"/> - <!-- Using GWT built-in themes adds a number of static --> - <!-- resources to the plugin. No theme inherits lines were --> - <!-- added in order to make this plugin as simple as possible --> - <!-- Specify the app entry point class. --> - <entry-point class="com.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock.client.ExamplePlugin"/> -</module>
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/Module.java b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/Module.java deleted file mode 100644 index 0000021..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/Module.java +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock; - -import com.google.gerrit.extensions.registration.DynamicSet; -import com.google.gerrit.extensions.webui.GwtPlugin; -import com.google.gerrit.extensions.webui.WebUiPlugin; -import com.google.inject.AbstractModule; - -public class Module extends AbstractModule { - - @Override - protected void configure() { - DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("example")); - } -}
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExampleChangeScreenExtension.java b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExampleChangeScreenExtension.java deleted file mode 100644 index eb7fcb1..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExampleChangeScreenExtension.java +++ /dev/null
@@ -1,57 +0,0 @@ -// Copyright (C) 2015 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.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.info.ChangeInfo; -import com.google.gerrit.client.info.ChangeInfo.RevisionInfo; -import com.google.gerrit.plugin.client.extension.Panel; -import com.google.gwt.user.client.ui.Grid; -import com.google.gwt.user.client.ui.HTMLTable.CellFormatter; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.gwtexpui.clippy.client.CopyableLabel; - -/** Extension for change screen that displays the numeric change ID with copy-to-clipboard icon. */ -public class ExampleChangeScreenExtension extends VerticalPanel { - static class Factory implements Panel.EntryPoint { - @Override - public void onLoad(Panel panel) { - panel.setWidget(new ExampleChangeScreenExtension(panel)); - } - } - - ExampleChangeScreenExtension(Panel panel) { - ChangeInfo change = panel.getObject(GerritUiExtensionPoint.Key.CHANGE_INFO).cast(); - RevisionInfo rev = panel.getObject(GerritUiExtensionPoint.Key.REVISION_INFO).cast(); - - Grid g = new Grid(2, 2); - g.addStyleName("infoBlock"); - CellFormatter fmt = g.getCellFormatter(); - - g.setText(0, 0, "Numeric Change ID"); - fmt.addStyleName(0, 0, "header"); - fmt.addStyleName(0, 0, "topmost"); - fmt.addStyleName(0, 1, "topmost"); - g.setWidget(0, 1, new CopyableLabel(Integer.toString(change._number()))); - add(g); - - g.setText(1, 0, "Patch Set ID"); - fmt.addStyleName(1, 0, "header"); - fmt.addStyleName(1, 0, "bottomheader"); - fmt.addStyleName(1, 1, "bottomheader"); - g.setWidget(1, 1, new CopyableLabel(String.valueOf(rev._number()))); - add(g); - } -}
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExampleChangeScreenExtensionTwo.java b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExampleChangeScreenExtensionTwo.java deleted file mode 100644 index bced2ca..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExampleChangeScreenExtensionTwo.java +++ /dev/null
@@ -1,57 +0,0 @@ -// Copyright (C) 2015 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.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.info.ChangeInfo; -import com.google.gerrit.client.info.ChangeInfo.RevisionInfo; -import com.google.gerrit.plugin.client.extension.Panel; -import com.google.gwt.user.client.ui.Grid; -import com.google.gwt.user.client.ui.HTMLTable.CellFormatter; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.gwtexpui.clippy.client.CopyableLabel; - -/** Extension for change screen that displays the numeric change ID with copy-to-clipboard icon. */ -public class ExampleChangeScreenExtensionTwo extends VerticalPanel { - static class Factory implements Panel.EntryPoint { - @Override - public void onLoad(Panel panel) { - panel.setWidget(new ExampleChangeScreenExtensionTwo(panel)); - } - } - - ExampleChangeScreenExtensionTwo(Panel panel) { - ChangeInfo change = panel.getObject(GerritUiExtensionPoint.Key.CHANGE_INFO).cast(); - RevisionInfo rev = panel.getObject(GerritUiExtensionPoint.Key.REVISION_INFO).cast(); - - Grid g = new Grid(2, 2); - g.addStyleName("infoBlock"); - CellFormatter fmt = g.getCellFormatter(); - - g.setText(0, 0, "(2) Numeric Change ID"); - fmt.addStyleName(0, 0, "header"); - fmt.addStyleName(0, 0, "topmost"); - fmt.addStyleName(0, 1, "topmost"); - g.setWidget(0, 1, new CopyableLabel(Integer.toString(change._number()))); - add(g); - - g.setText(1, 0, "(2) Patch Set ID"); - fmt.addStyleName(1, 0, "header"); - fmt.addStyleName(1, 0, "bottomheader"); - fmt.addStyleName(1, 1, "bottomheader"); - g.setWidget(1, 1, new CopyableLabel(String.valueOf(rev._number()))); - add(g); - } -}
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExamplePlugin.java b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExamplePlugin.java deleted file mode 100644 index 312c857..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenbelowchangeinfoblock/client/ExamplePlugin.java +++ /dev/null
@@ -1,39 +0,0 @@ -// Copyright (C) 2013 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.googlesource.gerrit.plugins.examples.wuichangescreenbelowchangeinfoblock.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.Resources; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.PluginEntryPoint; -import com.google.gwt.core.client.GWT; - -public class ExamplePlugin extends PluginEntryPoint { - public static final Resources RESOURCES = GWT.create(Resources.class); - - @Override - public void onPluginLoad() { - Plugin.get() - .panel( - GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK, - new ExampleChangeScreenExtension.Factory(), - "first"); - Plugin.get() - .panel( - GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK, - new ExampleChangeScreenExtensionTwo.Factory(), - "second"); - } -}
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/resources/Documentation/about.md b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/resources/Documentation/about.md deleted file mode 100644 index 1fed9b8..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1 +0,0 @@ -Sample plugin to demonstrate adding a Change Screen extension to Gerrit that is below the Change Info Block.
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/bzl/BUILD b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/bzl/BUILD deleted file mode 100644 index e69de29..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/bzl/BUILD +++ /dev/null
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/bzl/plugin.bzl b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/bzl/plugin.bzl deleted file mode 100644 index 89a1643..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,8 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _plugin_deps = "PLUGIN_DEPS", -) - -gerrit_plugin = _gerrit_plugin -PLUGIN_DEPS = _plugin_deps
diff --git a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/workspace-status.sh b/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/workspace-status.sh deleted file mode 100755 index 5650401..0000000 --- a/example-wuiChangeScreenBelowChangeInfoBlock-GWT/tools/workspace-status.sh +++ /dev/null
@@ -1,17 +0,0 @@ -#!/bin/bash - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -function rev() { - git describe --always --match "v[0-9].*" --dirty -} - -echo STABLE_BUILD_EXAMPLE-WUICHANGESCREENBELOWCHANGEINFOBLOCK-GWT_LABEL $(rev)
diff --git a/example-wuiChangeScreenHeader-GWT/.bazelrc b/example-wuiChangeScreenHeader-GWT/.bazelrc deleted file mode 100644 index 4ed16cf..0000000 --- a/example-wuiChangeScreenHeader-GWT/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command=./tools/workspace-status.sh -test --build_tests_only
diff --git a/example-wuiChangeScreenHeader-GWT/BUILD b/example-wuiChangeScreenHeader-GWT/BUILD deleted file mode 100644 index 5186969..0000000 --- a/example-wuiChangeScreenHeader-GWT/BUILD +++ /dev/null
@@ -1,15 +0,0 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") - -MODULE = "com.googlesource.gerrit.plugins.examples.wuichangescreenheader.HelloForm" - -gerrit_plugin( - name = "example-wuiChangeScreenHeader-GWT", - srcs = glob(["src/main/java/**/*.java"]), - gwt_module = MODULE, - manifest_entries = [ - "Gerrit-PluginName: example-wuiChangeScreenHeader-GWT", - "Gerrit-Module: com.googlesource.gerrit.plugins.examples.wuichangescreenheader.Module", - "Implementation-Title: Example Change Screen Header Extension", - ], - resources = glob(["src/main/**/*"]), -)
diff --git a/example-wuiChangeScreenHeader-GWT/LICENSE b/example-wuiChangeScreenHeader-GWT/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/example-wuiChangeScreenHeader-GWT/LICENSE +++ /dev/null
@@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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.
diff --git a/example-wuiChangeScreenHeader-GWT/WORKSPACE b/example-wuiChangeScreenHeader-GWT/WORKSPACE deleted file mode 100644 index 8f20924..0000000 --- a/example-wuiChangeScreenHeader-GWT/WORKSPACE +++ /dev/null
@@ -1,33 +0,0 @@ -workspace(name = "wuiChangeScreenHeader") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", - # local_path = "/home/<user>/projects/bazlets", -) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-wuiChangeScreenHeader-GWT/bazlets.bzl b/example-wuiChangeScreenHeader-GWT/bazlets.bzl deleted file mode 100644 index 6c4fffc..0000000 --- a/example-wuiChangeScreenHeader-GWT/bazlets.bzl +++ /dev/null
@@ -1,19 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None - ): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/example-wuiChangeScreenHeader-GWT/pom.xml b/example-wuiChangeScreenHeader-GWT/pom.xml deleted file mode 100644 index d2d41e5..0000000 --- a/example-wuiChangeScreenHeader-GWT/pom.xml +++ /dev/null
@@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (C) 2013 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> - - <groupId>com.googlesource.gerrit.plugins</groupId> - <artifactId>example-wuiChangeScreenHeader</artifactId> - <packaging>jar</packaging> - <version>2.16.13</version> - <properties> - <Gerrit-ApiType>plugin</Gerrit-ApiType> - <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion> - <GWT-Version>2.8.2</GWT-Version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <configuration> - <archive> - <manifestEntries> - <Gerrit-PluginName>example-wuiChangeScreenHeader</Gerrit-PluginName> - <Gerrit-Module>com.googlesource.gerrit.plugins.examples.wuichangescreenheader.Module</Gerrit-Module> - - <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor> - <Implementation-URL>https://gerrit-review.googlesource.com/#/admin/projects/plugins/examples</Implementation-URL> - - <Implementation-Title>Example Change Screen Header Extension</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - - <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> - <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>gwt-maven-plugin</artifactId> - <version>${GWT-Version}</version> - <configuration> - <module>com.googlesource.gerrit.plugins.examples.wuichangescreenheader.HelloForm</module> - <disableClassMetadata>true</disableClassMetadata> - <disableCastChecking>true</disableCastChecking> - <webappDirectory>${project.build.directory}/classes/static</webappDirectory> - </configuration> - <executions> - <execution> - <goals> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-plugin-gwtui</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${GWT-Version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <repositories> - <repository> - <id>maven.org</id> - <url>http://repo1.maven.org/maven2</url> - </repository> - </repositories> -</project>
diff --git a/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/HelloForm.gwt.xml b/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/HelloForm.gwt.xml deleted file mode 100644 index ddb853c..0000000 --- a/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/HelloForm.gwt.xml +++ /dev/null
@@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (C) 2017 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 rename-to="example"> - <!-- Inherit the core Web Toolkit stuff. --> - <inherits name="com.google.gwt.user.User"/> - <!-- Other module inherits --> - <inherits name="com.google.gerrit.GerritGwtUICommon"/> - <inherits name="com.google.gerrit.Plugin"/> - <inherits name="com.google.gwt.http.HTTP"/> - <inherits name="com.google.gwt.json.JSON"/> - <!-- Using GWT built-in themes adds a number of static --> - <!-- resources to the plugin. No theme inherits lines were --> - <!-- added in order to make this plugin as simple as possible --> - <!-- Specify the app entry point class. --> - <entry-point class="com.googlesource.gerrit.plugins.examples.wuichangescreenheader.client.ExamplePlugin"/> -</module>
diff --git a/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/Module.java b/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/Module.java deleted file mode 100644 index 8507a5e..0000000 --- a/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/Module.java +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuichangescreenheader; - -import com.google.gerrit.extensions.registration.DynamicSet; -import com.google.gerrit.extensions.webui.GwtPlugin; -import com.google.gerrit.extensions.webui.WebUiPlugin; -import com.google.inject.AbstractModule; - -public class Module extends AbstractModule { - - @Override - protected void configure() { - DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("example")); - } -}
diff --git a/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/client/ChangeScreenStatusExtension.java b/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/client/ChangeScreenStatusExtension.java deleted file mode 100644 index 46170fe..0000000 --- a/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/client/ChangeScreenStatusExtension.java +++ /dev/null
@@ -1,37 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuichangescreenheader.client; - -import com.google.gerrit.plugin.client.extension.Panel; -import com.google.gwt.dom.client.Style.Unit; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.InlineLabel; - -/** Extension for change screen that displays a status in the header bar. */ -public class ChangeScreenStatusExtension extends FlowPanel { - static class Factory implements Panel.EntryPoint { - @Override - public void onLoad(Panel panel) { - panel.setWidget(new ChangeScreenStatusExtension()); - } - } - - ChangeScreenStatusExtension() { - getElement().getStyle().setPadding(5, Unit.PX); - add(new Image(ExamplePlugin.RESOURCES.greenCheck())); - add(new InlineLabel("OK")); - } -}
diff --git a/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/client/ExamplePlugin.java b/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/client/ExamplePlugin.java deleted file mode 100644 index 5679e0d..0000000 --- a/example-wuiChangeScreenHeader-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheader/client/ExamplePlugin.java +++ /dev/null
@@ -1,34 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuichangescreenheader.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.Resources; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.PluginEntryPoint; -import com.google.gwt.core.client.GWT; - -public class ExamplePlugin extends PluginEntryPoint { - public static final Resources RESOURCES = GWT.create(Resources.class); - - @Override - public void onPluginLoad() { - Plugin.get() - .panel( - GerritUiExtensionPoint.CHANGE_SCREEN_HEADER, - new ChangeScreenStatusExtension.Factory(), - "status"); - } -}
diff --git a/example-wuiChangeScreenHeader-GWT/src/main/resources/Documentation/about.md b/example-wuiChangeScreenHeader-GWT/src/main/resources/Documentation/about.md deleted file mode 100644 index ca76fbd..0000000 --- a/example-wuiChangeScreenHeader-GWT/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1 +0,0 @@ -Sample plugin to demonstrate an extension to the Change Screen header
diff --git a/example-wuiChangeScreenHeader-GWT/tools/bzl/BUILD b/example-wuiChangeScreenHeader-GWT/tools/bzl/BUILD deleted file mode 100644 index e69de29..0000000 --- a/example-wuiChangeScreenHeader-GWT/tools/bzl/BUILD +++ /dev/null
diff --git a/example-wuiChangeScreenHeader-GWT/tools/bzl/plugin.bzl b/example-wuiChangeScreenHeader-GWT/tools/bzl/plugin.bzl deleted file mode 100644 index 89a1643..0000000 --- a/example-wuiChangeScreenHeader-GWT/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,8 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _plugin_deps = "PLUGIN_DEPS", -) - -gerrit_plugin = _gerrit_plugin -PLUGIN_DEPS = _plugin_deps
diff --git a/example-wuiChangeScreenHeader-GWT/tools/workspace-status.sh b/example-wuiChangeScreenHeader-GWT/tools/workspace-status.sh deleted file mode 100755 index 72e8615..0000000 --- a/example-wuiChangeScreenHeader-GWT/tools/workspace-status.sh +++ /dev/null
@@ -1,17 +0,0 @@ -#!/bin/bash - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -function rev() { - git describe --always --match "v[0-9].*" --dirty -} - -echo STABLE_BUILD_EXAMPLE-WUICHANGESCREENHEADER-GWT_LABEL $(rev)
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/.bazelrc b/example-wuiChangeScreenHeaderRightOfButtons-GWT/.bazelrc deleted file mode 100644 index 4ed16cf..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command=./tools/workspace-status.sh -test --build_tests_only
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/BUILD b/example-wuiChangeScreenHeaderRightOfButtons-GWT/BUILD deleted file mode 100644 index c6441dc..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/BUILD +++ /dev/null
@@ -1,15 +0,0 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") - -MODULE = "com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofbuttons.HelloForm" - -gerrit_plugin( - name = "example-wuiChangeScreenHeaderRightOfButtons-GWT", - srcs = glob(["src/main/java/**/*.java"]), - gwt_module = MODULE, - manifest_entries = [ - "Gerrit-PluginName: example-wuiChangeScreenHeaderRightOfButtons-GWT", - "Gerrit-Module: com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofbuttons.Module", - "Implementation-Title: Example Change Screen Header Extension Right Of Buttons", - ], - resources = glob(["src/main/**/*"]), -)
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/LICENSE b/example-wuiChangeScreenHeaderRightOfButtons-GWT/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/LICENSE +++ /dev/null
@@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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.
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/WORKSPACE b/example-wuiChangeScreenHeaderRightOfButtons-GWT/WORKSPACE deleted file mode 100644 index c2ff954..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/WORKSPACE +++ /dev/null
@@ -1,33 +0,0 @@ -workspace(name = "wuiChangeScreenHeaderRightOfButtons") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", - # local_path = "/home/<user>/projects/bazlets", -) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/bazlets.bzl b/example-wuiChangeScreenHeaderRightOfButtons-GWT/bazlets.bzl deleted file mode 100644 index 6c4fffc..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/bazlets.bzl +++ /dev/null
@@ -1,19 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None - ): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/pom.xml b/example-wuiChangeScreenHeaderRightOfButtons-GWT/pom.xml deleted file mode 100644 index 1babad5..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/pom.xml +++ /dev/null
@@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (C) 2013 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> - - <groupId>com.googlesource.gerrit.plugins</groupId> - <artifactId>example-wuiChangeScreenHeaderRightOfButtons-GWT</artifactId> - <packaging>jar</packaging> - <version>2.16.13</version> - <properties> - <Gerrit-ApiType>plugin</Gerrit-ApiType> - <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion> - <GWT-Version>2.8.2</GWT-Version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <configuration> - <archive> - <manifestEntries> - <Gerrit-PluginName>example-wuiChangeScreenHeaderRightOfButtons-GWT</Gerrit-PluginName> - <Gerrit-Module>com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofbuttons.Module</Gerrit-Module> - - <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor> - <Implementation-URL>https://gerrit-review.googlesource.com/#/admin/projects/plugins/examples</Implementation-URL> - - <Implementation-Title>Example Change Screen Header Extension Right Of Buttons</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - - <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> - <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>gwt-maven-plugin</artifactId> - <version>${GWT-Version}</version> - <configuration> - <module>com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofbuttons.HelloForm</module> - <disableClassMetadata>true</disableClassMetadata> - <disableCastChecking>true</disableCastChecking> - <webappDirectory>${project.build.directory}/classes/static</webappDirectory> - </configuration> - <executions> - <execution> - <goals> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-plugin-gwtui</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${GWT-Version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <repositories> - <repository> - <id>maven.org</id> - <url>http://repo1.maven.org/maven2</url> - </repository> - </repositories> -</project>
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/HelloForm.gwt.xml b/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/HelloForm.gwt.xml deleted file mode 100644 index 4d7947e..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/HelloForm.gwt.xml +++ /dev/null
@@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (C) 2017 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 rename-to="example"> - <!-- Inherit the core Web Toolkit stuff. --> - <inherits name="com.google.gwt.user.User"/> - <!-- Other module inherits --> - <inherits name="com.google.gerrit.GerritGwtUICommon"/> - <inherits name="com.google.gerrit.Plugin"/> - <inherits name="com.google.gwt.http.HTTP"/> - <inherits name="com.google.gwt.json.JSON"/> - <!-- Using GWT built-in themes adds a number of static --> - <!-- resources to the plugin. No theme inherits lines were --> - <!-- added in order to make this plugin as simple as possible --> - <!-- Specify the app entry point class. --> - <entry-point class="com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofbuttons.client.ExamplePlugin"/> -</module>
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/Module.java b/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/Module.java deleted file mode 100644 index 25b6824..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/Module.java +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofbuttons; - -import com.google.gerrit.extensions.registration.DynamicSet; -import com.google.gerrit.extensions.webui.GwtPlugin; -import com.google.gerrit.extensions.webui.WebUiPlugin; -import com.google.inject.AbstractModule; - -public class Module extends AbstractModule { - - @Override - protected void configure() { - DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("example")); - } -}
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/client/ExamplePlugin.java b/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/client/ExamplePlugin.java deleted file mode 100644 index e1200a3..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/client/ExamplePlugin.java +++ /dev/null
@@ -1,52 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofbuttons.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.Resources; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.PluginEntryPoint; -import com.google.gerrit.plugin.client.extension.Panel; -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.Button; - -public class ExamplePlugin extends PluginEntryPoint { - public static final Resources RESOURCES = GWT.create(Resources.class); - - @Override - public void onPluginLoad() { - Plugin.get() - .panel( - GerritUiExtensionPoint.CHANGE_SCREEN_HEADER_RIGHT_OF_BUTTONS, - new Panel.EntryPoint() { - @Override - public void onLoad(Panel panel) { - Button b = new HighlightButton("Library-Compliance+1"); - b.addClickHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - Window.alert("TODO"); - } - }); - panel.setWidget(b); - } - }, - "library_compliance"); - } -}
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/client/HighlightButton.java b/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/client/HighlightButton.java deleted file mode 100644 index a15cf17..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofbuttons/client/HighlightButton.java +++ /dev/null
@@ -1,40 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofbuttons.client; - -import com.google.gwt.user.client.ui.Button; -import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder; - -/** - * Highlight button for header line in change screen. - * - * <p>This class can *only* be used within a panel that extends the header line of the change - * screen, but will not work standalone. - */ -public class HighlightButton extends Button { - - public HighlightButton(String text) { - // Create Button with inner div. This is required to get proper styling - // in the context of the change screen. - super( - (new SafeHtmlBuilder()) - .openDiv() - .appendAttribute("style", "color: #fff;") - .append(text) - .closeDiv()); - getElement().removeClassName("gwt-Button"); - getElement().getStyle().setBackgroundColor("#4d90fe"); - } -}
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/resources/Documentation/about.md b/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/resources/Documentation/about.md deleted file mode 100644 index 003fb08..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1 +0,0 @@ -Sample plugin to demonstrate an extension to the Change Screen header that is right of the buttons
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/bzl/BUILD b/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/bzl/BUILD deleted file mode 100644 index e69de29..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/bzl/BUILD +++ /dev/null
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/bzl/plugin.bzl b/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/bzl/plugin.bzl deleted file mode 100644 index 89a1643..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,8 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _plugin_deps = "PLUGIN_DEPS", -) - -gerrit_plugin = _gerrit_plugin -PLUGIN_DEPS = _plugin_deps
diff --git a/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/workspace-status.sh b/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/workspace-status.sh deleted file mode 100755 index f1907e4..0000000 --- a/example-wuiChangeScreenHeaderRightOfButtons-GWT/tools/workspace-status.sh +++ /dev/null
@@ -1,17 +0,0 @@ -#!/bin/bash - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -function rev() { - git describe --always --match "v[0-9].*" --dirty -} - -echo STABLE_BUILD_EXAMPLE-WUICHANGESCREENHEADERRIGHTOFBUTTONS-GWT_LABEL $(rev)
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/.bazelrc b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/.bazelrc deleted file mode 100644 index 4ed16cf..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command=./tools/workspace-status.sh -test --build_tests_only
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/BUILD b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/BUILD deleted file mode 100644 index e51011b..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/BUILD +++ /dev/null
@@ -1,15 +0,0 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") - -MODULE = "com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns.HelloForm" - -gerrit_plugin( - name = "example-wuiChangeScreenHeaderRightOfPopDowns-GWT", - srcs = glob(["src/main/java/**/*.java"]), - gwt_module = MODULE, - manifest_entries = [ - "Gerrit-PluginName: example-wuiChangeScreenHeaderRightOfPopDowns-GWT", - "Gerrit-Module: com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns.Module", - "Implementation-Title: Example Change Screen Header Extension Right Of Pop Downs", - ], - resources = glob(["src/main/**/*"]), -)
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/LICENSE b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/LICENSE +++ /dev/null
@@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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.
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/WORKSPACE b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/WORKSPACE deleted file mode 100644 index 3fc11f1..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/WORKSPACE +++ /dev/null
@@ -1,33 +0,0 @@ -workspace(name = "wuiChangeScreenHeaderRightOfPopDowns") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", - # local_path = "/home/<user>/projects/bazlets", -) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/bazlets.bzl b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/bazlets.bzl deleted file mode 100644 index 6c4fffc..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/bazlets.bzl +++ /dev/null
@@ -1,19 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None - ): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/pom.xml b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/pom.xml deleted file mode 100644 index 6db008d..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/pom.xml +++ /dev/null
@@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (C) 2013 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> - - <groupId>com.googlesource.gerrit.plugins</groupId> - <artifactId>example-wuiChangeScreenHeaderRightOfPopDowns</artifactId> - <packaging>jar</packaging> - <version>2.16.13</version> - <properties> - <Gerrit-ApiType>plugin</Gerrit-ApiType> - <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion> - <GWT-Version>2.8.2</GWT-Version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <configuration> - <archive> - <manifestEntries> - <Gerrit-PluginName>example-wuiChangeScreenHeaderRightOfPopDowns</Gerrit-PluginName> - <Gerrit-Module>com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns.Module</Gerrit-Module> - - <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor> - <Implementation-URL>https://gerrit-review.googlesource.com/#/admin/projects/plugins/examples</Implementation-URL> - - <Implementation-Title>Example Change Screen Header Extension Right Of Pop Downs</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - - <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> - <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>gwt-maven-plugin</artifactId> - <version>${GWT-Version}</version> - <configuration> - <module>com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns.HelloForm</module> - <disableClassMetadata>true</disableClassMetadata> - <disableCastChecking>true</disableCastChecking> - <webappDirectory>${project.build.directory}/classes/static</webappDirectory> - </configuration> - <executions> - <execution> - <goals> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-plugin-gwtui</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${GWT-Version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <repositories> - <repository> - <id>maven.org</id> - <url>http://repo1.maven.org/maven2</url> - </repository> - </repositories> -</project>
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/HelloForm.gwt.xml b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/HelloForm.gwt.xml deleted file mode 100644 index daccfe6..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/HelloForm.gwt.xml +++ /dev/null
@@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (C) 2017 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 rename-to="example"> - <!-- Inherit the core Web Toolkit stuff. --> - <inherits name="com.google.gwt.user.User"/> - <!-- Other module inherits --> - <inherits name="com.google.gerrit.GerritGwtUICommon"/> - <inherits name="com.google.gerrit.Plugin"/> - <inherits name="com.google.gwt.http.HTTP"/> - <inherits name="com.google.gwt.json.JSON"/> - <!-- Using GWT built-in themes adds a number of static --> - <!-- resources to the plugin. No theme inherits lines were --> - <!-- added in order to make this plugin as simple as possible --> - <!-- Specify the app entry point class. --> - <entry-point class="com.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns.client.ExamplePlugin"/> - <stylesheet src="example.css"/> -</module>
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/Module.java b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/Module.java deleted file mode 100644 index d9d071b..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/Module.java +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns; - -import com.google.gerrit.extensions.registration.DynamicSet; -import com.google.gerrit.extensions.webui.GwtPlugin; -import com.google.gerrit.extensions.webui.WebUiPlugin; -import com.google.inject.AbstractModule; - -public class Module extends AbstractModule { - - @Override - protected void configure() { - DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("example")); - } -}
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/BuildsDropDownPanel.java b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/BuildsDropDownPanel.java deleted file mode 100644 index 45a99fb..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/BuildsDropDownPanel.java +++ /dev/null
@@ -1,72 +0,0 @@ -// Copyright (C) 2015 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.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns.client; - -import com.google.gerrit.plugin.client.extension.Panel; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Grid; -import com.google.gwt.user.client.ui.HTMLTable.CellFormatter; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.InlineHyperlink; -import com.google.gwt.user.client.ui.InlineLabel; - -/** Extension for change screen that displays a status in the header bar. */ -public class BuildsDropDownPanel extends FlowPanel { - static class Factory implements Panel.EntryPoint { - @Override - public void onLoad(Panel panel) { - panel.setWidget(new BuildsDropDownPanel()); - } - } - - BuildsDropDownPanel() { - Grid g = new Grid(3, 4); - g.addStyleName("infoBlock"); - CellFormatter fmt = g.getCellFormatter(); - - g.setText(0, 0, "State"); - fmt.addStyleName(0, 0, "header"); - g.setText(0, 1, "PS"); - fmt.addStyleName(0, 1, "header"); - g.setText(0, 2, "Date"); - fmt.addStyleName(0, 2, "header"); - g.setText(0, 3, "Log"); - fmt.addStyleName(0, 3, "header"); - - HorizontalPanel p = new HorizontalPanel(); - p.add(new Image(ExamplePlugin.RESOURCES.greenCheck())); - p.add(new InlineLabel("OK")); - g.setWidget(1, 0, p); - g.setWidget(1, 1, new InlineLabel("2")); - g.setWidget(1, 2, new InlineLabel("2015-07-09 11:06:13")); - g.setWidget(1, 3, new InlineHyperlink("Build Log", "TODO")); - - p = new HorizontalPanel(); - p.add(new Image(ExamplePlugin.RESOURCES.redNot())); - p.add(new InlineLabel("FAILED")); - g.setWidget(2, 0, p); - g.setWidget(2, 1, new InlineLabel("1")); - g.setWidget(2, 2, new InlineLabel("2015-07-09 09:17:28")); - g.setWidget(2, 3, new InlineHyperlink("Build Log", "TODO")); - - fmt.addStyleName(0, 0, "topmost"); - fmt.addStyleName(0, 1, "topmost"); - fmt.addStyleName(0, 2, "topmost"); - fmt.addStyleName(0, 3, "topmost"); - - add(new PopDownButton("Builds", g)); - } -}
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/ExamplePlugin.java b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/ExamplePlugin.java deleted file mode 100644 index 582b7b6..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/ExamplePlugin.java +++ /dev/null
@@ -1,34 +0,0 @@ -// Copyright (C) 2013 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.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.Resources; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.PluginEntryPoint; -import com.google.gwt.core.client.GWT; - -public class ExamplePlugin extends PluginEntryPoint { - public static final Resources RESOURCES = GWT.create(Resources.class); - - @Override - public void onPluginLoad() { - Plugin.get() - .panel( - GerritUiExtensionPoint.CHANGE_SCREEN_HEADER_RIGHT_OF_POP_DOWNS, - new BuildsDropDownPanel.Factory(), - "status"); - } -}
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/PopDownButton.java b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/PopDownButton.java deleted file mode 100644 index 6806e19..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/client/PopDownButton.java +++ /dev/null
@@ -1,103 +0,0 @@ -// Copyright (C) 2015 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.googlesource.gerrit.plugins.examples.wuichangescreenheaderrightofpopdowns.client; - -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.Style; -import com.google.gwt.dom.client.Style.FontWeight; -import com.google.gwt.dom.client.Style.Unit; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.logical.shared.CloseEvent; -import com.google.gwt.event.logical.shared.CloseHandler; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.gwtexpui.globalkey.client.GlobalKey; -import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder; - -/** - * Pop down button for header line in change screen. - * - * <p>This class implements a button that on click opens a pop down panel with the provided widget, - * similar to the "Patch Sets", "Download" or "Included In" pop down panels on the change screen. - * - * <p>This class can *only* be used within a panel that extends the header line of the change - * screen, but will not work standalone. - */ -public class PopDownButton extends Button { - private final Widget widget; - private PopupPanel popup; - - public PopDownButton(String text, Widget widget) { - // Create Button with inner div. This is required to get proper styling - // in the context of the change screen. - super((new SafeHtmlBuilder()).openDiv().append(text).closeDiv()); - getElement().removeClassName("gwt-Button"); - addClickHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - show(); - } - }); - this.widget = widget; - } - - private void show() { - if (popup != null) { - getElement().getStyle().clearFontWeight(); - popup.hide(); - return; - } - - final Widget relativeTo = getParent(); - final PopupPanel p = - new PopupPanel(true) { - @Override - public void setPopupPosition(int left, int top) { - top -= Document.get().getBodyOffsetTop(); - - int w = Window.getScrollLeft() + Window.getClientWidth(); - int r = relativeTo.getAbsoluteLeft() + relativeTo.getOffsetWidth(); - int right = w - r; - Style style = getElement().getStyle(); - style.clearProperty("left"); - style.setPropertyPx("right", right); - style.setPropertyPx("top", top); - } - }; - Style popupStyle = p.getElement().getStyle(); - popupStyle.setBorderWidth(0, Unit.PX); - popupStyle.setBackgroundColor("#EEEEEE"); - p.addAutoHidePartner(getElement()); - p.addCloseHandler( - new CloseHandler<PopupPanel>() { - @Override - public void onClose(CloseEvent<PopupPanel> event) { - if (popup == p) { - getElement().getStyle().clearFontWeight(); - popup = null; - } - } - }); - p.add(widget); - p.showRelativeTo(relativeTo); - GlobalKey.dialog(p); - getElement().getStyle().setFontWeight(FontWeight.BOLD); - popup = p; - } -}
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/public/example.css b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/public/example.css deleted file mode 100644 index 7fa2087..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuichangescreenheaderrightofpopdowns/public/example.css +++ /dev/null
@@ -1,3 +0,0 @@ -.example-panel { - border-spacing: 0px 5px; -}
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/resources/Documentation/about.md b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/resources/Documentation/about.md deleted file mode 100644 index 559c6b4..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1 +0,0 @@ -Sample plugin to demonstrate adding a Change Screen extension as a Drop Down Panel in Gerrit.
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/bzl/BUILD b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/bzl/BUILD deleted file mode 100644 index e69de29..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/bzl/BUILD +++ /dev/null
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/bzl/plugin.bzl b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/bzl/plugin.bzl deleted file mode 100644 index 89a1643..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,8 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _plugin_deps = "PLUGIN_DEPS", -) - -gerrit_plugin = _gerrit_plugin -PLUGIN_DEPS = _plugin_deps
diff --git a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/workspace-status.sh b/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/workspace-status.sh deleted file mode 100755 index b0a4481..0000000 --- a/example-wuiChangeScreenHeaderRightOfPopDowns-GWT/tools/workspace-status.sh +++ /dev/null
@@ -1,17 +0,0 @@ -#!/bin/bash - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -function rev() { - git describe --always --match "v[0-9].*" --dirty -} - -echo STABLE_BUILD_EXAMPLE-WUICHANGESCREENHEADERRIGHTOFPOPDOWNS-GWT_LABEL $(rev)
diff --git a/example-wuiPluginScreen-GWT/.bazelrc b/example-wuiPluginScreen-GWT/.bazelrc deleted file mode 100644 index 4ed16cf..0000000 --- a/example-wuiPluginScreen-GWT/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command=./tools/workspace-status.sh -test --build_tests_only
diff --git a/example-wuiPluginScreen-GWT/.buckconfig b/example-wuiPluginScreen-GWT/.buckconfig deleted file mode 100644 index 98b47af..0000000 --- a/example-wuiPluginScreen-GWT/.buckconfig +++ /dev/null
@@ -1,15 +0,0 @@ -[alias] - plugin = //:example-wuiPluginScreen - -[java] - src_roots = java, resources - source_level = 8 - target_level = 8 - -[project] - ignore = .git - -[cache] - mode = dir - dir = buck-out/cache -
diff --git a/example-wuiPluginScreen-GWT/BUILD b/example-wuiPluginScreen-GWT/BUILD deleted file mode 100644 index 504d837..0000000 --- a/example-wuiPluginScreen-GWT/BUILD +++ /dev/null
@@ -1,15 +0,0 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") - -MODULE = "com.googlesource.gerrit.plugins.examples.wuipluginscreen.HelloForm" - -gerrit_plugin( - name = "example-wuiPluginScreen-GWT", - srcs = glob(["src/main/java/**/*.java"]), - gwt_module = MODULE, - manifest_entries = [ - "Gerrit-PluginName: example-wuiPluginScreen-GWT", - "Gerrit-Module: com.googlesource.gerrit.plugins.examples.wuipluginscreen.Module", - "Implementation-Title: Example Plugin Screen Extension", - ], - resources = glob(["src/main/**/*"]), -)
diff --git a/example-wuiPluginScreen-GWT/LICENSE b/example-wuiPluginScreen-GWT/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/example-wuiPluginScreen-GWT/LICENSE +++ /dev/null
@@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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.
diff --git a/example-wuiPluginScreen-GWT/WORKSPACE b/example-wuiPluginScreen-GWT/WORKSPACE deleted file mode 100644 index fbeedbb..0000000 --- a/example-wuiPluginScreen-GWT/WORKSPACE +++ /dev/null
@@ -1,33 +0,0 @@ -workspace(name = "wuiSettingsScreen") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", - # local_path = "/home/<user>/projects/bazlets", -) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-wuiPluginScreen-GWT/bazlets.bzl b/example-wuiPluginScreen-GWT/bazlets.bzl deleted file mode 100644 index 6c4fffc..0000000 --- a/example-wuiPluginScreen-GWT/bazlets.bzl +++ /dev/null
@@ -1,19 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None - ): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/example-wuiPluginScreen-GWT/lib/BUCK b/example-wuiPluginScreen-GWT/lib/BUCK deleted file mode 100644 index d333cba..0000000 --- a/example-wuiPluginScreen-GWT/lib/BUCK +++ /dev/null
@@ -1,18 +0,0 @@ -include_defs('//bucklets/maven_jar.bucklet') - -maven_jar( - name = 'junit', - id = 'junit:junit:4.11', - sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0', - license = 'DO_NOT_DISTRIBUTE', -) - -maven_jar( - name = 'truth', - id = 'com.google.truth:truth:0.27', - sha1 = 'bd17774d2dc0fffa884d42c07d2537e86c67acd6', - license = 'DO_NOT_DISTRIBUTE', - exported_deps = [ - ':junit', - ], -)
diff --git a/example-wuiPluginScreen-GWT/lib/gwt/BUCK b/example-wuiPluginScreen-GWT/lib/gwt/BUCK deleted file mode 100644 index 26e55d3..0000000 --- a/example-wuiPluginScreen-GWT/lib/gwt/BUCK +++ /dev/null
@@ -1,73 +0,0 @@ -include_defs('//bucklets/maven_jar.bucklet') - -VERSION = '2.8.0' - -maven_jar( - name = 'user', - id = 'com.google.gwt:gwt-user:' + VERSION, - sha1 = '518579870499e15531f454f35dca0772d7fa31f7', - license = 'Apache2.0', - attach_source = False, -) - -maven_jar( - name = 'dev', - id = 'com.google.gwt:gwt-dev:' + VERSION, - sha1 = 'f160a61272c5ebe805cd2d3d3256ed3ecf14893f', - license = 'Apache2.0', - attach_source = False, -) - -maven_jar( - name = 'javax-validation', - id = 'javax.validation:validation-api:1.0.0.GA', - bin_sha1 = 'b6bd7f9d78f6fdaa3c37dae18a4bd298915f328e', - src_sha1 = '7a561191db2203550fbfa40d534d4997624cd369', - license = 'Apache2.0', - visibility = ['PUBLIC'], -) - -maven_jar( - name = 'jsinterop-annotations', - id = 'com.google.jsinterop:jsinterop-annotations:1.0.0', - bin_sha1 = '23c3a3c060ffe4817e67673cc8294e154b0a4a95', - src_sha1 = '5d7c478efbfccc191430d7c118d7bd2635e43750', - license = 'Apache2.0', - visibility = ['PUBLIC'], -) - -maven_jar( - name = 'ant', - id = 'ant:ant:1.6.5', - bin_sha1 = '7d18faf23df1a5c3a43613952e0e8a182664564b', - src_sha1 = '9e0a847494563f35f9b02846a1c1eb4aa2ee5a9a', - license = 'Apache2.0', - visibility = ['PUBLIC'], -) - -maven_jar( - name = 'colt', - id = 'colt:colt:1.2.0', - attach_source = False, - bin_sha1 = '0abc984f3adc760684d49e0f11ddf167ba516d4f', - license = 'DO_NOT_DISTRIBUTE', - visibility = ['PUBLIC'], -) - -maven_jar( - name = 'tapestry', - id = 'tapestry:tapestry:4.0.2', - attach_source = False, - bin_sha1 = 'e855a807425d522e958cbce8697f21e9d679b1f7', - license = 'Apache2.0', - visibility = ['PUBLIC'], -) - -maven_jar( - name = 'w3c-css-sac', - id = 'org.w3c.css:sac:1.3', - attach_source = False, - bin_sha1 = 'cdb2dcb4e22b83d6b32b93095f644c3462739e82', - license = 'DO_NOT_DISTRIBUTE', - visibility = ['PUBLIC'], -)
diff --git a/example-wuiPluginScreen-GWT/lib/ow2/BUCK b/example-wuiPluginScreen-GWT/lib/ow2/BUCK deleted file mode 100644 index 543bc09..0000000 --- a/example-wuiPluginScreen-GWT/lib/ow2/BUCK +++ /dev/null
@@ -1,39 +0,0 @@ -include_defs('//bucklets/maven_jar.bucklet') - -VERSION = '5.1' - -maven_jar( - name = 'ow2-asm', - id = 'org.ow2.asm:asm:' + VERSION, - sha1 = '5ef31c4fe953b1fd00b8a88fa1d6820e8785bb45', - license = 'ow2', -) - -maven_jar( - name = 'ow2-asm-analysis', - id = 'org.ow2.asm:asm-analysis:' + VERSION, - sha1 = '6d1bf8989fc7901f868bee3863c44f21aa63d110', - license = 'ow2', -) - -maven_jar( - name = 'ow2-asm-commons', - id = 'org.ow2.asm:asm-commons:' + VERSION, - sha1 = '25d8a575034dd9cfcb375a39b5334f0ba9c8474e', - deps = [':ow2-asm-tree'], - license = 'ow2', -) - -maven_jar( - name = 'ow2-asm-tree', - id = 'org.ow2.asm:asm-tree:' + VERSION, - sha1 = '87b38c12a0ea645791ead9d3e74ae5268d1d6c34', - license = 'ow2', -) - -maven_jar( - name = 'ow2-asm-util', - id = 'org.ow2.asm:asm-util:' + VERSION, - sha1 = 'b60e33a6bd0d71831e0c249816d01e6c1dd90a47', - license = 'ow2', -)
diff --git a/example-wuiPluginScreen-GWT/pom.xml b/example-wuiPluginScreen-GWT/pom.xml deleted file mode 100644 index c42c64a..0000000 --- a/example-wuiPluginScreen-GWT/pom.xml +++ /dev/null
@@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (C) 2013 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> - - <groupId>com.googlesource.gerrit.plugins</groupId> - <artifactId>example-wuiPluginScreen</artifactId> - <packaging>jar</packaging> - <version>2.16.13</version> - <properties> - <Gerrit-ApiType>plugin</Gerrit-ApiType> - <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion> - <GWT-Version>2.8.0</GWT-Version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <configuration> - <archive> - <manifestEntries> - <Gerrit-PluginName>example-wuiPluginScreen</Gerrit-PluginName> - <Gerrit-Module>com.googlesource.gerrit.plugins.examples.wuipluginscreen.Module</Gerrit-Module> - - <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor> - <Implementation-URL>https://gerrit-review.googlesource.com/#/admin/projects/plugins/examples</Implementation-URL> - - <Implementation-Title>Example Plugin Screen Extension</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - - <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> - <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>gwt-maven-plugin</artifactId> - <version>${GWT-Version}</version> - <configuration> - <module>com.googlesource.gerrit.plugins.examples.wuipluginscreen.HelloForm</module> - <disableClassMetadata>true</disableClassMetadata> - <disableCastChecking>true</disableCastChecking> - <webappDirectory>${project.build.directory}/classes/static</webappDirectory> - </configuration> - <executions> - <execution> - <goals> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-plugin-gwtui</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${GWT-Version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <repositories> - <repository> - <id>maven.org</id> - <url>http://repo1.maven.org/maven2</url> - </repository> - </repositories> -</project>
diff --git a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/HelloForm.gwt.xml b/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/HelloForm.gwt.xml deleted file mode 100644 index 767b43c..0000000 --- a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/HelloForm.gwt.xml +++ /dev/null
@@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (C) 2017 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 rename-to="example"> - <!-- Inherit the core Web Toolkit stuff. --> - <inherits name="com.google.gwt.user.User"/> - <!-- Other module inherits --> - <inherits name="com.google.gerrit.GerritGwtUICommon"/> - <inherits name="com.google.gerrit.Plugin"/> - <inherits name="com.google.gwt.http.HTTP"/> - <inherits name="com.google.gwt.json.JSON"/> - <!-- Using GWT built-in themes adds a number of static --> - <!-- resources to the plugin. No theme inherits lines were --> - <!-- added in order to make this plugin as simple as possible --> - <!-- Specify the app entry point class. --> - <entry-point class="com.googlesource.gerrit.plugins.examples.wuipluginscreen.client.ExamplePlugin"/> - <stylesheet src="example.css"/> -</module>
diff --git a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/HelloTopMenu.java b/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/HelloTopMenu.java deleted file mode 100644 index 2f6dae8..0000000 --- a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/HelloTopMenu.java +++ /dev/null
@@ -1,46 +0,0 @@ -// Copyright (C) 2013 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.googlesource.gerrit.plugins.examples.topmenu; - -import com.google.common.collect.Lists; -import com.google.gerrit.extensions.annotations.PluginName; -import com.google.gerrit.extensions.client.MenuItem; -import com.google.gerrit.extensions.webui.TopMenu; -import com.google.inject.Inject; -import java.util.List; - -public class HelloTopMenu implements TopMenu { - private final List<MenuEntry> menuEntries; - - @Inject - public HelloTopMenu(@PluginName String pluginName) { - String baseUrl = "/plugins/" + pluginName + "/"; - List<MenuItem> menuItems = Lists.newArrayListWithCapacity(2); - menuItems.add(new MenuItem("Greeting", "#/x/" + pluginName + "/", "")); - menuItems.add(new MenuItem("Documentation", baseUrl)); - menuEntries = Lists.newArrayListWithCapacity(2); - menuEntries.add(new MenuEntry("Examples", menuItems)); - menuEntries.add( - new MenuEntry( - "Projects", - Lists.newArrayList( - new MenuItem("Browse Repositories", "https://gerrit.googlesource.com/")))); - } - - @Override - public List<MenuEntry> getEntries() { - return menuEntries; - } -}
diff --git a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/Module.java b/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/Module.java deleted file mode 100644 index 6806e8a..0000000 --- a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/Module.java +++ /dev/null
@@ -1,31 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuipluginscreen; - -import com.google.gerrit.extensions.registration.DynamicSet; -import com.google.gerrit.extensions.webui.GwtPlugin; -import com.google.gerrit.extensions.webui.TopMenu; -import com.google.gerrit.extensions.webui.WebUiPlugin; -import com.google.inject.AbstractModule; -import com.googlesource.gerrit.plugins.examples.topmenu.HelloTopMenu; - -public class Module extends AbstractModule { - - @Override - protected void configure() { - DynamicSet.bind(binder(), TopMenu.class).to(HelloTopMenu.class); - DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("example")); - } -}
diff --git a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/client/ExamplePlugin.java b/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/client/ExamplePlugin.java deleted file mode 100644 index 6fc3755..0000000 --- a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/client/ExamplePlugin.java +++ /dev/null
@@ -1,29 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuipluginscreen.client; - -import com.google.gerrit.client.Resources; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.PluginEntryPoint; -import com.google.gwt.core.client.GWT; - -public class ExamplePlugin extends PluginEntryPoint { - public static final Resources RESOURCES = GWT.create(Resources.class); - - @Override - public void onPluginLoad() { - Plugin.get().screen("", new IndexScreen.Factory()); - } -}
diff --git a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/client/IndexScreen.java b/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/client/IndexScreen.java deleted file mode 100644 index 261a76a..0000000 --- a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/client/IndexScreen.java +++ /dev/null
@@ -1,138 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuipluginscreen.client; - -import com.google.gerrit.plugin.client.screen.Screen; -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.core.client.Scheduler.ScheduledCommand; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.KeyPressEvent; -import com.google.gwt.event.dom.client.KeyPressHandler; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Panel; -import com.google.gwt.user.client.ui.TextArea; -import com.google.gwt.user.client.ui.TextBox; -import com.google.gwt.user.client.ui.VerticalPanel; - -class IndexScreen extends VerticalPanel { - static class Factory implements Screen.EntryPoint { - @Override - public void onLoad(Screen screen) { - screen.setPageTitle("example index"); - screen.show(new IndexScreen()); - } - } - - private TextBox usernameTxt; - private TextArea greetingTxt; - - IndexScreen() { - setStyleName("example-panel"); - - Panel labelImagePanel = new HorizontalPanel(); - Panel usernamePanel = new VerticalPanel(); - Image img = new Image(ExamplePlugin.RESOURCES.info()); - img.setTitle("User to send greetings to"); - labelImagePanel.add(new Label("Username")); - labelImagePanel.add(img); - labelImagePanel.add(new Label(":")); - usernamePanel.add(labelImagePanel); - usernameTxt = - new TextBox() { - @Override - public void onBrowserEvent(Event event) { - super.onBrowserEvent(event); - if (event.getTypeInt() == Event.ONPASTE) { - Scheduler.get() - .scheduleDeferred( - new ScheduledCommand() { - @Override - public void execute() { - if (getValue().trim().length() != 0) { - setEnabled(true); - } - } - }); - } - } - }; - usernameTxt.addKeyPressHandler( - new KeyPressHandler() { - @Override - public void onKeyPress(final KeyPressEvent event) { - event.stopPropagation(); - } - }); - usernameTxt.sinkEvents(Event.ONPASTE); - usernameTxt.setVisibleLength(40); - usernamePanel.add(usernameTxt); - add(usernamePanel); - - Panel messagePanel = new VerticalPanel(); - messagePanel.add(new Label("Message:")); - greetingTxt = new TextArea(); - greetingTxt.addKeyPressHandler( - new KeyPressHandler() { - @Override - public void onKeyPress(final KeyPressEvent event) { - event.stopPropagation(); - } - }); - greetingTxt.setVisibleLines(12); - greetingTxt.setCharacterWidth(80); - greetingTxt.getElement().setPropertyBoolean("spellcheck", false); - messagePanel.add(greetingTxt); - add(messagePanel); - - Button helloButton = new Button("Say Hello"); - helloButton.addStyleName("example-helloButton"); - helloButton.addClickHandler( - new ClickHandler() { - @Override - public void onClick(final ClickEvent event) { - sayHello(); - } - }); - add(helloButton); - helloButton.setEnabled(true); - } - - private void sayHello() { - String username = usernameTxt.getValue(); - String greeting = greetingTxt.getText(); - if (username == null) { - username = ""; - } else { - username = username.trim(); - } - if (greeting == null) { - greeting = ""; - } else { - greeting = greeting.trim(); - } - StringBuilder sb = new StringBuilder(); - sb.append("Hey "); - sb.append(username.isEmpty() ? "Dude" : username); - sb.append(", "); - sb.append(greeting.isEmpty() ? "what's up?" : greeting); - Window.alert(sb.toString()); - } -}
diff --git a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/public/example.css b/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/public/example.css deleted file mode 100644 index cca1597..0000000 --- a/example-wuiPluginScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipluginscreen/public/example.css +++ /dev/null
@@ -1,8 +0,0 @@ -.example-panel { - border-spacing: 0px 5px; -} - -.example-helloButton { - margin-left: 35px !important; - margin-right: 450px !important; -}
diff --git a/example-wuiPluginScreen-GWT/src/main/resources/Documentation/about.md b/example-wuiPluginScreen-GWT/src/main/resources/Documentation/about.md deleted file mode 100644 index e814753..0000000 --- a/example-wuiPluginScreen-GWT/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1,3 +0,0 @@ -Sample plugin to demonstrate an Index Screen extension. - -An example Index Screen is located under the Examples (TopMenu) > Greetings section
diff --git a/example-wuiPluginScreen-GWT/tools/bzl/BUILD b/example-wuiPluginScreen-GWT/tools/bzl/BUILD deleted file mode 100644 index e69de29..0000000 --- a/example-wuiPluginScreen-GWT/tools/bzl/BUILD +++ /dev/null
diff --git a/example-wuiPluginScreen-GWT/tools/bzl/plugin.bzl b/example-wuiPluginScreen-GWT/tools/bzl/plugin.bzl deleted file mode 100644 index 89a1643..0000000 --- a/example-wuiPluginScreen-GWT/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,8 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _plugin_deps = "PLUGIN_DEPS", -) - -gerrit_plugin = _gerrit_plugin -PLUGIN_DEPS = _plugin_deps
diff --git a/example-wuiPluginScreen-GWT/tools/workspace-status.sh b/example-wuiPluginScreen-GWT/tools/workspace-status.sh deleted file mode 100755 index 8aec87f..0000000 --- a/example-wuiPluginScreen-GWT/tools/workspace-status.sh +++ /dev/null
@@ -1,17 +0,0 @@ -#!/bin/bash - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -function rev() { - git describe --always --match "v[0-9].*" --dirty -} - -echo STABLE_BUILD_EXAMPLE-WUIPLUGINSCREEN-GWT_LABEL $(rev)
diff --git a/example-wuiPreferenceScreenBottom-GWT/.bazelrc b/example-wuiPreferenceScreenBottom-GWT/.bazelrc deleted file mode 100644 index 4ed16cf..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command=./tools/workspace-status.sh -test --build_tests_only
diff --git a/example-wuiPreferenceScreenBottom-GWT/BUILD b/example-wuiPreferenceScreenBottom-GWT/BUILD deleted file mode 100644 index b759e65..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/BUILD +++ /dev/null
@@ -1,15 +0,0 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") - -MODULE = "com.googlesource.gerrit.plugins.examples.wuipreferencescreenbottom.HelloForm" - -gerrit_plugin( - name = "example-wuiPreferenceScreenBottom-GWT", - srcs = glob(["src/main/java/**/*.java"]), - gwt_module = MODULE, - manifest_entries = [ - "Gerrit-PluginName: example-wuiPreferenceScreenBottom-GWT", - "Gerrit-Module: com.googlesource.gerrit.plugins.examples.wuipreferencescreenbottom.Module", - "Implementation-Title: Example Preference Screen Panel Bottom", - ], - resources = glob(["src/main/**/*"]), -)
diff --git a/example-wuiPreferenceScreenBottom-GWT/LICENSE b/example-wuiPreferenceScreenBottom-GWT/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/LICENSE +++ /dev/null
@@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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.
diff --git a/example-wuiPreferenceScreenBottom-GWT/WORKSPACE b/example-wuiPreferenceScreenBottom-GWT/WORKSPACE deleted file mode 100644 index c700103..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/WORKSPACE +++ /dev/null
@@ -1,33 +0,0 @@ -workspace(name = "wuiPreferenceScreenBottom") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", - # local_path = "/home/<user>/projects/bazlets", -) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-wuiPreferenceScreenBottom-GWT/bazlets.bzl b/example-wuiPreferenceScreenBottom-GWT/bazlets.bzl deleted file mode 100644 index 6c4fffc..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/bazlets.bzl +++ /dev/null
@@ -1,19 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None - ): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/example-wuiPreferenceScreenBottom-GWT/pom.xml b/example-wuiPreferenceScreenBottom-GWT/pom.xml deleted file mode 100644 index 0e411ca..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/pom.xml +++ /dev/null
@@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (C) 2013 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> - - <groupId>com.googlesource.gerrit.plugins</groupId> - <artifactId>example-wuiPreferenceScreenBottom</artifactId> - <packaging>jar</packaging> - <version>2.16.13</version> - <properties> - <Gerrit-ApiType>plugin</Gerrit-ApiType> - <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion> - <GWT-Version>2.8.2</GWT-Version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <configuration> - <archive> - <manifestEntries> - <Gerrit-PluginName>example-wuiPreferenceScreenBottom</Gerrit-PluginName> - <Gerrit-Module>com.googlesource.gerrit.plugins.examples.wuipreferencescreenbottom.Module</Gerrit-Module> - - <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor> - <Implementation-URL>https://gerrit-review.googlesource.com/#/admin/projects/plugins/examples</Implementation-URL> - - <Implementation-Title>Example Preference Screen Panel Bottom</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - - <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> - <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>gwt-maven-plugin</artifactId> - <version>${GWT-Version}</version> - <configuration> - <module>com.googlesource.gerrit.plugins.examples.wuipreferencescreenbottom.HelloForm</module> - <disableClassMetadata>true</disableClassMetadata> - <disableCastChecking>true</disableCastChecking> - <webappDirectory>${project.build.directory}/classes/static</webappDirectory> - </configuration> - <executions> - <execution> - <goals> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-plugin-gwtui</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${GWT-Version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <repositories> - <repository> - <id>maven.org</id> - <url>http://repo1.maven.org/maven2</url> - </repository> - </repositories> -</project>
diff --git a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/.public/example.css b/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/.public/example.css deleted file mode 100644 index cca1597..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/.public/example.css +++ /dev/null
@@ -1,8 +0,0 @@ -.example-panel { - border-spacing: 0px 5px; -} - -.example-helloButton { - margin-left: 35px !important; - margin-right: 450px !important; -}
diff --git a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/HelloForm.gwt.xml b/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/HelloForm.gwt.xml deleted file mode 100644 index 3b31233..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/HelloForm.gwt.xml +++ /dev/null
@@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (C) 2017 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 rename-to="example"> - <!-- Inherit the core Web Toolkit stuff. --> - <inherits name="com.google.gwt.user.User"/> - <!-- Other module inherits --> - <inherits name="com.google.gerrit.GerritGwtUICommon"/> - <inherits name="com.google.gerrit.Plugin"/> - <inherits name="com.google.gwt.http.HTTP"/> - <inherits name="com.google.gwt.json.JSON"/> - <!-- Using GWT built-in themes adds a number of static --> - <!-- resources to the plugin. No theme inherits lines were --> - <!-- added in order to make this plugin as simple as possible --> - <!-- Specify the app entry point class. --> - <entry-point class="com.googlesource.gerrit.plugins.examples.wuipreferencescreenbottom.client.ExamplePlugin"/> -</module>
diff --git a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/Module.java b/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/Module.java deleted file mode 100644 index 79883b0..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/Module.java +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuipreferencescreenbottom; - -import com.google.gerrit.extensions.registration.DynamicSet; -import com.google.gerrit.extensions.webui.GwtPlugin; -import com.google.gerrit.extensions.webui.WebUiPlugin; -import com.google.inject.AbstractModule; - -public class Module extends AbstractModule { - - @Override - protected void configure() { - DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("example")); - } -}
diff --git a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/client/ChangeScreenPreferencePanel.java b/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/client/ChangeScreenPreferencePanel.java deleted file mode 100644 index bbee10a..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/client/ChangeScreenPreferencePanel.java +++ /dev/null
@@ -1,161 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuipreferencescreenbottom.client; - -import com.google.gerrit.client.info.GeneralPreferences; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.extension.Panel; -import com.google.gerrit.plugin.client.rpc.RestApi; -import com.google.gwt.dom.client.Style.Unit; -import com.google.gwt.event.dom.client.ChangeEvent; -import com.google.gwt.event.dom.client.ChangeHandler; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.ListBox; -import com.google.gwt.user.client.ui.VerticalPanel; -import java.util.Map; - -public class ChangeScreenPreferencePanel extends VerticalPanel { - private static final String DEFAULT = "DEFAULT"; - private static final String EXAMPLE = "EXAMPLE"; - private static final String OTHER = "OTHER"; - private static final String DEFAULT_URL_MATCH = "/c/(.*)"; - private static final String EXAMPLE_URL_TOKEN = "/x/" + Plugin.get().getName() + "/c/$1"; - - static class Factory implements Panel.EntryPoint { - @Override - public void onLoad(Panel panel) { - panel.setWidget(new ChangeScreenPreferencePanel()); - } - } - - private Label savedLabel; - private Timer hideTimer; - - ChangeScreenPreferencePanel() { - new RestApi("accounts") - .id("self") - .view("preferences") - .get( - new AsyncCallback<GeneralPreferences>() { - @Override - public void onSuccess(GeneralPreferences result) { - display(result); - } - - @Override - public void onFailure(Throwable caught) { - // never invoked - } - }); - } - - private void display(final GeneralPreferences info) { - Label heading = new Label(Plugin.get().getName() + " plugin"); - heading.setStyleName("smallHeading"); - add(heading); - HorizontalPanel p = new HorizontalPanel(); - add(p); - - Label label = new Label("Change Screen:"); - p.add(label); - label.getElement().getStyle().setMarginRight(5, Unit.PX); - label.getElement().getStyle().setMarginTop(2, Unit.PX); - final ListBox box = new ListBox(); - p.add(box); - savedLabel = new Label("Saved"); - savedLabel.getElement().getStyle().setMarginLeft(5, Unit.PX); - savedLabel.getElement().getStyle().setMarginTop(2, Unit.PX); - savedLabel.setVisible(false); - p.add(savedLabel); - - box.addItem(DEFAULT, DEFAULT); - box.addItem(EXAMPLE, EXAMPLE); - - String selected = DEFAULT; - if (info.urlAliases().containsKey(DEFAULT_URL_MATCH)) { - String token = info.urlAliases().get(DEFAULT_URL_MATCH); - if (token.equals(EXAMPLE_URL_TOKEN)) { - selected = EXAMPLE; - } else if (!token.equals(DEFAULT_URL_MATCH)) { - box.addItem(OTHER, OTHER); - selected = OTHER; - } - } - - for (int i = 0; i < box.getItemCount(); i++) { - if (selected.equals(box.getValue(i))) { - box.setSelectedIndex(i); - break; - } - } - - box.addChangeHandler( - new ChangeHandler() { - @Override - public void onChange(ChangeEvent event) { - savedLabel.setVisible(false); - if (box.getSelectedValue().equals(OTHER)) { - return; - } - - Map<String, String> urlAliases = info.urlAliases(); - if (box.getSelectedValue().equals(EXAMPLE)) { - urlAliases.put(DEFAULT_URL_MATCH, EXAMPLE_URL_TOKEN); - } else { - urlAliases.remove(DEFAULT_URL_MATCH); - } - info.setUrlAliases(urlAliases); - - new RestApi("accounts") - .id("self") - .view("preferences") - .put( - info, - new AsyncCallback<GeneralPreferences>() { - @Override - public void onSuccess(GeneralPreferences result) { - Plugin.get().refreshUserPreferences(); - showSavedStatus(); - } - - @Override - public void onFailure(Throwable caught) { - // never invoked - } - }); - } - }); - } - - private void showSavedStatus() { - if (hideTimer != null) { - hideTimer.cancel(); - hideTimer = null; - } - savedLabel.setVisible(true); - hideTimer = - new Timer() { - @Override - public void run() { - savedLabel.setVisible(false); - hideTimer = null; - } - }; - hideTimer.schedule(1000); - } -}
diff --git a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/client/ExamplePlugin.java b/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/client/ExamplePlugin.java deleted file mode 100644 index 2714cf6..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuipreferencescreenbottom/client/ExamplePlugin.java +++ /dev/null
@@ -1,34 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuipreferencescreenbottom.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.Resources; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.PluginEntryPoint; -import com.google.gwt.core.client.GWT; - -public class ExamplePlugin extends PluginEntryPoint { - public static final Resources RESOURCES = GWT.create(Resources.class); - - @Override - public void onPluginLoad() { - Plugin.get() - .panel( - GerritUiExtensionPoint.PREFERENCES_SCREEN_BOTTOM, - new ChangeScreenPreferencePanel.Factory(), - "change_screen_preferences"); - } -}
diff --git a/example-wuiPreferenceScreenBottom-GWT/src/main/resources/Documentation/about.md b/example-wuiPreferenceScreenBottom-GWT/src/main/resources/Documentation/about.md deleted file mode 100644 index 87eea80..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1 +0,0 @@ -Sample plugin to demonstrate extending the Preferences under Gerrit's Settings page
diff --git a/example-wuiPreferenceScreenBottom-GWT/tools/bzl/BUILD b/example-wuiPreferenceScreenBottom-GWT/tools/bzl/BUILD deleted file mode 100644 index e69de29..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/tools/bzl/BUILD +++ /dev/null
diff --git a/example-wuiPreferenceScreenBottom-GWT/tools/bzl/plugin.bzl b/example-wuiPreferenceScreenBottom-GWT/tools/bzl/plugin.bzl deleted file mode 100644 index 89a1643..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,8 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _plugin_deps = "PLUGIN_DEPS", -) - -gerrit_plugin = _gerrit_plugin -PLUGIN_DEPS = _plugin_deps
diff --git a/example-wuiPreferenceScreenBottom-GWT/tools/workspace-status.sh b/example-wuiPreferenceScreenBottom-GWT/tools/workspace-status.sh deleted file mode 100755 index c1a741e..0000000 --- a/example-wuiPreferenceScreenBottom-GWT/tools/workspace-status.sh +++ /dev/null
@@ -1,17 +0,0 @@ -#!/bin/bash - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -function rev() { - git describe --always --match "v[0-9].*" --dirty -} - -echo STABLE_BUILD_EXAMPLE-WUIPREFERENCESCREENBOTTOM-GWT_LABEL $(rev)
diff --git a/example-wuiProfileExtensionBottom-GWT/.bazelrc b/example-wuiProfileExtensionBottom-GWT/.bazelrc deleted file mode 100644 index 4ed16cf..0000000 --- a/example-wuiProfileExtensionBottom-GWT/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command=./tools/workspace-status.sh -test --build_tests_only
diff --git a/example-wuiProfileExtensionBottom-GWT/BUILD b/example-wuiProfileExtensionBottom-GWT/BUILD deleted file mode 100644 index 4419e77..0000000 --- a/example-wuiProfileExtensionBottom-GWT/BUILD +++ /dev/null
@@ -1,15 +0,0 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") - -MODULE = "com.googlesource.gerrit.plugins.examples.wuiprofileextensionbottom.HelloForm" - -gerrit_plugin( - name = "example-wuiProfileExtensionBottom-GWT", - srcs = glob(["src/main/java/**/*.java"]), - gwt_module = MODULE, - manifest_entries = [ - "Gerrit-PluginName: example-wuiProfileExtensionBottom-GWT", - "Gerrit-Module: com.googlesource.gerrit.plugins.examples.wuiprofileextensionbottom.Module", - "Implementation-Title: Example Profile Extension Bottom", - ], - resources = glob(["src/main/**/*"]), -)
diff --git a/example-wuiProfileExtensionBottom-GWT/LICENSE b/example-wuiProfileExtensionBottom-GWT/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/example-wuiProfileExtensionBottom-GWT/LICENSE +++ /dev/null
@@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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.
diff --git a/example-wuiProfileExtensionBottom-GWT/WORKSPACE b/example-wuiProfileExtensionBottom-GWT/WORKSPACE deleted file mode 100644 index 115e621..0000000 --- a/example-wuiProfileExtensionBottom-GWT/WORKSPACE +++ /dev/null
@@ -1,33 +0,0 @@ -workspace(name = "wuiProfileExtensionBottom") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", - # local_path = "/home/<user>/projects/bazlets", -) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-wuiProfileExtensionBottom-GWT/bazlets.bzl b/example-wuiProfileExtensionBottom-GWT/bazlets.bzl deleted file mode 100644 index 6c4fffc..0000000 --- a/example-wuiProfileExtensionBottom-GWT/bazlets.bzl +++ /dev/null
@@ -1,19 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None - ): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/example-wuiProfileExtensionBottom-GWT/pom.xml b/example-wuiProfileExtensionBottom-GWT/pom.xml deleted file mode 100644 index c1ee70c..0000000 --- a/example-wuiProfileExtensionBottom-GWT/pom.xml +++ /dev/null
@@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (C) 2013 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> - - <groupId>com.googlesource.gerrit.plugins</groupId> - <artifactId>example-wuiProfileExtensionBottom</artifactId> - <packaging>jar</packaging> - <version>2.16.13</version> - <properties> - <Gerrit-ApiType>plugin</Gerrit-ApiType> - <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion> - <GWT-Version>2.8.2</GWT-Version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <configuration> - <archive> - <manifestEntries> - <Gerrit-PluginName>example-wuiProfileExtensionBottom</Gerrit-PluginName> - <Gerrit-Module>com.googlesource.gerrit.plugins.examples.wuiprofileextensionbottom.Module</Gerrit-Module> - - <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor> - <Implementation-URL>https://gerrit-review.googlesource.com/#/admin/projects/plugins/examples</Implementation-URL> - - <Implementation-Title>Example Profile Extension Bottom</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - - <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> - <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>gwt-maven-plugin</artifactId> - <version>${GWT-Version}</version> - <configuration> - <module>com.googlesource.gerrit.plugins.examples.wuiprofileextensionbottom.HelloForm</module> - <disableClassMetadata>true</disableClassMetadata> - <disableCastChecking>true</disableCastChecking> - <webappDirectory>${project.build.directory}/classes/static</webappDirectory> - </configuration> - <executions> - <execution> - <goals> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-plugin-gwtui</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${GWT-Version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <repositories> - <repository> - <id>maven.org</id> - <url>http://repo1.maven.org/maven2</url> - </repository> - </repositories> -</project>
diff --git a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/HelloForm.gwt.xml b/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/HelloForm.gwt.xml deleted file mode 100644 index 9cebdeb..0000000 --- a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/HelloForm.gwt.xml +++ /dev/null
@@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (C) 2017 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 rename-to="example"> - <!-- Inherit the core Web Toolkit stuff. --> - <inherits name="com.google.gwt.user.User"/> - <!-- Other module inherits --> - <inherits name="com.google.gerrit.GerritGwtUICommon"/> - <inherits name="com.google.gerrit.Plugin"/> - <inherits name="com.google.gwt.http.HTTP"/> - <inherits name="com.google.gwt.json.JSON"/> - <!-- Using GWT built-in themes adds a number of static --> - <!-- resources to the plugin. No theme inherits lines were --> - <!-- added in order to make this plugin as simple as possible --> - <!-- Specify the app entry point class. --> - <entry-point class="com.googlesource.gerrit.plugins.examples.wuiprofileextensionbottom.client.ExamplePlugin"/> - <stylesheet src="example.css"/> -</module>
diff --git a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/Module.java b/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/Module.java deleted file mode 100644 index ef5d5a2..0000000 --- a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/Module.java +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuiprofileextensionbottom; - -import com.google.gerrit.extensions.registration.DynamicSet; -import com.google.gerrit.extensions.webui.GwtPlugin; -import com.google.gerrit.extensions.webui.WebUiPlugin; -import com.google.inject.AbstractModule; - -public class Module extends AbstractModule { - - @Override - protected void configure() { - DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("example")); - } -}
diff --git a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/client/ExamplePlugin.java b/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/client/ExamplePlugin.java deleted file mode 100644 index 2770325..0000000 --- a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/client/ExamplePlugin.java +++ /dev/null
@@ -1,34 +0,0 @@ -// Copyright (C) 2013 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.googlesource.gerrit.plugins.examples.wuiprofileextensionbottom.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.Resources; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.PluginEntryPoint; -import com.google.gwt.core.client.GWT; - -public class ExamplePlugin extends PluginEntryPoint { - public static final Resources RESOURCES = GWT.create(Resources.class); - - @Override - public void onPluginLoad() { - Plugin.get() - .panel( - GerritUiExtensionPoint.PROFILE_SCREEN_BOTTOM, - new ExampleProfileExtension.Factory(), - "account_info"); - } -}
diff --git a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/client/ExampleProfileExtension.java b/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/client/ExampleProfileExtension.java deleted file mode 100644 index 7319247..0000000 --- a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/client/ExampleProfileExtension.java +++ /dev/null
@@ -1,61 +0,0 @@ -// Copyright (C) 2015 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.googlesource.gerrit.plugins.examples.wuiprofileextensionbottom.client; - -import com.google.gerrit.client.GerritUiExtensionPoint; -import com.google.gerrit.client.info.AccountInfo; -import com.google.gerrit.plugin.client.extension.Panel; -import com.google.gwt.user.client.ui.Grid; -import com.google.gwt.user.client.ui.HTMLTable.CellFormatter; -import com.google.gwt.user.client.ui.VerticalPanel; - -/** Extension for the user profile screen. */ -public class ExampleProfileExtension extends VerticalPanel { - static class Factory implements Panel.EntryPoint { - @Override - public void onLoad(Panel panel) { - AccountInfo accountInfo = panel.getObject(GerritUiExtensionPoint.Key.ACCOUNT_INFO).cast(); - panel.setWidget(new ExampleProfileExtension(accountInfo)); - } - } - - ExampleProfileExtension(AccountInfo accountInfo) { - Grid g = new Grid(3, 2); - g.addStyleName("infoBlock"); - g.addStyleName("accountInfoBlock"); - CellFormatter fmt = g.getCellFormatter(); - - // TODO: fetch employer and department via REST from server, - // e.g. GET /accounts/self/example~info - - g.setText(0, 0, "Employer"); - fmt.addStyleName(0, 0, "header"); - g.setText(0, 1, "Example Corporation"); - - g.setText(1, 0, "Department"); - fmt.addStyleName(1, 0, "header"); - g.setText(1, 1, "Cookies " + accountInfo.email()); - - g.setText(2, 0, "Example Email"); - fmt.addStyleName(2, 0, "header"); - g.setText( - 2, 1, accountInfo.username() != null ? accountInfo.username() + "@example.com" : "N/A"); - add(g); - - fmt.addStyleName(0, 0, "topmost"); - fmt.addStyleName(0, 1, "topmost"); - fmt.addStyleName(2, 0, "bottomheader"); - } -}
diff --git a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/public/example.css b/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/public/example.css deleted file mode 100644 index cca1597..0000000 --- a/example-wuiProfileExtensionBottom-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuiprofileextensionbottom/public/example.css +++ /dev/null
@@ -1,8 +0,0 @@ -.example-panel { - border-spacing: 0px 5px; -} - -.example-helloButton { - margin-left: 35px !important; - margin-right: 450px !important; -}
diff --git a/example-wuiProfileExtensionBottom-GWT/src/main/resources/Documentation/about.md b/example-wuiProfileExtensionBottom-GWT/src/main/resources/Documentation/about.md deleted file mode 100644 index 396d1fc..0000000 --- a/example-wuiProfileExtensionBottom-GWT/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1 +0,0 @@ -Sample plugin to demonstrate extending Profile under Gerrit's Settings
diff --git a/example-wuiProfileExtensionBottom-GWT/tools/bzl/BUILD b/example-wuiProfileExtensionBottom-GWT/tools/bzl/BUILD deleted file mode 100644 index e69de29..0000000 --- a/example-wuiProfileExtensionBottom-GWT/tools/bzl/BUILD +++ /dev/null
diff --git a/example-wuiProfileExtensionBottom-GWT/tools/bzl/plugin.bzl b/example-wuiProfileExtensionBottom-GWT/tools/bzl/plugin.bzl deleted file mode 100644 index 89a1643..0000000 --- a/example-wuiProfileExtensionBottom-GWT/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,8 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _plugin_deps = "PLUGIN_DEPS", -) - -gerrit_plugin = _gerrit_plugin -PLUGIN_DEPS = _plugin_deps
diff --git a/example-wuiProfileExtensionBottom-GWT/tools/workspace-status.sh b/example-wuiProfileExtensionBottom-GWT/tools/workspace-status.sh deleted file mode 100755 index 47b65e0..0000000 --- a/example-wuiProfileExtensionBottom-GWT/tools/workspace-status.sh +++ /dev/null
@@ -1,17 +0,0 @@ -#!/bin/bash - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -function rev() { - git describe --always --match "v[0-9].*" --dirty -} - -echo STABLE_BUILD_EXAMPLE-WUIPROFILEEXTENSIONBOTTOM-GWT_LABEL $(rev)
diff --git a/example-wuiSettingsScreen-GWT/.bazelrc b/example-wuiSettingsScreen-GWT/.bazelrc deleted file mode 100644 index 4ed16cf..0000000 --- a/example-wuiSettingsScreen-GWT/.bazelrc +++ /dev/null
@@ -1,2 +0,0 @@ -build --workspace_status_command=./tools/workspace-status.sh -test --build_tests_only
diff --git a/example-wuiSettingsScreen-GWT/BUILD b/example-wuiSettingsScreen-GWT/BUILD deleted file mode 100644 index 13bb651..0000000 --- a/example-wuiSettingsScreen-GWT/BUILD +++ /dev/null
@@ -1,15 +0,0 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") - -MODULE = "com.googlesource.gerrit.plugins.examples.wuisettingsscreen.HelloForm" - -gerrit_plugin( - name = "example-wuiSettingsScreen-GWT", - srcs = glob(["src/main/java/**/*.java"]), - gwt_module = MODULE, - manifest_entries = [ - "Gerrit-PluginName: example-wuiSettingsScreen-GWT", - "Gerrit-Module: com.googlesource.gerrit.plugins.examples.wuisettingsscreen.Module", - "Implementation-Title: Example Settings Screen Extension", - ], - resources = glob(["src/main/**/*"]), -)
diff --git a/example-wuiSettingsScreen-GWT/LICENSE b/example-wuiSettingsScreen-GWT/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/example-wuiSettingsScreen-GWT/LICENSE +++ /dev/null
@@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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.
diff --git a/example-wuiSettingsScreen-GWT/WORKSPACE b/example-wuiSettingsScreen-GWT/WORKSPACE deleted file mode 100644 index fbeedbb..0000000 --- a/example-wuiSettingsScreen-GWT/WORKSPACE +++ /dev/null
@@ -1,33 +0,0 @@ -workspace(name = "wuiSettingsScreen") - -load("//:bazlets.bzl", "load_bazlets") - -load_bazlets( - commit = "23d849dfd1876c1b4b88efa55a4f716895e33fa3", - # local_path = "/home/<user>/projects/bazlets", -) - -# Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API -#load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", -#) - -load( - "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl", - "gerrit_gwt", -) - -# Load release Plugin API -gerrit_api() - -# Load snapshot Plugin API -#gerrit_api_maven_local() - -gerrit_gwt()
diff --git a/example-wuiSettingsScreen-GWT/bazlets.bzl b/example-wuiSettingsScreen-GWT/bazlets.bzl deleted file mode 100644 index 6c4fffc..0000000 --- a/example-wuiSettingsScreen-GWT/bazlets.bzl +++ /dev/null
@@ -1,19 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -NAME = "com_googlesource_gerrit_bazlets" - -def load_bazlets( - commit, - local_path = None - ): - if not local_path: - git_repository( - name = NAME, - remote = "https://gerrit.googlesource.com/bazlets", - commit = commit, - ) - else: - native.local_repository( - name = NAME, - path = local_path, - )
diff --git a/example-wuiSettingsScreen-GWT/pom.xml b/example-wuiSettingsScreen-GWT/pom.xml deleted file mode 100644 index 70904a1..0000000 --- a/example-wuiSettingsScreen-GWT/pom.xml +++ /dev/null
@@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (C) 2013 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> - - <groupId>com.googlesource.gerrit.plugins</groupId> - <artifactId>example-wuiSettingsScreen</artifactId> - <packaging>jar</packaging> - <version>2.16.13</version> - <properties> - <Gerrit-ApiType>plugin</Gerrit-ApiType> - <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion> - <GWT-Version>2.8.2</GWT-Version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <configuration> - <archive> - <manifestEntries> - <Gerrit-PluginName>example-wuiSettingsScreen</Gerrit-PluginName> - <Gerrit-Module>com.googlesource.gerrit.plugins.examples.wuisettingsscreen.Module</Gerrit-Module> - - <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor> - <Implementation-URL>https://gerrit-review.googlesource.com/#/admin/projects/plugins/examples</Implementation-URL> - - <Implementation-Title>Example Settings Screen Extension</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - - <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> - <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>gwt-maven-plugin</artifactId> - <version>${GWT-Version}</version> - <configuration> - <module>com.googlesource.gerrit.plugins.examples.wuisettingsscreen.HelloForm</module> - <disableClassMetadata>true</disableClassMetadata> - <disableCastChecking>true</disableCastChecking> - <webappDirectory>${project.build.directory}/classes/static</webappDirectory> - </configuration> - <executions> - <execution> - <goals> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gerrit</groupId> - <artifactId>gerrit-plugin-gwtui</artifactId> - <version>${Gerrit-ApiVersion}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${GWT-Version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <repositories> - <repository> - <id>maven.org</id> - <url>http://repo1.maven.org/maven2</url> - </repository> - </repositories> -</project>
diff --git a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/HelloForm.gwt.xml b/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/HelloForm.gwt.xml deleted file mode 100644 index bf4cd41..0000000 --- a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/HelloForm.gwt.xml +++ /dev/null
@@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (C) 2017 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 rename-to="example"> - <!-- Inherit the core Web Toolkit stuff. --> - <inherits name="com.google.gwt.user.User"/> - <!-- Other module inherits --> - <inherits name="com.google.gerrit.GerritGwtUICommon"/> - <inherits name="com.google.gerrit.Plugin"/> - <inherits name="com.google.gwt.http.HTTP"/> - <inherits name="com.google.gwt.json.JSON"/> - <!-- Using GWT built-in themes adds a number of static --> - <!-- resources to the plugin. No theme inherits lines were --> - <!-- added in order to make this plugin as simple as possible --> - <!-- Specify the app entry point class. --> - <entry-point class="com.googlesource.gerrit.plugins.examples.wuisettingsscreen.client.ExamplePlugin"/> - <stylesheet src="example.css"/> -</module>
diff --git a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/Module.java b/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/Module.java deleted file mode 100644 index bb203d2..0000000 --- a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/Module.java +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright (C) 2017 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.googlesource.gerrit.plugins.examples.wuisettingsscreen; - -import com.google.gerrit.extensions.registration.DynamicSet; -import com.google.gerrit.extensions.webui.GwtPlugin; -import com.google.gerrit.extensions.webui.WebUiPlugin; -import com.google.inject.AbstractModule; - -public class Module extends AbstractModule { - - @Override - protected void configure() { - DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("example")); - } -}
diff --git a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/client/ExamplePlugin.java b/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/client/ExamplePlugin.java deleted file mode 100644 index c612751..0000000 --- a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/client/ExamplePlugin.java +++ /dev/null
@@ -1,30 +0,0 @@ -// Copyright (C) 2013 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.googlesource.gerrit.plugins.examples.wuisettingsscreen.client; - -import com.google.gerrit.client.Resources; -import com.google.gerrit.plugin.client.Plugin; -import com.google.gerrit.plugin.client.PluginEntryPoint; -import com.google.gwt.core.client.GWT; - -public class ExamplePlugin extends PluginEntryPoint { - public static final Resources RESOURCES = GWT.create(Resources.class); - - @Override - public void onPluginLoad() { - Plugin.get() - .settingsScreen("preferences", "Food Preferences", new FoodPreferencesScreen.Factory()); - } -}
diff --git a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/client/FoodPreferencesScreen.java b/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/client/FoodPreferencesScreen.java deleted file mode 100644 index 98ba029..0000000 --- a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/client/FoodPreferencesScreen.java +++ /dev/null
@@ -1,69 +0,0 @@ -// Copyright (C) 2015 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.googlesource.gerrit.plugins.examples.wuisettingsscreen.client; - -import com.google.gerrit.plugin.client.screen.Screen; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.KeyPressEvent; -import com.google.gwt.event.dom.client.KeyPressHandler; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Panel; -import com.google.gwt.user.client.ui.TextArea; -import com.google.gwt.user.client.ui.VerticalPanel; - -class FoodPreferencesScreen extends VerticalPanel { - static class Factory implements Screen.EntryPoint { - @Override - public void onLoad(Screen screen) { - screen.setPageTitle("Settings"); - screen.show(new FoodPreferencesScreen()); - } - } - - FoodPreferencesScreen() { - setStyleName("example-panel"); - - Panel messagePanel = new VerticalPanel(); - messagePanel.add(new Label("Food Allergies or Dietary Concerns:")); - TextArea txt = new TextArea(); - txt.addKeyPressHandler( - new KeyPressHandler() { - @Override - public void onKeyPress(final KeyPressEvent event) { - event.stopPropagation(); - } - }); - txt.setVisibleLines(12); - txt.setCharacterWidth(80); - txt.getElement().setPropertyBoolean("spellcheck", false); - messagePanel.add(txt); - add(messagePanel); - - Button helloButton = new Button("Save"); - helloButton.addStyleName("example-helloButton"); - helloButton.addClickHandler( - new ClickHandler() { - @Override - public void onClick(final ClickEvent event) { - Window.alert("TODO: implement save"); - } - }); - add(helloButton); - helloButton.setEnabled(true); - } -}
diff --git a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/public/example.css b/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/public/example.css deleted file mode 100644 index cca1597..0000000 --- a/example-wuiSettingsScreen-GWT/src/main/java/com/googlesource/gerrit/plugins/examples/wuisettingsscreen/public/example.css +++ /dev/null
@@ -1,8 +0,0 @@ -.example-panel { - border-spacing: 0px 5px; -} - -.example-helloButton { - margin-left: 35px !important; - margin-right: 450px !important; -}
diff --git a/example-wuiSettingsScreen-GWT/src/main/resources/Documentation/about.md b/example-wuiSettingsScreen-GWT/src/main/resources/Documentation/about.md deleted file mode 100644 index fe525a6..0000000 --- a/example-wuiSettingsScreen-GWT/src/main/resources/Documentation/about.md +++ /dev/null
@@ -1 +0,0 @@ -Sample plugin to demonstrate adding a new section under Gerrit's Settings page
diff --git a/example-wuiSettingsScreen-GWT/tools/bzl/BUILD b/example-wuiSettingsScreen-GWT/tools/bzl/BUILD deleted file mode 100644 index e69de29..0000000 --- a/example-wuiSettingsScreen-GWT/tools/bzl/BUILD +++ /dev/null
diff --git a/example-wuiSettingsScreen-GWT/tools/bzl/plugin.bzl b/example-wuiSettingsScreen-GWT/tools/bzl/plugin.bzl deleted file mode 100644 index 89a1643..0000000 --- a/example-wuiSettingsScreen-GWT/tools/bzl/plugin.bzl +++ /dev/null
@@ -1,8 +0,0 @@ -load( - "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", - _gerrit_plugin = "gerrit_plugin", - _plugin_deps = "PLUGIN_DEPS", -) - -gerrit_plugin = _gerrit_plugin -PLUGIN_DEPS = _plugin_deps
diff --git a/example-wuiSettingsScreen-GWT/tools/workspace-status.sh b/example-wuiSettingsScreen-GWT/tools/workspace-status.sh deleted file mode 100755 index 87de50d..0000000 --- a/example-wuiSettingsScreen-GWT/tools/workspace-status.sh +++ /dev/null
@@ -1,17 +0,0 @@ -#!/bin/bash - -# This script will be run by bazel when the build process starts to -# generate key-value information that represents the status of the -# workspace. The output should be like -# -# KEY1 VALUE1 -# KEY2 VALUE2 -# -# If the script exits with non-zero code, it's considered as a failure -# and the output will be discarded. - -function rev() { - git describe --always --match "v[0-9].*" --dirty -} - -echo STABLE_BUILD_EXAMPLE-WUISETTINGSSCREEN-GWT_LABEL $(rev)