1 /*
2  * CommandPaletteEntryProvider.java
3  *
4  * Copyright (C) 2021 by RStudio, PBC
5  *
6  * Unless you have received this program directly from RStudio pursuant
7  * to the terms of a commercial license agreement with RStudio, then
8  * this program is licensed to you under the terms of version 3 of the
9  * GNU Affero General Public License. This program is distributed WITHOUT
10  * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
12  * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
13  *
14  */
15 package org.rstudio.studio.client.palette.model;
16 
17 import java.util.List;
18 
19 public interface CommandPaletteEntryProvider
20 {
21    /**
22     * A list of all of the elements to be rendered as entries in the palette.
23     *
24     * @return A list of elements.
25     */
getCommandPaletteItems()26    List<CommandPaletteItem> getCommandPaletteItems();
27 
28    /**
29     * Retrieves a specific palette item by ID.
30     *
31     * @param id The ID to look up
32     * @return A command palette item with the given ID, or null if no item
33     *    with the given ID exists.
34     */
getCommandPaletteItem(String id)35    CommandPaletteItem getCommandPaletteItem(String id);
36 
37    /**
38     * Gets the scope name supplied by this provider.
39     *
40     * @return The name of the scope
41     */
getProviderScope()42    String getProviderScope();
43 }
44