Merge branch 'stable-2.15'

* stable-2.15:
  bazlets: Replace native.git_repository with skylark rule
  Upgrade bazlets to latest stable-2.15 to build with 2.15.5 API
  Upgrade bazlets to latest stable-2.14 to build with 2.14.15 API
  Format all Bazel build files with buildifier
  Migrate (i.e. move) `tools/bazel.rc` to `.bazelrc`
  Update bazlets to build with current latest 2.14.14 API
  Make plugin compile against stable-2.15
  Add CSS styling to change message
  Allow change message to be inherited from parent project

Change-Id: I150a9e696c708db4a79f79594726ba41546b3704
diff --git a/tools/bazel.rc b/.bazelrc
similarity index 100%
rename from tools/bazel.rc
rename to .bazelrc
diff --git a/BUILD b/BUILD
index 6c72d6d..932b8ff 100644
--- a/BUILD
+++ b/BUILD
@@ -1,7 +1,7 @@
 load(
     "//tools/bzl:plugin.bzl",
-    "gerrit_plugin",
     "PLUGIN_DEPS",
+    "gerrit_plugin",
 )
 
 gerrit_plugin(
diff --git a/WORKSPACE b/WORKSPACE
index 830ff1a..7292d8b 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,7 +3,7 @@
 load("//:bazlets.bzl", "load_bazlets")
 
 load_bazlets(
-    commit = "42bffc66c0e92753133e4cea2debe65abc359c4d",
+    commit = "6d3fd710ea4ca44805bb8c858d72b53bd3a500f3",
     #    local_path = "/home/<user>/projects/bazlets",
 )
 
diff --git a/bazlets.bzl b/bazlets.bzl
index e14e488..f089af4 100644
--- a/bazlets.bzl
+++ b/bazlets.bzl
@@ -1,17 +1,18 @@
+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:
-      native.git_repository(
-          name = NAME,
-          remote = "https://gerrit.googlesource.com/bazlets",
-          commit = commit,
-      )
-  else:
-      native.local_repository(
-          name = NAME,
-          path = local_path,
-      )
+        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/src/main/java/com/googlesource/gerrit/plugins/changemessage/rest/GetChangeInfo.java b/src/main/java/com/googlesource/gerrit/plugins/changemessage/rest/GetChangeInfo.java
index 2e04e8d..d7694d9 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/changemessage/rest/GetChangeInfo.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/changemessage/rest/GetChangeInfo.java
@@ -19,6 +19,7 @@
 import com.google.gerrit.server.change.ChangeResource;
 import com.google.gerrit.server.config.PluginConfig;
 import com.google.gerrit.server.config.PluginConfigFactory;
+import com.google.gerrit.server.project.NoSuchProjectException;
 import com.google.inject.Inject;
 
 public class GetChangeInfo implements RestReadView<ChangeResource> {
@@ -32,10 +33,9 @@
   }
 
   @Override
-  public String apply(ChangeResource rsrc) {
+  public String apply(ChangeResource rsrc) throws NoSuchProjectException {
     PluginConfig cfg =
-        cfgFactory.getFromProjectConfig(
-            rsrc.getControl().getProjectControl().getProjectState(), pluginName);
+        cfgFactory.getFromProjectConfigWithInheritance(rsrc.getProject(), pluginName);
     return cfg.getString("changeInfo");
   }
 }
diff --git a/src/main/resources/static/info.js b/src/main/resources/static/info.js
index ca93e74..2ba198c 100644
--- a/src/main/resources/static/info.js
+++ b/src/main/resources/static/info.js
@@ -26,7 +26,22 @@
         if (r != null) {
           var doc = document;
           var frg = doc.createDocumentFragment();
-          var p = doc.createElement('p');
+	  var p = doc.createElement('textarea');
+	  p.style.border = "3px solid transparent";
+	  p.style.borderRadius = "10px";
+	  p.style.boxShadow = "0 0 0 3px #fff1a8";
+	  p.style.background = "#fff1a8";
+	  p.style.minWidth = "100%";
+	  p.style.maxWidth = "458px";
+	  p.style.height = "35px";
+	  p.style.minHeight = "35px";
+	  p.style.maxHeight = "125px";
+          p.style.paddingTop = "5px";
+	  p.style.paddingBottom = "5px";
+	  p.style.paddingLeft = "5px";
+	  p.style.paddingRight = "5px";
+	  p.style.overflow = "auto";
+	  p.setAttribute("readonly",true);
           p.appendChild(doc.createTextNode(r));
           frg.appendChild(p);
 
diff --git a/tools/bzl/plugin.bzl b/tools/bzl/plugin.bzl
index 956dd59..c157125 100644
--- a/tools/bzl/plugin.bzl
+++ b/tools/bzl/plugin.bzl
@@ -1,5 +1,5 @@
 load(
     "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl",
-    "gerrit_plugin",
     "PLUGIN_DEPS",
+    "gerrit_plugin",
 )