Allow UiCommands to appear in more than one place
Some commands might want to list themselves in multiple contexts. Support this by asking them to return a set describing where they can be positioned. Change-Id: I401e032f3a574f6c485abb1c1dd5bfa7d792f2ab
This commit is contained in:
@@ -17,12 +17,14 @@ package com.google.gerrit.extensions.webui;
|
||||
import com.google.gerrit.extensions.restapi.RestResource;
|
||||
import com.google.gerrit.extensions.restapi.RestView;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public interface UiCommand<R extends RestResource> extends RestView<R> {
|
||||
public static enum Place {
|
||||
PATCHSET_ACTION_PANEL;
|
||||
};
|
||||
|
||||
Place getPlace();
|
||||
Set<Place> getPlaces();
|
||||
String getLabel(R resource);
|
||||
String getTitle(R resource);
|
||||
boolean isVisible(R resource);
|
||||
|
||||
Reference in New Issue
Block a user