mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[service-view] IJPL-163799 draft javadoc for the ServiceViewDescriptor and ServiceViewDescriptor
GitOrigin-RevId: a4135d769fcf4112dda5cf430cf74edbedcc35d8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
608093cb2c
commit
cf9de7effe
@@ -8,6 +8,14 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// Implementation of this interface represents a (parent) node in the Service View Tree that could have multiple child nodes.
|
||||
/// Top root [ServiceViewContributor]-s should be registered as a `serviceViewContributor` extension-point.
|
||||
/// Nested [ServiceViewContributor]-s are returned by the [#getServices(Project)] of the parent.
|
||||
///
|
||||
/// @param <T> domain model type of children, if for instance, the Service View represents a list of connections to a server
|
||||
/// then [T] is a single connection. If [T] implements [ServiceViewContributor] then it would have a nested tree inside
|
||||
/// @see ServiceViewDescriptor
|
||||
/// @see ServiceViewManager
|
||||
public interface ServiceViewContributor<T> {
|
||||
ExtensionPointName<ServiceViewContributor<?>> CONTRIBUTOR_EP_NAME =
|
||||
ExtensionPointName.create("com.intellij.serviceViewContributor");
|
||||
@@ -16,12 +24,15 @@ public interface ServiceViewContributor<T> {
|
||||
return CONTRIBUTOR_EP_NAME.findExtension(contributorClass);
|
||||
}
|
||||
|
||||
/// @return a [ServiceViewDescriptor] for this (parent) node
|
||||
@NotNull
|
||||
ServiceViewDescriptor getViewDescriptor(@NotNull Project project);
|
||||
|
||||
/// @return list of child domain model entities, contained in this [ServiceViewContributor]
|
||||
@NotNull
|
||||
List<T> getServices(@NotNull Project project);
|
||||
|
||||
/// @return a [ServiceViewDescriptor] for the child node [T]
|
||||
@NotNull
|
||||
ServiceViewDescriptor getServiceDescriptor(@NotNull Project project, @NotNull T service);
|
||||
}
|
||||
|
||||
@@ -15,8 +15,15 @@ import javax.swing.*;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.List;
|
||||
|
||||
/// Implementation of this interface represents a node in the Service View.
|
||||
/// It provides information on how the node will be represented in the Service View Tree (by the [#getPresentation()]) method,
|
||||
/// how it should be shown in the detail panel (be the [#getContentComponent()])
|
||||
/// and available actions ([#getPopupActions()] and [#getToolbarActions()])
|
||||
///
|
||||
/// Subclasses could also implement the [UiDataProvider] to provide the [DataContext]
|
||||
/// for the actions returned by [#getToolbarActions()] and [#getPopupActions()]
|
||||
///
|
||||
/// @see ServiceViewContributor
|
||||
public interface ServiceViewDescriptor {
|
||||
Key<Boolean> ACTION_HOLDER_KEY = Key.create("ServiceViewActionHolderContentComponent");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user