c575055ab3
So far ExternalIncludedIn extensions could only add a single row to the Included In panel. The binding was done via DynamicMap and the export name was used as row title, while the row values were provided by the implementation of the ExternalIncludedIn interface. This meant that multiple bindings were required if multiple rows needed to be added to the Included In panel. This is bad, if you have an expensive computation that results in multiple rows, because you want to do the computation only once and passing the result between different implementations of the ExternalIncludedIn extension point is difficult. Now the ExternalIncludedIn extension point allows to provide multiple Inlcuded In rows from a single implementation. This is done by returning the rows as multimap where the key is the row title. The binding is then done via DynamicSet. This breaks existing implementations of the ExternalIncludedIn extension point, but likely this extension point is not used yet (at least there is no known implementation). Also adaption existing implementations to the new interface is straight-forward. Change-Id: I938deed6b1d197dc156c9fe965f0357ff1fe65c3 Signed-off-by: Edwin Kempin <ekempin@google.com>
47 lines
1009 B
Python
47 lines
1009 B
Python
load('//tools/bzl:gwt.bzl', 'gwt_module')
|
|
|
|
SRC = 'src/main/java/com/google/gerrit/extensions/'
|
|
SRCS = glob([SRC + '**/*.java'])
|
|
|
|
EXT_API_SRCS = glob([SRC + 'client/*.java'])
|
|
|
|
gwt_module(
|
|
name = 'client',
|
|
srcs = EXT_API_SRCS,
|
|
gwt_xml = SRC + 'Extensions.gwt.xml',
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
java_binary(
|
|
name = 'extension-api',
|
|
main_class = 'Dummy',
|
|
runtime_deps = [':lib'],
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'lib',
|
|
exports = [
|
|
':api',
|
|
'//lib:guava',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
'//lib/guice:guice-servlet',
|
|
'//lib:servlet-api-3_1',
|
|
],
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
#TODO(davido): There is no provided_deps argument to java_library rule
|
|
java_library(
|
|
name = 'api',
|
|
srcs = glob([SRC + '**/*.java']),
|
|
deps = [
|
|
'//gerrit-common:annotations',
|
|
'//lib:guava',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
],
|
|
visibility = ['//visibility:public'],
|
|
)
|