Search in sources :

Example 36 with AgeDiagram

use of org.osate.ge.internal.diagram.runtime.AgeDiagram in project osate2 by osate.

the class RestoreMissingDiagramElementsHandler method execute.

@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
    final IEditorPart activeEditor = HandlerUtil.getActiveEditor(event);
    if (!(activeEditor instanceof InternalDiagramEditor)) {
        throw new RuntimeException("Unexpected editor: " + activeEditor);
    }
    // Get editor and various services
    final InternalDiagramEditor diagramEditor = (InternalDiagramEditor) activeEditor;
    final ProjectProvider projectProvider = (ProjectProvider) Objects.requireNonNull(diagramEditor.getAdapter(ProjectProvider.class), "Unable to retrieve project provider");
    final DiagramUpdater diagramUpdater = Objects.requireNonNull(diagramEditor.getDiagramUpdater(), "Unable to retrieve diagram updater");
    final ExtensionRegistryService extService = (ExtensionRegistryService) Objects.requireNonNull(diagramEditor.getAdapter(ExtensionRegistryService.class), "Unable to retrieve extension service");
    final AgeDiagram diagram = diagramEditor.getDiagram();
    final IEclipseContext serviceContext = EclipseContextFactory.getServiceContext(FrameworkUtil.getBundle(getClass()).getBundleContext());
    final ReferenceService referenceService = Objects.requireNonNull(serviceContext.get(ReferenceService.class), "Unable to retrieve reference service");
    final LayoutInfoProvider layoutInfoProvider = Objects.requireNonNull(Adapters.adapt(diagramEditor, LayoutInfoProvider.class), "Unable to retrieve layout info provider");
    // Stores child business object contexts which are applicable for a given parent node
    final Multimap<DiagramNode, BusinessObjectContext> diagramNodeToAvailableBusinessObjectContextsMap = ArrayListMultimap.create();
    // Build a list of ghosts that will be presented to the user to modify
    final List<DiagramUpdater.GhostedElement> ghostsToModify = new ArrayList<>();
    final BusinessObjectProviderHelper bopHelper = new BusinessObjectProviderHelper(extService);
    // Walk all nodes and look for ghosts
    diagram.getAllDiagramNodes().forEachOrdered(parent -> {
        final Collection<DiagramUpdater.GhostedElement> ghosts = diagramUpdater.getGhosts(parent);
        if (!ghosts.isEmpty()) {
            final BusinessObjectContext parentToUse;
            if (diagram.getConfiguration().getContextBoReference() == null && parent.getParent() == null) {
                parentToUse = getRootContextForProject(projectProvider);
            } else {
                parentToUse = parent;
            }
            // Create a mapping between relative reference and available child business objects
            final Map<RelativeBusinessObjectReference, Object> relRefToBusinessObjectMap = bopHelper.getChildBusinessObjects(parentToUse).stream().collect(HashMap::new, (map, bo) -> {
                final RelativeBusinessObjectReference relRef = referenceService.getRelativeReference(bo);
                if (relRef != null) {
                    map.put(relRef, bo);
                }
            }, Map::putAll);
            // Remove any entries based on existing node relative references.
            parent.getChildren().forEach(de -> relRefToBusinessObjectMap.remove(de.getRelativeReference()));
            // Don't show ghosts if there aren't any unused business objects
            if (!relRefToBusinessObjectMap.isEmpty()) {
                // Store the ghosts and the available business objects
                relRefToBusinessObjectMap.values().stream().map(bo -> new BusinessObjectContext() {

                    @Override
                    public Collection<? extends BusinessObjectContext> getChildren() {
                        return Collections.emptyList();
                    }

                    @Override
                    public BusinessObjectContext getParent() {
                        return parent;
                    }

                    @Override
                    public Object getBusinessObject() {
                        return bo;
                    }
                }).forEachOrdered(// see https://github.com/osate/osate2/issues/976
                boc -> diagramNodeToAvailableBusinessObjectContextsMap.put(parent, (BusinessObjectContext) boc));
                ghostsToModify.addAll(ghosts);
            }
        }
    });
    // Show the dialog
    final RestoreMissingDiagramElementsDialog.Result<DiagramUpdater.GhostedElement, BusinessObjectContext> result = RestoreMissingDiagramElementsDialog.show(null, new RestoreMissingDiagramElementsDialog.Model<DiagramUpdater.GhostedElement, BusinessObjectContext>() {

        @Override
        public Collection<DiagramUpdater.GhostedElement> getElements() {
            return ghostsToModify;
        }

        @Override
        public String getParentLabel(final DiagramUpdater.GhostedElement element) {
            return UiUtil.getPathLabel(element.getParent());
        }

        @Override
        public String getMissingReferenceLabel(final DiagramUpdater.GhostedElement element) {
            return referenceService.getLabel(element.getRelativeReference());
        }

        @Override
        public Collection<BusinessObjectContext> getAvailableBusinessObjects(final DiagramUpdater.GhostedElement element) {
            return diagramNodeToAvailableBusinessObjectContextsMap.get(element.getParent());
        }

        @Override
        public String getBusinessObjectLabel(final BusinessObjectContext boc) {
            return UiUtil.getDescription(boc, extService);
        }
    });
    if (result != null) {
        diagramEditor.getActionExecutor().execute("Restore Missing Diagram Elements", ExecutionMode.NORMAL, () -> {
            // Update the ghosts and the diagram
            diagram.modify("Restore Missing Diagram Elements", m -> {
                result.getObjectToNewBoMap().forEach((ghost, newBoc) -> {
                    final Object newBo = newBoc.getBusinessObject();
                    ghost.updateBusinessObject(m, newBo, referenceService.getRelativeReference(newBo));
                });
                // Update the diagram
                diagramUpdater.updateDiagram(diagram);
            });
            diagram.modify("Layout", m -> DiagramElementLayoutUtil.layoutIncrementally(diagram, m, layoutInfoProvider));
            return null;
        });
    }
    return null;
}
Also used : ExecutionEvent(org.eclipse.core.commands.ExecutionEvent) EclipseContextFactory(org.eclipse.e4.core.contexts.EclipseContextFactory) ArrayListMultimap(com.google.common.collect.ArrayListMultimap) RestoreMissingDiagramElementsDialog(org.osate.ge.internal.ui.dialogs.RestoreMissingDiagramElementsDialog) ExtensionRegistryService(org.osate.ge.internal.services.ExtensionRegistryService) HashMap(java.util.HashMap) DiagramElementLayoutUtil(org.osate.ge.internal.diagram.runtime.layout.DiagramElementLayoutUtil) Multimap(com.google.common.collect.Multimap) ArrayList(java.util.ArrayList) HandlerUtil(org.eclipse.ui.handlers.HandlerUtil) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) BusinessObjectContext(org.osate.ge.BusinessObjectContext) IEclipseContext(org.eclipse.e4.core.contexts.IEclipseContext) Map(java.util.Map) ProjectProvider(org.osate.ge.internal.services.ProjectProvider) RelativeBusinessObjectReference(org.osate.ge.RelativeBusinessObjectReference) IEditorPart(org.eclipse.ui.IEditorPart) DiagramUpdater(org.osate.ge.internal.diagram.runtime.updating.DiagramUpdater) Collection(java.util.Collection) ExecutionException(org.eclipse.core.commands.ExecutionException) Objects(java.util.Objects) Adapters(org.eclipse.core.runtime.Adapters) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) ReferenceService(org.osate.ge.internal.services.ReferenceService) List(java.util.List) UiUtil(org.osate.ge.internal.ui.util.UiUtil) ExecutionMode(org.osate.ge.internal.services.ActionExecutor.ExecutionMode) BusinessObjectProviderHelper(org.osate.ge.internal.util.BusinessObjectProviderHelper) AbstractHandler(org.eclipse.core.commands.AbstractHandler) LayoutInfoProvider(org.osate.ge.internal.diagram.runtime.layout.LayoutInfoProvider) Collections(java.util.Collections) FrameworkUtil(org.osgi.framework.FrameworkUtil) DiagramNode(org.osate.ge.internal.diagram.runtime.DiagramNode) ReferenceService(org.osate.ge.internal.services.ReferenceService) DiagramNode(org.osate.ge.internal.diagram.runtime.DiagramNode) HashMap(java.util.HashMap) ExtensionRegistryService(org.osate.ge.internal.services.ExtensionRegistryService) ArrayList(java.util.ArrayList) RelativeBusinessObjectReference(org.osate.ge.RelativeBusinessObjectReference) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) BusinessObjectProviderHelper(org.osate.ge.internal.util.BusinessObjectProviderHelper) ProjectProvider(org.osate.ge.internal.services.ProjectProvider) RestoreMissingDiagramElementsDialog(org.osate.ge.internal.ui.dialogs.RestoreMissingDiagramElementsDialog) DiagramUpdater(org.osate.ge.internal.diagram.runtime.updating.DiagramUpdater) IEditorPart(org.eclipse.ui.IEditorPart) IEclipseContext(org.eclipse.e4.core.contexts.IEclipseContext) Collection(java.util.Collection) BusinessObjectContext(org.osate.ge.BusinessObjectContext) HashMap(java.util.HashMap) Map(java.util.Map) LayoutInfoProvider(org.osate.ge.internal.diagram.runtime.layout.LayoutInfoProvider)

Example 37 with AgeDiagram

use of org.osate.ge.internal.diagram.runtime.AgeDiagram in project osate2 by osate.

the class ShowElementHandler method execute.

@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
    final IEditorPart activeEditor = HandlerUtil.getActiveEditor(event);
    if (!(activeEditor instanceof InternalDiagramEditor)) {
        throw new RuntimeException("Unexpected editor: " + activeEditor);
    }
    // Get diagram and selected elements
    final InternalDiagramEditor diagramEditor = (InternalDiagramEditor) activeEditor;
    final List<BusinessObjectContext> bocsToAdd = AgeHandlerUtil.getSelectedBusinessObjectContexts().stream().filter(boc -> !(boc instanceof DiagramNode)).collect(Collectors.toList());
    final AgeDiagram diagram = diagramEditor.getDiagram();
    if (diagram == null) {
        throw new RuntimeException("Unable to get diagram");
    }
    // Get services
    final DiagramUpdater diagramUpdater = diagramEditor.getDiagramUpdater();
    final LayoutInfoProvider layoutInfoProvider = Objects.requireNonNull(Adapters.adapt(diagramEditor, LayoutInfoProvider.class), "Unable to retrieve layout info provider");
    final ReferenceBuilderService refBuilder = Objects.requireNonNull(Adapters.adapt(diagramEditor, ReferenceBuilderService.class), "Unable to retrieve reference builder");
    final BusinessObjectNode boTree = DiagramToBusinessObjectTreeConverter.createBusinessObjectNode(diagram);
    // Add the selected elements to the business object tree
    for (final BusinessObjectContext bocToAdd : bocsToAdd) {
        // Get list of nodes that represents the path from the root to the business object context we need to add
        final LinkedList<BusinessObjectContext> bocPath = new LinkedList<>();
        for (BusinessObjectContext tmp = bocToAdd; !(tmp instanceof AgeDiagram); tmp = tmp.getParent()) {
            bocPath.addFirst(tmp);
        }
        // For each element in that path. Create BusinessObjectNode if it doesn't exist
        BusinessObjectNode parentNode = boTree;
        for (final BusinessObjectContext tmpBoc : bocPath) {
            // Get relative reference of the business object
            final RelativeBusinessObjectReference ref;
            if (tmpBoc instanceof DiagramElement) {
                ref = ((DiagramElement) tmpBoc).getRelativeReference();
            } else {
                ref = refBuilder.getRelativeReference(tmpBoc.getBusinessObject());
            }
            // Look for a matching node
            BusinessObjectNode childNode = parentNode.getChild(ref);
            // If it doesn't exist, create it
            if (childNode == null) {
                childNode = new BusinessObjectNode(parentNode, UUID.randomUUID(), ref, tmpBoc.getBusinessObject(), Completeness.UNKNOWN, false);
            }
            // Continue to the next element in the path using the child node as the new parent
            parentNode = childNode;
        }
    }
    // Update the diagram
    diagramEditor.getActionExecutor().execute("Show", ExecutionMode.NORMAL, () -> {
        // Update the diagram
        diagramUpdater.updateDiagram(diagram, boTree);
        // Update layout
        diagram.modify("Layout Incrementally", m -> DiagramElementLayoutUtil.layoutIncrementally(diagram, m, layoutInfoProvider));
        return null;
    });
    return null;
}
Also used : ExecutionEvent(org.eclipse.core.commands.ExecutionEvent) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) DiagramToBusinessObjectTreeConverter(org.osate.ge.internal.diagram.runtime.updating.DiagramToBusinessObjectTreeConverter) DiagramElementLayoutUtil(org.osate.ge.internal.diagram.runtime.layout.DiagramElementLayoutUtil) BusinessObjectNode(org.osate.ge.internal.diagram.runtime.updating.BusinessObjectNode) HandlerUtil(org.eclipse.ui.handlers.HandlerUtil) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) BusinessObjectContext(org.osate.ge.BusinessObjectContext) LinkedList(java.util.LinkedList) RelativeBusinessObjectReference(org.osate.ge.RelativeBusinessObjectReference) Completeness(org.osate.ge.internal.diagram.runtime.updating.Completeness) IEditorPart(org.eclipse.ui.IEditorPart) DiagramUpdater(org.osate.ge.internal.diagram.runtime.updating.DiagramUpdater) ReferenceBuilderService(org.osate.ge.services.ReferenceBuilderService) UUID(java.util.UUID) ExecutionException(org.eclipse.core.commands.ExecutionException) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) Adapters(org.eclipse.core.runtime.Adapters) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) List(java.util.List) ExecutionMode(org.osate.ge.internal.services.ActionExecutor.ExecutionMode) AbstractHandler(org.eclipse.core.commands.AbstractHandler) LayoutInfoProvider(org.osate.ge.internal.diagram.runtime.layout.LayoutInfoProvider) DiagramNode(org.osate.ge.internal.diagram.runtime.DiagramNode) DiagramNode(org.osate.ge.internal.diagram.runtime.DiagramNode) RelativeBusinessObjectReference(org.osate.ge.RelativeBusinessObjectReference) DiagramUpdater(org.osate.ge.internal.diagram.runtime.updating.DiagramUpdater) IEditorPart(org.eclipse.ui.IEditorPart) LinkedList(java.util.LinkedList) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) BusinessObjectNode(org.osate.ge.internal.diagram.runtime.updating.BusinessObjectNode) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) ReferenceBuilderService(org.osate.ge.services.ReferenceBuilderService) BusinessObjectContext(org.osate.ge.BusinessObjectContext) LayoutInfoProvider(org.osate.ge.internal.diagram.runtime.layout.LayoutInfoProvider)

Example 38 with AgeDiagram

use of org.osate.ge.internal.diagram.runtime.AgeDiagram in project osate2 by osate.

the class NotePropertySection method createControls.

@Override
public void createControls(final Composite parent, final TabbedPropertySheetPage aTabbedPropertySheetPage) {
    super.createControls(parent, aTabbedPropertySheetPage);
    final Composite composite = getWidgetFactory().createPlainComposite(parent, SWT.NONE);
    composite.setLayout(GridLayoutFactory.swtDefaults().numColumns(1).create());
    noteField = getWidgetFactory().createText(composite, "", SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
    noteField.setLayoutData(GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).hint(100, 100).create());
    // Create the button that will update the diagram. This button won't actually do anything because the diagram is updated when the focus is lost.
    // However, it is useful to have it so that the user can easily see the result of the change without without having to change property tabs/selection.
    saveBtn = getWidgetFactory().createButton(composite, "Save", SWT.PUSH);
    noteField.addFocusListener(new FocusAdapter() {

        @Override
        public void focusLost(FocusEvent e) {
            // Update the embedded business object
            final Note note = getNote();
            if (note != null && !Objects.equals(note.getText(), noteField.getText())) {
                final Note newNote = new Note(note.getId(), noteField.getText());
                final AgeDiagram diagram = DiagramElementUtil.getDiagram(selectedDiagramElement);
                diagram.modify("Modify Note", m -> {
                    m.updateBusinessObjectWithSameRelativeReference(selectedDiagramElement, newNote);
                });
                // For the diagram updater to be executed. This is requires for the diagram element's label to be update.
                // Ideally this would be performed automatically but for now, it is not executed since we have not performed an AADL model change.
                final InternalDiagramEditor editor = UiUtil.getActiveDiagramEditor();
                if (editor != null) {
                    editor.updateDiagram();
                }
            }
        }
    });
    InternalPropertySectionUtil.setPropertiesHelp(aTabbedPropertySheetPage.getControl());
}
Also used : Text(org.eclipse.swt.widgets.Text) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) InternalPropertySectionUtil(org.osate.ge.internal.ui.util.InternalPropertySectionUtil) Button(org.eclipse.swt.widgets.Button) AbstractPropertySection(org.eclipse.ui.views.properties.tabbed.AbstractPropertySection) GridDataFactory(org.eclipse.jface.layout.GridDataFactory) FocusEvent(org.eclipse.swt.events.FocusEvent) IFilter(org.eclipse.jface.viewers.IFilter) GridLayoutFactory(org.eclipse.jface.layout.GridLayoutFactory) TabbedPropertySheetPage(org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) DiagramElementUtil(org.osate.ge.internal.util.DiagramElementUtil) Objects(java.util.Objects) Adapters(org.eclipse.core.runtime.Adapters) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) IWorkbenchPart(org.eclipse.ui.IWorkbenchPart) Note(org.osate.ge.internal.model.Note) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) UiUtil(org.osate.ge.internal.ui.util.UiUtil) Composite(org.eclipse.swt.widgets.Composite) SWT(org.eclipse.swt.SWT) PropertySectionUtil(org.osate.ge.ui.PropertySectionUtil) ISelection(org.eclipse.jface.viewers.ISelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) FocusAdapter(org.eclipse.swt.events.FocusAdapter) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) FocusAdapter(org.eclipse.swt.events.FocusAdapter) Composite(org.eclipse.swt.widgets.Composite) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) Note(org.osate.ge.internal.model.Note) FocusEvent(org.eclipse.swt.events.FocusEvent)

Example 39 with AgeDiagram

use of org.osate.ge.internal.diagram.runtime.AgeDiagram in project osate2 by osate.

the class HideContentFilterHandler method execute.

@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
    final IEditorPart activeEditor = HandlerUtil.getActiveEditor(event);
    if (!(activeEditor instanceof InternalDiagramEditor)) {
        throw new RuntimeException("Unexpected editor: " + activeEditor);
    }
    // Get diagram and selected elements
    final InternalDiagramEditor diagramEditor = (InternalDiagramEditor) activeEditor;
    final String contentFilterId = (String) event.getParameters().get(PARAM_CONTENTS_FILTER_ID);
    if (contentFilterId == null) {
        throw new RuntimeException("Unable to get content filter");
    }
    final ContentFilterProvider contentFilterProvider = getContentFilterProvider();
    final ContentFilter filter = contentFilterProvider.getContentFilterById(contentFilterId).orElseThrow(() -> new RuntimeException("Unable to get content filter"));
    final List<DiagramElement> selectedDiagramElements = AgeHandlerUtil.getSelectedDiagramElements();
    final AgeDiagram diagram = UiUtil.getDiagram(selectedDiagramElements);
    if (diagram == null) {
        throw new RuntimeException("Unable to get diagram");
    }
    final List<DiagramElement> elementsToRemove = selectedDiagramElements.stream().filter(s -> filter.isApplicable(s.getBusinessObject())).flatMap(s -> s.getChildren().stream().filter(child -> filter.test(child.getBusinessObject()))).collect(Collectors.toList());
    if (!elementsToRemove.isEmpty()) {
        diagram.modify("Hide", m -> {
            for (final DiagramElement selectedDiagramElement : selectedDiagramElements) {
                if (filter.isApplicable(selectedDiagramElement.getBusinessObject())) {
                    for (final DiagramElement child : selectedDiagramElement.getChildren()) {
                        if (filter.test(child.getBusinessObject())) {
                            m.removeElement(child);
                        }
                    }
                }
            }
        });
        // Update the diagram
        diagramEditor.updateDiagram();
    }
    return null;
}
Also used : InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) ExecutionEvent(org.eclipse.core.commands.ExecutionEvent) EclipseContextFactory(org.eclipse.e4.core.contexts.EclipseContextFactory) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) ContentFilter(org.osate.ge.ContentFilter) ExtensionRegistryService(org.osate.ge.internal.services.ExtensionRegistryService) ExecutionException(org.eclipse.core.commands.ExecutionException) Collectors(java.util.stream.Collectors) HandlerUtil(org.eclipse.ui.handlers.HandlerUtil) Objects(java.util.Objects) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) List(java.util.List) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) UiUtil(org.osate.ge.internal.ui.util.UiUtil) AbstractHandler(org.eclipse.core.commands.AbstractHandler) Bundle(org.osgi.framework.Bundle) IEditorPart(org.eclipse.ui.IEditorPart) FrameworkUtil(org.osgi.framework.FrameworkUtil) ContentFilterProvider(org.osate.ge.internal.diagram.runtime.filtering.ContentFilterProvider) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) IEditorPart(org.eclipse.ui.IEditorPart) ContentFilterProvider(org.osate.ge.internal.diagram.runtime.filtering.ContentFilterProvider) ContentFilter(org.osate.ge.ContentFilter)

Example 40 with AgeDiagram

use of org.osate.ge.internal.diagram.runtime.AgeDiagram in project osate2 by osate.

the class HideElementHandler method getElementsToHide.

/**
 * Gets the elements to hide. Elements are hideable if they are configurable and they are not at the root of a diagram which has a context.
 * @param selectedDiagramElements
 * @return
 */
private List<DiagramElement> getElementsToHide(final List<DiagramElement> selectedDiagramElements) {
    final AgeDiagram diagram = UiUtil.getDiagram(selectedDiagramElements);
    final boolean diagramHasContext = diagram != null && diagram.getConfiguration().getContextBoReference() != null;
    // Get the extension registry
    final Bundle bundle = FrameworkUtil.getBundle(getClass());
    final ExtensionRegistryService extService = Objects.requireNonNull(EclipseContextFactory.getServiceContext(bundle.getBundleContext()).get(ExtensionRegistryService.class), "Unable to retrieve extension registry");
    return selectedDiagramElements.stream().filter(de -> (!diagramHasContext || de.getParent() != diagram) && FilteringUtil.isConfigurable(extService, de.getBusinessObject())).collect(Collectors.toList());
}
Also used : ExecutionEvent(org.eclipse.core.commands.ExecutionEvent) EclipseContextFactory(org.eclipse.e4.core.contexts.EclipseContextFactory) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) ExtensionRegistryService(org.osate.ge.internal.services.ExtensionRegistryService) ExecutionException(org.eclipse.core.commands.ExecutionException) Collectors(java.util.stream.Collectors) HandlerUtil(org.eclipse.ui.handlers.HandlerUtil) Objects(java.util.Objects) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) List(java.util.List) InternalDiagramEditor(org.osate.ge.internal.ui.editor.InternalDiagramEditor) UiUtil(org.osate.ge.internal.ui.util.UiUtil) FilteringUtil(org.osate.ge.internal.diagram.runtime.filtering.FilteringUtil) AbstractHandler(org.eclipse.core.commands.AbstractHandler) Bundle(org.osgi.framework.Bundle) IEditorPart(org.eclipse.ui.IEditorPart) FrameworkUtil(org.osgi.framework.FrameworkUtil) AgeDiagram(org.osate.ge.internal.diagram.runtime.AgeDiagram) Bundle(org.osgi.framework.Bundle) ExtensionRegistryService(org.osate.ge.internal.services.ExtensionRegistryService)

Aggregations

AgeDiagram (org.osate.ge.internal.diagram.runtime.AgeDiagram)46 DiagramElement (org.osate.ge.internal.diagram.runtime.DiagramElement)35 InternalDiagramEditor (org.osate.ge.internal.ui.editor.InternalDiagramEditor)20 IEditorPart (org.eclipse.ui.IEditorPart)18 List (java.util.List)16 Objects (java.util.Objects)16 Collectors (java.util.stream.Collectors)12 BusinessObjectContext (org.osate.ge.BusinessObjectContext)12 ExtensionRegistryService (org.osate.ge.internal.services.ExtensionRegistryService)11 DiagramNode (org.osate.ge.internal.diagram.runtime.DiagramNode)10 Collections (java.util.Collections)9 Adapters (org.eclipse.core.runtime.Adapters)9 DiagramUpdater (org.osate.ge.internal.diagram.runtime.updating.DiagramUpdater)9 Collection (java.util.Collection)8 LinkedList (java.util.LinkedList)8 Optional (java.util.Optional)8 Stream (java.util.stream.Stream)8 Point (org.osate.ge.graphics.Point)8 ArrayList (java.util.ArrayList)7 UiUtil (org.osate.ge.internal.ui.util.UiUtil)7