Let GWT plugins access the AccountInfo of the current user

Add a method to the Plugin API that allows GWT plugins to get the
AccountInfo of the current user. In the JavaScript API this method was
already available. Since now the AccountInfo class is visible to GWT
plugins this method can be added.

Change-Id: Iaed88828089bbe51d7f51e1b7117a43e11e92943
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/Plugin.java b/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/Plugin.java
index 38929e9..23fa308 100644
--- a/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/Plugin.java
+++ b/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/Plugin.java
@@ -15,6 +15,7 @@
 package com.google.gerrit.plugin.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.gerrit.plugin.client.screen.Screen;
 import com.google.gwt.core.client.GWT;
@@ -56,6 +57,10 @@
   public final native void refreshMenuBar()
   /*-{ return this.refreshMenuBar() }-*/;
 
+  /** @return the current user */
+  public final native AccountInfo getCurrentUser()
+  /*-{ return this.getCurrentUser() }-*/;
+
   /** Check if user is signed in. */
   public final native boolean isSignedIn()
   /*-{ return this.isSignedIn() }-*/;