Package com._1c.g5.v8.dt.ui
Class DtSelectionFactory
java.lang.Object
com._1c.g5.v8.dt.ui.DtSelectionFactory
The factory that produces
IModelApiAwareSelection.-
Method Summary
Modifier and TypeMethodDescriptionstatic IModelApiAwareSelectionCreates the structured selection with the specified objects.static IStructuredSelectioncreateContextAwareIfPresented(IModelApi modelApi, Object... objects) Creates the structured selection with the specified objects.static IMultiSelectioncreateMulti(IModelApi modelApi, IStructuredSelection defaultSelection, String defaultSelectionLabel) Creates the multi selection with the specified default selection.static IMultiSelectioncreateMultiContextAwareIfPresented(IModelApi modelApi, IStructuredSelection defaultSelection, String defaultSelectionLabel) Creates the multi selection with the specified default selection.
-
Method Details
-
createContextAwareIfPresented
public static IStructuredSelection createContextAwareIfPresented(IModelApi modelApi, Object... objects) Creates the structured selection with the specified objects.It creates the
IModelApiAwareSelectionif the provided {code modelApi} is not null.- Parameters:
modelApi- theIModelApiinstance ornull.objects- an objects to create selection, cannot benull.- Returns:
- a created structured selection, never
null.
-
createMultiContextAwareIfPresented
public static IMultiSelection createMultiContextAwareIfPresented(IModelApi modelApi, IStructuredSelection defaultSelection, String defaultSelectionLabel) Creates the multi selection with the specified default selection.It creates the
IModelApiAwareSelectionif the provided {code modelApi} is not null.- Parameters:
modelApi- theIModelApiinstance ornull.defaultSelection- the default structured selection, cannot benull.defaultSelectionLabel- the label for the default selection, cannot benull.- Returns:
- a created multi selection, never
null.
-
createMulti
public static IMultiSelection createMulti(IModelApi modelApi, IStructuredSelection defaultSelection, String defaultSelectionLabel) Creates the multi selection with the specified default selection. The created selection implements theIModelApiAwareSelection.- Parameters:
modelApi- theIModelApiinstance, cannot benull.defaultSelection- the default structured selection, cannot benull.defaultSelectionLabel- the label for the default selection, cannot benull.- Returns:
- a created multi selection, never
null. - Throws:
IllegalArgumentException- if one of the specified arguments isnull.
-
create
Creates the structured selection with the specified objects. The created selection implements theIModelApiAwareSelection.>- Parameters:
modelApi- theIModelApiinstance, cannot benull.objects- an objects to create selection, cannot benull.- Returns:
- a created structured selection, never
null. - Throws:
IllegalArgumentException- if one of the specified arguments isnull.
-