Search in sources :

Example 1 with ModeFeature

use of org.osate.aadl2.ModeFeature in project osate2 by osate.

the class ConfigureInModesSection method addLocalMode.

private void addLocalMode(final Composite container, final Map.Entry<ModeFeature, ButtonState> entry, final Set<ModeFeature> derivedModesAvailable, final Map<ModeFeature, ModeFeature> localToDerivedModeMap, final Set<URI> urisOfElementsWhichRequireModes) {
    final ModeFeature mf = entry.getKey();
    final Button modeBtn = getWidgetFactory().createButton(container, mf.getName(), SWT.CHECK);
    // Create derived mode drop down
    final ComboViewer derivedModeFld;
    final Label mappedLabel;
    if (derivedModesAvailable == null) {
        derivedModeFld = null;
        mappedLabel = null;
    } else {
        mappedLabel = getWidgetFactory().createLabel(container, "->", SWT.CENTER);
        mappedLabel.setText("->");
        // Create mapped derived mode combo
        derivedModeFld = new ComboViewer(container, SWT.DROP_DOWN | SWT.READ_ONLY);
        derivedModeFld.setContentProvider(ArrayContentProvider.getInstance());
        derivedModeFld.setLabelProvider(new LabelProvider() {

            @Override
            public String getText(final Object element) {
                if (element instanceof ModeFeature) {
                    final ModeFeature modalFeature = (ModeFeature) element;
                    return modalFeature.getName();
                }
                return element.toString();
            }
        });
        derivedModeFld.add("        ");
        derivedModeFld.add(derivedModesAvailable.toArray());
        final ModeFeature mappedDerivedMode = localToDerivedModeMap.get(mf);
        // If child mode is contained in intersection of derived modes
        if (derivedModesAvailable.contains(mappedDerivedMode)) {
            derivedModeFld.setSelection(new StructuredSelection(mappedDerivedMode));
        }
    }
    // Set button state
    final ButtonState modeFeatureState = entry.getValue();
    if (modeFeatureState == ButtonState.SELECTED) {
        modeBtn.setSelection(true);
    } else if (modeFeatureState == ButtonState.PARTIAL) {
        modeBtn.setSelection(true);
        modeBtn.setGrayed(true);
    } else if (modeFeatureState == ButtonState.DISABLED_AND_PARTIAL || modeFeatureState == ButtonState.DISABLED) {
        modeBtn.setEnabled(false);
        boolean partialDisabled = modeFeatureState == ButtonState.DISABLED_AND_PARTIAL;
        modeBtn.setGrayed(partialDisabled);
        modeBtn.setSelection(partialDisabled);
        if (derivedModeFld != null) {
            derivedModeFld.getCombo().setEnabled(false);
            mappedLabel.setEnabled(false);
        }
    }
    final SelectionListener selectionListener = new SelectionAdapter() {

        @Override
        public void widgetSelected(final SelectionEvent e) {
            // No changes if combo selection changes without enabled button
            if (e.widget instanceof Combo && !modeBtn.getSelection()) {
                return;
            }
            // Modify selected modal elements
            final boolean modeBtnIsSelected = modeBtn.getSelection();
            selectedBos.modify("Set In Modes", boc -> boc.getBusinessObject(NamedElement.class).isPresent(), boc -> {
                final NamedElement ne = boc.getBusinessObject(NamedElement.class).get();
                if (ne instanceof AnnexSubclause && ne.eContainer() instanceof DefaultAnnexSubclause) {
                    return (NamedElement) ne.eContainer();
                }
                return ne;
            }, (ne, boc) -> {
                final ModeFeature modeFeature = (ModeFeature) EcoreUtil.resolve(mf, ne.eResource());
                if (ne instanceof Subcomponent && modeFeature instanceof Mode) {
                    final Subcomponent sc = (Subcomponent) ne;
                    // Remove mode binding always
                    for (final ModeBinding mb : sc.getOwnedModeBindings()) {
                        if (modeFeature.getName().equalsIgnoreCase(mb.getParentMode().getName())) {
                            sc.getOwnedModeBindings().remove(mb);
                            break;
                        }
                    }
                    // Add mode binding on button selection
                    if (modeBtnIsSelected) {
                        final ModeBinding newModeBinding = sc.createOwnedModeBinding();
                        newModeBinding.setParentMode((Mode) modeFeature);
                        final boolean isDerived = urisOfElementsWhichRequireModes.contains(EcoreUtil.getURI(ne));
                        // If modal element is derived, set derived mode
                        if (isDerived) {
                            final Object selection = ((StructuredSelection) derivedModeFld.getSelection()).getFirstElement();
                            final ModeFeature childMode = selection instanceof ModeFeature ? (ModeFeature) selection : null;
                            newModeBinding.setDerivedMode((Mode) childMode);
                        }
                    }
                } else if (ne instanceof ModalPath) {
                    final ModalPath mp = (ModalPath) ne;
                    if (modeBtnIsSelected) {
                        mp.getInModeOrTransitions().add(modeFeature);
                    } else {
                        for (final ModeFeature mf : mp.getInModeOrTransitions()) {
                            if (modeFeature.getName().equalsIgnoreCase(mf.getName())) {
                                mp.getInModeOrTransitions().remove(mf);
                                break;
                            }
                        }
                    }
                } else if (ne instanceof ModalElement && modeFeature instanceof Mode) {
                    final ModalElement modalElement = (ModalElement) ne;
                    if (modeBtnIsSelected) {
                        modalElement.getAllInModes().add((Mode) modeFeature);
                    } else {
                        for (final ModeFeature mf : modalElement.getInModes()) {
                            if (modeFeature.getName().equalsIgnoreCase(mf.getName())) {
                                modalElement.getAllInModes().remove(modeFeature);
                                break;
                            }
                        }
                    }
                }
            });
        }
    };
    // Register selection listeners
    modeBtn.addSelectionListener(selectionListener);
    if (derivedModeFld != null) {
        derivedModeFld.getCombo().addSelectionListener(selectionListener);
    }
}
Also used : SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Mode(org.osate.aadl2.Mode) Label(org.eclipse.swt.widgets.Label) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) Combo(org.eclipse.swt.widgets.Combo) Button(org.eclipse.swt.widgets.Button) ComboViewer(org.eclipse.jface.viewers.ComboViewer) ModalPath(org.osate.aadl2.ModalPath) Subcomponent(org.osate.aadl2.Subcomponent) SelectionEvent(org.eclipse.swt.events.SelectionEvent) ModeBinding(org.osate.aadl2.ModeBinding) ModeFeature(org.osate.aadl2.ModeFeature) LabelProvider(org.eclipse.jface.viewers.LabelProvider) NamedElement(org.osate.aadl2.NamedElement) DefaultAnnexSubclause(org.osate.aadl2.DefaultAnnexSubclause) DefaultAnnexSubclause(org.osate.aadl2.DefaultAnnexSubclause) AnnexSubclause(org.osate.aadl2.AnnexSubclause) ModalElement(org.osate.aadl2.ModalElement) SelectionListener(org.eclipse.swt.events.SelectionListener)

Example 2 with ModeFeature

use of org.osate.aadl2.ModeFeature in project osate2 by osate.

the class ConfigureInModesSection method refresh.

@Override
public void refresh() {
    if (composite != null) {
        composite.dispose();
    }
    final Set<ModalElement> mes = selectedBos.boStream(ModalElement.class).collect(Collectors.toSet());
    // Selected Modal Elements and if element is derived
    final Set<URI> urisOfElementsWhichRequireModes = new HashSet<>();
    // Local modes and button state map
    Map<ModeFeature, ButtonState> localModes = null;
    // Mode transitions and button state map. Only used when a ModalPath is selected
    Map<ModeFeature, ButtonState> localModeTransitions = null;
    // In modes map for each selected modal element, child can be null
    final Map<ModeFeature, ModeFeature> localToDerivedModeMap = new TreeMap<ModeFeature, ModeFeature>(modeFeatureComparator);
    // Required mode features
    Set<ModeFeature> derivedModes = null;
    boolean nonModePathSelected = false;
    // Determine button states for mode features
    for (final ModalElement modalElement : mes) {
        if (modalElement.getContainingClassifier() instanceof ComponentClassifier) {
            final ComponentClassifier cc = (ComponentClassifier) modalElement.getContainingClassifier();
            // Use name for compatibility with flow implementations
            final Set<String> inModes = getInModes(modalElement);
            // Initial set
            if (localModes == null) {
                localModes = new TreeMap<ModeFeature, ButtonState>(modeFeatureComparator);
                for (final ModeFeature mf : cc.getAllModes()) {
                    localModes.put(mf, inModes.contains(mf.getName()) ? ButtonState.SELECTED : ButtonState.NOT_SELECTED);
                }
            } else {
                populateLocalModes(localModes, cc, inModes);
            }
            if (modalElement instanceof Subcomponent) {
                final URI scUri = EcoreUtil.getURI(modalElement);
                nonModePathSelected = true;
                final Subcomponent sc = (Subcomponent) modalElement;
                final ComponentClassifier scClassifier = sc.getAllClassifier();
                if (scClassifier != null) {
                    final List<Mode> scClassifierAllModes = scClassifier.getAllModes();
                    for (final Mode mb : scClassifierAllModes) {
                        if (mb.isDerived()) {
                            // Mark the modal element as derived
                            urisOfElementsWhichRequireModes.add(scUri);
                            if (derivedModes == null) {
                                derivedModes = new HashSet<>();
                                derivedModes.addAll(scClassifierAllModes);
                            } else {
                                // Keep intersection of owned modes between selections
                                derivedModes.retainAll(scClassifierAllModes);
                            }
                            break;
                        }
                    }
                }
                for (final ModeBinding modeBinding : sc.getOwnedModeBindings()) {
                    final ModeFeature localMode = modeBinding.getParentMode();
                    final ModeFeature derivedMode = modeBinding.getDerivedMode();
                    if (urisOfElementsWhichRequireModes.contains(scUri)) {
                        if (localToDerivedModeMap.containsKey(localMode)) {
                            if (localToDerivedModeMap.get(localMode) != derivedMode) {
                                localToDerivedModeMap.put(localMode, null);
                                localModes.replace(localMode, ButtonState.PARTIAL);
                            }
                        } else {
                            // Add mode if not already added and override derived value if not null
                            localToDerivedModeMap.put(localMode, derivedMode);
                        }
                    }
                }
            } else if (modalElement instanceof ModalPath) {
                final ModalPath modalPath = (ModalPath) modalElement;
                // Use name for compatibility with flow implementations
                final Set<String> inModeTransitions = getInModeTransitions(modalPath);
                // Set Initial
                if (localModeTransitions == null) {
                    localModeTransitions = new TreeMap<ModeFeature, ButtonState>(modeFeatureComparator);
                    for (final ModeFeature mf : cc.getAllModeTransitions()) {
                        localModeTransitions.put(mf, inModeTransitions.contains(mf.getName()) ? ButtonState.SELECTED : ButtonState.NOT_SELECTED);
                    }
                } else {
                    populateModeTransitions(localModeTransitions, cc, inModeTransitions);
                }
            } else {
                nonModePathSelected = true;
            }
        }
    }
    // Mode transitions are always partial if a modal path and any other type of modal element is selected
    if (localModeTransitions != null && nonModePathSelected) {
        for (final ModeFeature mf : localModeTransitions.keySet()) {
            if (localModeTransitions.get(mf) == ButtonState.SELECTED) {
                localModeTransitions.replace(mf, ButtonState.PARTIAL);
            }
        }
    }
    final int horizontalSpan = derivedModes == null ? 1 : 3;
    composite = getWidgetFactory().createComposite(container);
    FormData fd;
    fd = new FormData();
    fd.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
    composite.setLayoutData(fd);
    final GridLayout layout = new GridLayout(horizontalSpan, false);
    composite.setLayout(layout);
    // Determine if there is at least one mode feature is enabled. If no mode features are enabled then the selected elements do not have any
    // applicable mode features in common.
    final boolean hasEnabledModes = Stream.concat(localModes == null ? Stream.empty() : localModes.values().stream(), localModeTransitions == null ? Stream.empty() : localModeTransitions.values().stream()).anyMatch(ButtonState::isEnabled);
    final boolean hasModeSelections = Stream.concat(localModes == null ? Stream.empty() : localModes.values().stream(), localModeTransitions == null ? Stream.empty() : localModeTransitions.values().stream()).anyMatch(ButtonState::isAtleastPartiallySelected);
    final String inModesStatusTxt;
    if (!hasEnabledModes) {
        inModesStatusTxt = "<No Common Applicable Modes>";
    } else if (anyRefinedElementHasInheritedModeFeatures(mes)) {
        inModesStatusTxt = "<See Refined Element(s)>";
    } else if (hasModeSelections) {
        inModesStatusTxt = "Selected Modes";
    } else {
        inModesStatusTxt = "All";
    }
    final Label inModesStatus = getWidgetFactory().createLabel(composite, inModesStatusTxt);
    GridDataFactory.fillDefaults().span(horizontalSpan, 1).applyTo(inModesStatus);
    // Only show mode features if at least one mode feature is enabled.
    if (hasEnabledModes) {
        if (localModes != null && !localModes.isEmpty()) {
            GridDataFactory.fillDefaults().grab(true, false).span(horizontalSpan, 1).applyTo(new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR));
            for (final Map.Entry<ModeFeature, ButtonState> entry : localModes.entrySet()) {
                addLocalMode(composite, entry, derivedModes, localToDerivedModeMap, urisOfElementsWhichRequireModes);
            }
        }
        if (localModeTransitions != null && !localModeTransitions.isEmpty()) {
            GridDataFactory.fillDefaults().grab(true, false).span(horizontalSpan, 1).applyTo(new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR));
            for (final Map.Entry<ModeFeature, ButtonState> entry : localModeTransitions.entrySet()) {
                addLocalMode(composite, entry, derivedModes, localToDerivedModeMap, urisOfElementsWhichRequireModes);
            }
        }
    }
    container.layout(true);
    container.pack();
}
Also used : ComponentClassifier(org.osate.aadl2.ComponentClassifier) HashSet(java.util.HashSet) Set(java.util.Set) Label(org.eclipse.swt.widgets.Label) URI(org.eclipse.emf.common.util.URI) GridLayout(org.eclipse.swt.layout.GridLayout) ModalPath(org.osate.aadl2.ModalPath) Subcomponent(org.osate.aadl2.Subcomponent) FormAttachment(org.eclipse.swt.layout.FormAttachment) HashSet(java.util.HashSet) FormData(org.eclipse.swt.layout.FormData) Mode(org.osate.aadl2.Mode) TreeMap(java.util.TreeMap) ModeBinding(org.osate.aadl2.ModeBinding) ModeFeature(org.osate.aadl2.ModeFeature) Map(java.util.Map) TreeMap(java.util.TreeMap) ModalElement(org.osate.aadl2.ModalElement)

Example 3 with ModeFeature

use of org.osate.aadl2.ModeFeature in project osate2 by osate.

the class ShowElementsInModeHandler method enableChildren.

private void enableChildren(final BusinessObjectProviderHelper bopHelper, final Object selectedMode, final BusinessObjectNode node) {
    for (final Object childBo : bopHelper.getChildBusinessObjects(node)) {
        final RelativeBusinessObjectReference ref = getRelativeBusinessObjectReference(childBo);
        final BusinessObjectNode childNode = node.getChild(ref);
        if (childNode == null) {
            if (childBo instanceof ModalElement) {
                final ModalElement modalElement = (ModalElement) childBo;
                final List<ModeFeature> inModeFeatures = AadlModalElementUtil.getAllInModesOrTransitions(modalElement);
                if (inModeFeatures.isEmpty() || inModeFeatures.contains(selectedMode)) {
                    enableChild(bopHelper, selectedMode, childBo, node);
                }
            } else {
                enableChild(bopHelper, selectedMode, childBo, node);
            }
            enableChildren(bopHelper, selectedMode, node.getChild(ref));
        }
    }
}
Also used : BusinessObjectNode(org.osate.ge.internal.diagram.runtime.updating.BusinessObjectNode) RelativeBusinessObjectReference(org.osate.ge.RelativeBusinessObjectReference) InstanceObject(org.osate.aadl2.instance.InstanceObject) ModeFeature(org.osate.aadl2.ModeFeature) ModalElement(org.osate.aadl2.ModalElement)

Example 4 with ModeFeature

use of org.osate.aadl2.ModeFeature in project osate2 by osate.

the class SetInModeFeaturesDialog method createDialogArea.

@Override
protected Control createDialogArea(final Composite parent) {
    final Composite area = (Composite) super.createDialogArea(parent);
    ScrolledComposite scrolled = new ScrolledComposite(area, SWT.H_SCROLL | SWT.V_SCROLL);
    scrolled.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    scrolled.setLayout(new GridLayout());
    scrolled.setExpandVertical(true);
    scrolled.setExpandHorizontal(true);
    final Composite container = new Composite(scrolled, SWT.NONE);
    container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    final GridLayout layout = new GridLayout();
    container.setLayout(layout);
    // All modes checkbox
    final Button allModesBtn = new Button(container, SWT.CHECK);
    allModesBtn.setText("All Modes");
    final GridData allModesGridData = new GridData();
    allModesGridData.horizontalSpan = layout.numColumns;
    allModesBtn.setLayoutData(allModesGridData);
    allModesBtn.setSelection(inAllModes);
    final Label modeSeparator = new Label(container, SWT.HORIZONTAL | SWT.SEPARATOR);
    final GridData modeSeparatorLayoutData = new GridData(GridData.FILL_HORIZONTAL);
    modeSeparatorLayoutData.horizontalSpan = layout.numColumns;
    modeSeparator.setLayoutData(modeSeparatorLayoutData);
    // Add controls for each of the local modes
    for (final ModeFeature mf : localModes) {
        addLocalMode(container, mf);
    }
    scrolled.setContent(container);
    scrolled.setMinSize(container.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    // If mode transitions are available
    if (!localModeTransitions.isEmpty()) {
        final GridData modeTransitionSeparatorLayoutData = new GridData(GridData.FILL_HORIZONTAL);
        final Label modeTransitionSeparator = new Label(container, SWT.HORIZONTAL | SWT.SEPARATOR);
        modeTransitionSeparatorLayoutData.horizontalSpan = layout.numColumns;
        modeTransitionSeparator.setLayoutData(modeTransitionSeparatorLayoutData);
        for (final ModeFeature mf : localModeTransitions) {
            addLocalMode(container, mf);
        }
    }
    // Update all check boxes when all modes is selected
    updateEnabledStateOfModeControls(!allModesBtn.getSelection());
    allModesBtn.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(final SelectionEvent e) {
            updateEnabledStateOfModeControls(!allModesBtn.getSelection());
            inAllModes = allModesBtn.getSelection();
        }
    });
    return area;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Button(org.eclipse.swt.widgets.Button) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) SelectionEvent(org.eclipse.swt.events.SelectionEvent) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) ModeFeature(org.osate.aadl2.ModeFeature)

Example 5 with ModeFeature

use of org.osate.aadl2.ModeFeature in project osate2 by osate.

the class CreateEndToEndFlowSpecificationTool method update.

/**
 * Update the diagram and tool dialog
 * @param selectedBocs - the selected bocs
 */
private void update(final List<BusinessObjectContext> selectedBocs) {
    if (createFlowDialog != null) {
        if (createFlowDialog.getShell() != null && !createFlowDialog.getShell().isDisposed() && createFlowDialog.elementSelectionDlg == null) {
            // If the selection is qualified, add it
            if (selectedBocs.size() > 1) {
                createFlowDialog.setErrorMessage("Multiple elements selected. Select a single element. " + " " + getDialogMessage());
            } else if (selectedBocs.size() == 1) {
                // Get the selected boc
                final BusinessObjectContext selectedBoc = (BusinessObjectContext) selectedBocs.get(0);
                if (!modeFeatureSelections.contains(selectedBoc) && createFlowDialog.addSelectedElement(selectedBoc)) {
                    // Insert flow segments before first mode feature
                    final Color color;
                    if (selectedBoc.getBusinessObject() instanceof ModeFeature) {
                        modeFeatureSelections.add(selectedBoc);
                        color = Color.MAGENTA.brighter();
                    } else {
                        segmentSelections.add(new SegmentData(selectedBoc, new ArrayList<>()));
                        if (segmentSelections.size() == 1) {
                            // Set default name on first selection if one does not exist
                            createFlowDialog.getOwnerComponentImplementation().ifPresent(ci -> {
                                createFlowDialog.setTitle("Creating End To End Flow in: " + ci.getQualifiedName());
                                if (createFlowDialog.endToEndFlowName.isEmpty()) {
                                    createFlowDialog.setEndToEndFlowName(ci);
                                }
                            });
                            color = Color.ORANGE.darker();
                        } else {
                            color = Color.MAGENTA.darker();
                        }
                    }
                    setColor(selectedBoc, color);
                }
                createFlowDialog.updateSegments();
                final boolean isValid = createFlowDialog.isEndToEndFlowValid(createEndToEndFlow());
                createFlowDialog.updateWidgets(isValid);
                createFlowDialog.setErrorMessage(null);
                createFlowDialog.setMessage(getDialogMessage());
            } else {
                createFlowDialog.updateSegments();
            }
        } else if (createFlowDialog.elementSelectionDlg != null && createFlowDialog.elementSelectionDlg.getShell() != null && !createFlowDialog.elementSelectionDlg.getShell().isDisposed() && createFlowDialog.elementSelectionDlg.getShell().isVisible()) {
            final CreateFlowsToolsDialog.ElementSelectionDialog elementSelectionDlg = createFlowDialog.elementSelectionDlg;
            // Selecting an element for editing end to end flows
            if (selectedBocs.size() > 1) {
                elementSelectionDlg.setErrorMessage("Multiple elements are selected.\n " + elementSelectionDlg.getMessage());
                elementSelectionDlg.setSelection(null);
            } else if (selectedBocs.size() == 1) {
                elementSelectionDlg.setErrorMessage(null);
                final BusinessObjectContext selectedBoc = selectedBocs.get(0);
                elementSelectionDlg.setSelection(selectedBoc);
            }
        }
    }
}
Also used : Element(org.osate.aadl2.Element) TableViewer(org.eclipse.jface.viewers.TableViewer) Tool(org.osate.ge.internal.ui.tools.Tool) IDialogConstants(org.eclipse.jface.dialogs.IDialogConstants) FlowKind(org.osate.aadl2.FlowKind) Point(org.eclipse.swt.graphics.Point) SegmentData(org.osate.ge.aadl2.ui.internal.tools.FlowDialogUtil.SegmentData) SelectionChangedEvent(org.osate.ge.internal.ui.tools.SelectionChangedEvent) BusinessObjectNode(org.osate.ge.internal.diagram.runtime.updating.BusinessObjectNode) BusinessObjectContext(org.osate.ge.BusinessObjectContext) Composite(org.eclipse.swt.widgets.Composite) KeyEvent(org.eclipse.swt.events.KeyEvent) KeyAdapter(org.eclipse.swt.events.KeyAdapter) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Text(org.eclipse.swt.widgets.Text) FlowSpecification(org.osate.aadl2.FlowSpecification) Button(org.eclipse.swt.widgets.Button) Diagnostic(org.eclipse.emf.common.util.Diagnostic) Set(java.util.Set) EObject(org.eclipse.emf.ecore.EObject) Connection(org.osate.aadl2.Connection) UUID(java.util.UUID) Display(org.eclipse.swt.widgets.Display) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) UiService(org.osate.ge.internal.services.UiService) ContextHelpUtil(org.osate.ge.internal.ui.util.ContextHelpUtil) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) ReferenceService(org.osate.ge.internal.services.ReferenceService) List(java.util.List) Window(org.eclipse.jface.window.Window) EndToEndFlowElement(org.osate.aadl2.EndToEndFlowElement) UiUtil(org.osate.ge.internal.ui.util.UiUtil) DeactivatedEvent(org.osate.ge.internal.ui.tools.DeactivatedEvent) MenuItem(org.eclipse.swt.widgets.MenuItem) SWT(org.eclipse.swt.SWT) EndToEndFlowSegment(org.osate.aadl2.EndToEndFlowSegment) AadlModificationService(org.osate.ge.internal.services.AadlModificationService) Optional(java.util.Optional) AadlNamingUtil(org.osate.ge.aadl2.internal.AadlNamingUtil) Queue(java.util.Queue) Label(org.eclipse.swt.widgets.Label) EndToEndFlow(org.osate.aadl2.EndToEndFlow) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) Namespace(org.osate.aadl2.Namespace) ComponentImplementation(org.osate.aadl2.ComponentImplementation) ComboViewer(org.eclipse.jface.viewers.ComboViewer) Function(java.util.function.Function) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) AgeAadlUtil(org.osate.ge.aadl2.internal.util.AgeAadlUtil) ResourceSet(org.eclipse.emf.ecore.resource.ResourceSet) ArrayList(java.util.ArrayList) ColoringService(org.osate.ge.internal.services.ColoringService) DataSubcomponent(org.osate.aadl2.DataSubcomponent) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) GridData(org.eclipse.swt.layout.GridData) Aadl2Package(org.osate.aadl2.Aadl2Package) Subcomponent(org.osate.aadl2.Subcomponent) Completeness(org.osate.ge.internal.diagram.runtime.updating.Completeness) RowData(org.eclipse.swt.layout.RowData) Context(org.osate.aadl2.Context) Shell(org.eclipse.swt.widgets.Shell) Iterator(java.util.Iterator) Color(org.osate.ge.graphics.Color) ActivatedEvent(org.osate.ge.internal.ui.tools.ActivatedEvent) GridDataFactory(org.eclipse.jface.layout.GridDataFactory) EcoreUtil(org.eclipse.emf.ecore.util.EcoreUtil) ModeFeature(org.osate.aadl2.ModeFeature) ToolUtil(org.osate.ge.internal.ui.tools.ToolUtil) Adapters(org.eclipse.core.runtime.Adapters) RowLayout(org.eclipse.swt.layout.RowLayout) TitleAreaDialog(org.eclipse.jface.dialogs.TitleAreaDialog) AgeHandlerUtil(org.osate.ge.internal.ui.handlers.AgeHandlerUtil) SelectionEvent(org.eclipse.swt.events.SelectionEvent) Menu(org.eclipse.swt.widgets.Menu) NamedElement(org.osate.aadl2.NamedElement) Collections(java.util.Collections) LabelProvider(org.eclipse.jface.viewers.LabelProvider) Control(org.eclipse.swt.widgets.Control) GridLayout(org.eclipse.swt.layout.GridLayout) Color(org.osate.ge.graphics.Color) SegmentData(org.osate.ge.aadl2.ui.internal.tools.FlowDialogUtil.SegmentData) BusinessObjectContext(org.osate.ge.BusinessObjectContext) ModeFeature(org.osate.aadl2.ModeFeature)

Aggregations

ModeFeature (org.osate.aadl2.ModeFeature)8 Label (org.eclipse.swt.widgets.Label)4 ModalElement (org.osate.aadl2.ModalElement)4 NamedElement (org.osate.aadl2.NamedElement)4 Subcomponent (org.osate.aadl2.Subcomponent)4 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)3 SelectionEvent (org.eclipse.swt.events.SelectionEvent)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 Button (org.eclipse.swt.widgets.Button)3 Connection (org.osate.aadl2.Connection)3 Context (org.osate.aadl2.Context)3 EndToEndFlow (org.osate.aadl2.EndToEndFlow)3 EndToEndFlowElement (org.osate.aadl2.EndToEndFlowElement)3 EndToEndFlowSegment (org.osate.aadl2.EndToEndFlowSegment)3 List (java.util.List)2 Set (java.util.Set)2 ComboViewer (org.eclipse.jface.viewers.ComboViewer)2 LabelProvider (org.eclipse.jface.viewers.LabelProvider)2 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)2 GridData (org.eclipse.swt.layout.GridData)2