Search in sources :

Example 1 with WidgetIdProvider

use of org.eclipse.sirius.components.compatibility.forms.WidgetIdProvider in project sirius-web by eclipse-sirius.

the class RepresentationsDescriptionProvider method getGroupDescription.

private GroupDescription getGroupDescription() {
    List<AbstractControlDescription> controlDescriptions = new ArrayList<>();
    // @formatter:off
    ListDescription listDescription = // $NON-NLS-1$
    ListDescription.newListDescription("RepresentationsList").idProvider(new WidgetIdProvider()).labelProvider(// $NON-NLS-1$
    (variableManager) -> "Representations").itemsProvider(this.getItemsProvider()).itemIdProvider(this.getItemIdProvider()).itemLabelProvider(this.getItemLabelProvider()).itemImageURLProvider(this.getItemImageURLProvider()).itemDeletableProvider(this.getItemDeletableProvider()).itemDeleteHandlerProvider(this.getItemDeleteHandlerProvider()).itemKindProvider(this.getItemKindProvider()).diagnosticsProvider((variableManager) -> List.of()).kindProvider(// $NON-NLS-1$
    (object) -> "").messageProvider(// $NON-NLS-1$
    (object) -> "").build();
    // @formatter:on
    controlDescriptions.add(listDescription);
    // @formatter:off
    return // $NON-NLS-1$
    GroupDescription.newGroupDescription("representationsGroupId").idProvider(// $NON-NLS-1$
    variableManager -> "Representations Group").labelProvider(// $NON-NLS-1$
    variableManager -> "Representations Group").semanticElementsProvider(variableManager -> Collections.singletonList(variableManager.getVariables().get(VariableManager.SELF))).controlDescriptions(controlDescriptions).build();
// @formatter:on
}
Also used : IEditingContext(org.eclipse.sirius.components.core.api.IEditingContext) PageDescription(org.eclipse.sirius.components.forms.description.PageDescription) IObjectService(org.eclipse.sirius.components.core.api.IObjectService) ListDescription(org.eclipse.sirius.components.forms.description.ListDescription) ListComponent(org.eclipse.sirius.components.forms.components.ListComponent) HashMap(java.util.HashMap) Function(java.util.function.Function) ArrayList(java.util.ArrayList) FormDescription(org.eclipse.sirius.components.forms.description.FormDescription) IStatus(org.eclipse.sirius.components.representations.IStatus) Service(org.springframework.stereotype.Service) Map(java.util.Map) EditingContextEventProcessor(org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor) RepresentationMetadata(org.eclipse.sirius.components.core.RepresentationMetadata) GroupDescription(org.eclipse.sirius.components.forms.description.GroupDescription) IRepresentationsDescriptionProvider(org.eclipse.sirius.components.collaborative.forms.api.IRepresentationsDescriptionProvider) ChangeKind(org.eclipse.sirius.components.collaborative.api.ChangeKind) Failure(org.eclipse.sirius.components.representations.Failure) Success(org.eclipse.sirius.components.representations.Success) UUID(java.util.UUID) IRepresentationService(org.eclipse.sirius.web.services.api.representations.IRepresentationService) Objects(java.util.Objects) WidgetIdProvider(org.eclipse.sirius.components.compatibility.forms.WidgetIdProvider) List(java.util.List) GetOrCreateRandomIdProvider(org.eclipse.sirius.components.representations.GetOrCreateRandomIdProvider) AbstractControlDescription(org.eclipse.sirius.components.forms.description.AbstractControlDescription) ImageConstants(org.eclipse.sirius.components.compatibility.services.ImageConstants) Optional(java.util.Optional) VariableManager(org.eclipse.sirius.components.representations.VariableManager) Collections(java.util.Collections) IRepresentationImageProvider(org.eclipse.sirius.components.collaborative.api.IRepresentationImageProvider) AbstractControlDescription(org.eclipse.sirius.components.forms.description.AbstractControlDescription) ArrayList(java.util.ArrayList) ListDescription(org.eclipse.sirius.components.forms.description.ListDescription) WidgetIdProvider(org.eclipse.sirius.components.compatibility.forms.WidgetIdProvider)

Aggregations

ArrayList (java.util.ArrayList)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Objects (java.util.Objects)1 Optional (java.util.Optional)1 UUID (java.util.UUID)1 Function (java.util.function.Function)1 ChangeKind (org.eclipse.sirius.components.collaborative.api.ChangeKind)1 IRepresentationImageProvider (org.eclipse.sirius.components.collaborative.api.IRepresentationImageProvider)1 EditingContextEventProcessor (org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor)1 IRepresentationsDescriptionProvider (org.eclipse.sirius.components.collaborative.forms.api.IRepresentationsDescriptionProvider)1 WidgetIdProvider (org.eclipse.sirius.components.compatibility.forms.WidgetIdProvider)1 ImageConstants (org.eclipse.sirius.components.compatibility.services.ImageConstants)1 RepresentationMetadata (org.eclipse.sirius.components.core.RepresentationMetadata)1 IEditingContext (org.eclipse.sirius.components.core.api.IEditingContext)1 IObjectService (org.eclipse.sirius.components.core.api.IObjectService)1 ListComponent (org.eclipse.sirius.components.forms.components.ListComponent)1 AbstractControlDescription (org.eclipse.sirius.components.forms.description.AbstractControlDescription)1