Package com._1c.g5.v8.dt.ui
Class DtSelectionFactory
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.DtSelectionFactory
-
public final class DtSelectionFactory extends Object
The factory that producesIModelApiAwareSelection
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IModelApiAwareSelection
create(IModelApi modelApi, Object... objects)
Creates the structured selection with the specified objects.static IStructuredSelection
createContextAwareIfPresented(IModelApi modelApi, Object... objects)
Creates the structured selection with the specified objects.static IMultiSelection
createMulti(IModelApi modelApi, IStructuredSelection defaultSelection, String defaultSelectionLabel)
Creates the multi selection with the specified default selection.static IMultiSelection
createMultiContextAwareIfPresented(IModelApi modelApi, IStructuredSelection defaultSelection, String defaultSelectionLabel)
Creates the multi selection with the specified default selection.
-
-
-
Method Detail
-
createContextAwareIfPresented
public static IStructuredSelection createContextAwareIfPresented(IModelApi modelApi, Object... objects)
Creates the structured selection with the specified objects.It creates the
IModelApiAwareSelection
if the provided {code modelApi} is not null.- Parameters:
modelApi
- theIModelApi
instance 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
IModelApiAwareSelection
if the provided {code modelApi} is not null.- Parameters:
modelApi
- theIModelApi
instance 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
- theIModelApi
instance, 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
public static IModelApiAwareSelection create(IModelApi modelApi, Object... objects)
Creates the structured selection with the specified objects. The created selection implements theIModelApiAwareSelection
.>- Parameters:
modelApi
- theIModelApi
instance, 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
.
-
-