@OpenApiAll
public class SelectionProvider
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SelectionProvider.Selection |
static class |
SelectionProvider.SelectionChangedEvent
An event which indicates selection change.
|
static interface |
SelectionProvider.SelectionChangedListener
Selection changed listener
|
Modifier and Type | Field and Description |
---|---|
protected SelectionProvider.Selection |
selection |
Constructor and Description |
---|
SelectionProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addSelectionChangedListener(SelectionProvider.SelectionChangedListener listener)
Adds selection changed listener
|
protected void |
fireSelectionChanged(SelectionProvider.SelectionChangedEvent event) |
static SelectionProvider |
getInstance(Project project)
Returns selection provider
|
BaseElement |
getMainElement()
Returns main element
|
java.util.Collection<? extends BaseElement> |
getSelectedElements()
Returns selected elements
|
SelectionProvider.Selection |
getSelection() |
void |
removeSelectionChangedListener(SelectionProvider.SelectionChangedListener listener)
Removes selection changed listener
|
protected SelectionProvider.Selection selection
public static SelectionProvider getInstance(Project project)
project
- where are selected elementspublic final SelectionProvider.Selection getSelection()
public final java.util.Collection<? extends BaseElement> getSelectedElements()
@CheckForNull public final BaseElement getMainElement()
public void addSelectionChangedListener(SelectionProvider.SelectionChangedListener listener)
listener
- to addpublic void removeSelectionChangedListener(SelectionProvider.SelectionChangedListener listener)
listener
- to removeprotected void fireSelectionChanged(SelectionProvider.SelectionChangedEvent event)