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 IModelApiAwareSelectioncreate(IModelApi modelApi, Object... objects)Creates 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 Detail
-
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
public static IModelApiAwareSelection create(IModelApi modelApi, Object... objects)
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.
-
-