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:
Shawn Pearce
2013-05-10 17:41:10 -07:00
parent cfbd2e9982
commit 2bcfc66424
2 changed files with 6 additions and 2 deletions

View File

@@ -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);