If a screen is registered by a plugin this registration needs to be
completed before the dispatcher tries to parse the token. Wait for
plugin scripts to finish loading and evaluating. The old method of
injecting a script tag was not waiting correctly, especially for GWT
based plugins.
JavaScript plugins are now required to use Gerrit.install() as this
method updates internal Gerrit state tracking the script. Not using
install() will eventually cause the UI to report the plugin as failing
to load.
GWT plugins must override onPluginLoad() not onModuleLoad(). All
plugins must recompile with the new glue code, as there is now a
handshake between the GWT plugin and the main Gerrit code.
All plugins must load within 5 seconds, otherwise the page marks them
as failed and reports loading errors. During loading a glass pane is
used to prevent the user from interacting with a partial initialized
UI. Plugins may be making critical contributions that need to be
registered before use.
A chunk of the API glue code was moved around to make each JSNI block
smaller, and better isolate purpose. Plugin is now declared in its
own Java class.
Plugin instances are now tracked in the map $wnd.Gerrit.plugins.
This allows the main code to later figure out if any instance failed
to load. Any loading errors are usually reported on the JavaScript
console as script failures, and may include stack traces.
Change-Id: Id03581437ae1010cf995ef7ba8626ece37dfc2f4
In 28694a09c9c05dc7f74a5e15f6210bb69bf72aa0 a conflict in the merge
from stable-2.8 was not resolved properly and the API build was broken.
Add back the missing part to fix the build.
Change-Id: I2b0295212631ffad0ba4b57c77b5935b8200d384
This plugin module was left out during Buck migration.
$>buck build api
produces now plugin-gwtui.jar and plugin-gwtui-src.jar.
Buck Maven bridge was enhanced to {install|deploy} the new artifact to
remote or local Maven repositories:
$>buck build install_api
deployes
gerrit-plugin-gwtui-2.9-SNAPSHOT-sources.jar
gerrit-plugin-gwtui-2.9-SNAPSHOT.jar
to local Maven repository.
Change-Id: Idae18f6df2e67fe53d57b8c35caa4226333e269b
(cherry picked from commit c8cffc8e928a9277621ffff6cb740f79cd662195)
buck build api
generates now javadocs.
buck build api_install
installs all plugin/extension related artifacts with javadocs in the
local Maven repository.
Change-Id: Ifa6a8eb469f388e16449576ff2bff01a5dce67dd
The package 'com.google.gerrit' in 'gerrit-plugin-gwtui' is renamed
to 'com.google.gerrit.plugin' since Eclipse doesn't like to have the
RestApi and Natives classes once again in the same package as in
'gerrit-gwtui'.
Change-Id: I37e28dfc52bce90204cf067b543ef91abead8e27
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This plugin module was left out during Buck migration.
$>buck build api
produces now plugin-gwtui.jar and plugin-gwtui-src.jar.
Buck Maven bridge was enhanced to {install|deploy} the new artifact to
remote or local Maven repositories:
$>buck build install_api
deployes
gerrit-plugin-gwtui-2.9-SNAPSHOT-sources.jar
gerrit-plugin-gwtui-2.9-SNAPSHOT.jar
to local Maven repository.
Change-Id: Idae18f6df2e67fe53d57b8c35caa4226333e269b
* stable-2.8:
Restore pom.xml for gerrit-plugin-gwtui
Generate javadoc for gerrit-plugin-gwtui
The version in gerrit-plugin-gwtui/pom.xml is updated to 2.9-SNAPSHOT.
Change-Id: I580c1dff33609bfbff923f381c40326cb048b5f9
This artifact is required for GWT plugins. To make the consumption of
gerrit-plugin-gwtui easier for plugin developers it should be
published to Maven central. For this having javadocs generated is
required.
Change-Id: I10749b83a7f56c26593371d57abc3862fc1bc289
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This artifact is required for GWT plugins. There is no BUCK build
for it yet and the pom.xml was accidentally deleted by dcee57212f.
Change-Id: Ib417fb3308135285248fb7a97ee3bdbba2e49089
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
The Maven build does not work since the introduction of CodeMirror.
Remove the build until to prevent people from trying to use a broken
build process. If buck is rejected this commit will be reverted, and
we will attempt to fix the Maven build to include CodeMirror. If buck
is accepted, we just saved time by avoiding a messy Maven change.
Change-Id: I147d8d1741d52f59de1d2ddce8e5e82583990c14
Additional minor changes to ChangesApi was required. This version bump
could fix problems with IE9.
Change-Id: I19af7125c696ef9a962f10260feb73c095d2b11d
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
onModuleLoad() method is automatically called by GWT framework. Calling
it once again in PluginGenerator cause double plugin initialization.
Change-Id: I86b179f0a2da99121c74d1c095281bdd7de30636
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Due to changes in the m2e Eclipse plugin for Indigo (3.7), plugin
execution no longer happens directly, but rather must be configured
through m2e's lifecycle-mapping plugin.
In order for a plugin to be invoked within Eclipse, a pluginExecution
must be defined in the lifecycle-mapping plugin corresponding to the
execution tag in the plugin definition itself.
To achieve this, a new section is added in the build section of the
POM files.
See http://goo.gl/2WCNW for details.
Change-Id: Id37cd53bea434cb9ecf8f509de8da558516e8303
Adds support for extending Gerrit's web UI using either pure
JavaScript or GWT compiled with a modified CrossSiteIframeLinker.
To add code to the web UI plugins should bind WebUiPlugin to either
GwtPlugin or JavaScriptPlugin in their plugin's Web-Module. This
tells the UI bootstrap code where to find additional JavaScript to
inject into the page before displaying content.
For a GWT based plugin:
* com.google.gerrit.client.Plugin class should be extended,
* inheritance from com.google.gerrit.Plugin should be added
to gwt.xml,
* subclass of client.Plugin should be set as entry point,
* dependency from com.google.gerrit/gerrit-plugin-gwtui should
be added to pom.xml,
* webappDirectory option for gwt-maven-plugin should be
set to ${project.build.directory}/classes/static
For JavaScript based plugins the source code should be put into
the static/ directory of the plugin's JAR file.
Currently there are no extension points for either JS or GWT plugins
to interact with. Some will be added in a future commit. With this
commit only simple modification of the UI is possible, for example
calling window.alert() or adding extra elements to page contents
based on the existing element ids.
Change-Id: I3558991ba4a1477d6cde64eb0a761a7e4c399ec3
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>