Search in sources :

Example 31 with CompoundCommand

use of org.eclipse.gef.commands.CompoundCommand in project archi by archimatetool.

the class CommandsTests method testEObjectNonNotifyingCompoundCommand.

@Test
public void testEObjectNonNotifyingCompoundCommand() {
    final boolean[] execute = new boolean[1];
    model.eAdapters().add(new EContentAdapter() {

        @Override
        public void notifyChanged(Notification msg) {
            super.notifyChanged(msg);
            if (msg.getEventType() == EObjectNonNotifyingCompoundCommand.START) {
                assertEquals(model, msg.getNewValue());
                assertEquals(execute[0] ? "Archisurance" : "Hello3", model.getName());
            } else if (msg.getEventType() == EObjectNonNotifyingCompoundCommand.END) {
                assertEquals(model, msg.getNewValue());
                assertEquals(execute[0] ? "Hello3" : "Archisurance", model.getName());
            }
        }
    });
    CompoundCommand compoundCmd = new EObjectNonNotifyingCompoundCommand(model);
    compoundCmd.add(new EObjectFeatureCommand("Rename", model, IArchimatePackage.Literals.NAMEABLE__NAME, "Hello1"));
    compoundCmd.add(new EObjectFeatureCommand("Rename", model, IArchimatePackage.Literals.NAMEABLE__NAME, "Hello2"));
    compoundCmd.add(new EObjectFeatureCommand("Rename", model, IArchimatePackage.Literals.NAMEABLE__NAME, "Hello3"));
    execute[0] = true;
    compoundCmd.execute();
    execute[0] = false;
    compoundCmd.undo();
    execute[0] = true;
    compoundCmd.redo();
}
Also used : Notification(org.eclipse.emf.common.notify.Notification) EContentAdapter(org.eclipse.emf.ecore.util.EContentAdapter) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) Test(org.junit.Test)

Example 32 with CompoundCommand

use of org.eclipse.gef.commands.CompoundCommand in project archi by archimatetool.

the class FormatPainterToolTests method testCreateCommandForDiagramModelArchimateObject.

// ---------------------------------------------------------------------------------------------
// Tests
// ---------------------------------------------------------------------------------------------
@Test
public void testCreateCommandForDiagramModelArchimateObject() throws Exception {
    // Source component
    IDiagramModelArchimateObject sourceComponent = ArchimateTestModel.createDiagramModelArchimateObject(IArchimateFactory.eINSTANCE.createBusinessActor());
    // Target component
    IDiagramModelArchimateObject targetComponent = ArchimateTestModel.createDiagramModelArchimateObject(IArchimateFactory.eINSTANCE.createBusinessActor());
    // Set FormatPainterInfo to Source component
    FormatPainterInfo.INSTANCE.updatePaintFormat(sourceComponent);
    PaintFormat pf = FormatPainterInfo.INSTANCE.getPaintFormat();
    // Execute command
    FormatPainterTool tool = new FormatPainterTool();
    CompoundCommand compoundCmd = tool.createCommand(pf, targetComponent);
    // Source and Target have same properties except for fill color so only one command
    assertEquals(1, compoundCmd.getCommands().size());
    // Fill Color should be set even if fill colour source is null (default)
    Command cmd = (Command) compoundCmd.getCommands().get(0);
    assertTrue(cmd instanceof FillColorCommand);
    Object newValue = TestUtils.getPrivateField(cmd, "fNewValue");
    assertEquals("#ffffb5", newValue);
    // Now change some properties on the source component
    sourceComponent.setFont("Consolas");
    sourceComponent.setFontColor("#eeeeee");
    sourceComponent.setLineColor("#eeeeee");
    sourceComponent.setLineWidth(3);
    sourceComponent.setTextAlignment(1);
    compoundCmd = tool.createCommand(pf, targetComponent);
    assertEquals(6, compoundCmd.getCommands().size());
}
Also used : PaintFormat(com.archimatetool.editor.diagram.tools.FormatPainterInfo.PaintFormat) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) FillColorCommand(com.archimatetool.editor.diagram.commands.FillColorCommand) Command(org.eclipse.gef.commands.Command) FillColorCommand(com.archimatetool.editor.diagram.commands.FillColorCommand) IDiagramModelArchimateObject(com.archimatetool.model.IDiagramModelArchimateObject) IDiagramModelArchimateObject(com.archimatetool.model.IDiagramModelArchimateObject) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) Test(org.junit.Test)

Example 33 with CompoundCommand

use of org.eclipse.gef.commands.CompoundCommand in project archi by archimatetool.

the class ArchimateDNDEditPolicy method getDropCommand.

@Override
protected Command getDropCommand(DiagramDropRequest request) {
    if (!(request.getData() instanceof IStructuredSelection)) {
        return null;
    }
    // XY drop point
    Point pt = getDropLocation(request);
    int origin = pt.x;
    int x = pt.x;
    int y = pt.y;
    fElementsToAdd = new ArrayList<IArchimateElement>();
    fRelationsToAdd = new ArrayList<IArchimateRelationship>();
    fDiagramRefsToAdd = new ArrayList<IDiagramModel>();
    // Gather an actual list of elements dragged onto the container, omitting duplicates and anything already on the diagram
    Object[] objects = ((IStructuredSelection) request.getData()).toArray();
    getElementsToAdd(objects);
    // Store the Diagram Model Components that will be added in this list
    List<IDiagramModelArchimateComponent> diagramComponentsThatWereAdded = new ArrayList<IDiagramModelArchimateComponent>();
    // Create a Compound Command - it has to be Non-Notifying or it's too slow (tested with Bill's UoB model!)
    CompoundCommand result = new NonNotifyingCompoundCommand(Messages.ArchimateDNDEditPolicy_0);
    // Add the Commands adding the Elements first
    for (IArchimateElement element : fElementsToAdd) {
        // Add Diagram object
        IDiagramModelArchimateObject dmo = ArchimateDiagramModelFactory.createDiagramModelArchimateObject(element);
        // Set location
        dmo.getBounds().setLocation(x, y);
        // Store it
        diagramComponentsThatWereAdded.add(dmo);
        // Add Command
        result.add(new AddDiagramObjectCommand(getTargetContainer(), dmo));
        // Increase x,y
        x += 150;
        if (x > origin + 400) {
            x = origin;
            y += 100;
        }
    }
    // Then any Diagram Model Ref Commands
    for (IDiagramModel diagramModel : fDiagramRefsToAdd) {
        result.add(new AddDiagramModelReferenceCommand(getTargetContainer(), diagramModel, x, y));
        x += 150;
        if (x > origin + 400) {
            x = origin;
            y += 100;
        }
    }
    // Add selected Relations to create connections to those elements on the diagram that don't already have them
    for (IArchimateRelationship relation : fRelationsToAdd) {
        // Find existing source & target components on the diagram that the new connection will link to
        List<IDiagramModelArchimateComponent> sources = DiagramModelUtils.findDiagramModelComponentsForArchimateConcept(getTargetDiagramModel(), relation.getSource());
        List<IDiagramModelArchimateComponent> targets = DiagramModelUtils.findDiagramModelComponentsForArchimateConcept(getTargetDiagramModel(), relation.getTarget());
        for (IDiagramModelComponent dcSource : sources) {
            for (IDiagramModelComponent dcTarget : targets) {
                if (dcSource instanceof IConnectable && dcTarget instanceof IConnectable) {
                    // Add a new connection between dcSource & dcTarget if there isn't already one on the diagram
                    if (dcTarget != dcSource && !DiagramModelUtils.hasDiagramModelArchimateConnection((IConnectable) dcSource, (IConnectable) dcTarget, relation)) {
                        // Check that source or target is not a hiden connection
                        if (!((dcSource instanceof IDiagramModelArchimateConnection && DiagramModelUtils.shouldBeHiddenConnection((IDiagramModelArchimateConnection) dcSource)) || (dcTarget instanceof IDiagramModelArchimateConnection && DiagramModelUtils.shouldBeHiddenConnection((IDiagramModelArchimateConnection) dcTarget)))) {
                            AddDiagramArchimateConnectionCommand cmd = new AddDiagramArchimateConnectionCommand((IConnectable) dcSource, (IConnectable) dcTarget, relation);
                            result.add(cmd);
                            // Store it
                            diagramComponentsThatWereAdded.add(cmd.getConnection());
                        }
                    }
                }
            }
        }
    }
    // Whether to add connections to elements
    Boolean value = (Boolean) request.getExtendedData().get(ArchimateDiagramTransferDropTargetListener.ADD_ELEMENT_CONNECTIONS);
    boolean addConnectionsToElements = value != null && value.booleanValue();
    // Newly added concepts will need new connections to both existing and newly added concepts
    for (IDiagramModelArchimateComponent dmComponent : diagramComponentsThatWereAdded) {
        IArchimateConcept archimateConcept = dmComponent.getArchimateConcept();
        for (IArchimateRelationship relation : ArchimateModelUtils.getAllRelationshipsForConcept(archimateConcept)) {
            /*
                 * If the user holds down the Copy key (Ctrl on win/lnx, Alt on Mac) then linked connections
                 * are not added on drag and drop. However, any selected relations' linked objects are added.
                 */
            if (!addConnectionsToElements && !fRelationsToAdd.contains(relation)) {
                continue;
            }
            // Find existing objects
            List<IDiagramModelArchimateComponent> sources = DiagramModelUtils.findDiagramModelComponentsForArchimateConcept(getTargetDiagramModel(), relation.getSource());
            List<IDiagramModelArchimateComponent> targets = DiagramModelUtils.findDiagramModelComponentsForArchimateConcept(getTargetDiagramModel(), relation.getTarget());
            // Add new ones too
            for (IDiagramModelArchimateComponent dmComponent2 : diagramComponentsThatWereAdded) {
                if (dmComponent != dmComponent2) {
                    IArchimateConcept archimateConcept2 = dmComponent2.getArchimateConcept();
                    if (archimateConcept2 == relation.getSource()) {
                        // Only need to add sources, not targets
                        sources.add(dmComponent2);
                    }
                }
            }
            // Make the Commands...
            for (IDiagramModelComponent dcSource : sources) {
                if (dcSource instanceof IConnectable && archimateConcept == relation.getTarget()) {
                    result.add(new AddDiagramArchimateConnectionCommand((IConnectable) dcSource, (IConnectable) dmComponent, relation));
                }
            }
            for (IDiagramModelComponent dcTarget : targets) {
                if (dcTarget instanceof IConnectable && archimateConcept == relation.getSource()) {
                    result.add(new AddDiagramArchimateConnectionCommand((IConnectable) dmComponent, (IConnectable) dcTarget, relation));
                }
            }
        }
    }
    // Then, if adding to an Archimate container type to create nesting, ask whether to add new relations if none exist...
    if (ConnectionPreferences.createRelationWhenAddingModelTreeElement() && getTargetContainer() instanceof IDiagramModelArchimateObject) {
        List<IDiagramModelArchimateObject> diagramObjectsThatWereAdded = new ArrayList<IDiagramModelArchimateObject>();
        for (IDiagramModelArchimateComponent dmc : diagramComponentsThatWereAdded) {
            if (dmc instanceof IDiagramModelArchimateObject) {
                diagramObjectsThatWereAdded.add((IDiagramModelArchimateObject) dmc);
            }
        }
        Command cmd = new CreateNestedArchimateConnectionsWithDialogCommand((IDiagramModelArchimateObject) getTargetContainer(), diagramObjectsThatWereAdded);
        result.add(cmd);
    }
    // return the full compound command
    return result;
}
Also used : CreateNestedArchimateConnectionsWithDialogCommand(com.archimatetool.editor.diagram.commands.CreateNestedArchimateConnectionsWithDialogCommand) ArrayList(java.util.ArrayList) AddDiagramObjectCommand(com.archimatetool.editor.diagram.commands.AddDiagramObjectCommand) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) AddDiagramModelReferenceCommand(com.archimatetool.editor.diagram.commands.AddDiagramModelReferenceCommand) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) NonNotifyingCompoundCommand(com.archimatetool.editor.model.commands.NonNotifyingCompoundCommand) IDiagramModel(com.archimatetool.model.IDiagramModel) IArchimateElement(com.archimatetool.model.IArchimateElement) IArchimateConcept(com.archimatetool.model.IArchimateConcept) IArchimateRelationship(com.archimatetool.model.IArchimateRelationship) NonNotifyingCompoundCommand(com.archimatetool.editor.model.commands.NonNotifyingCompoundCommand) IConnectable(com.archimatetool.model.IConnectable) IDiagramModelComponent(com.archimatetool.model.IDiagramModelComponent) IDiagramModelArchimateConnection(com.archimatetool.model.IDiagramModelArchimateConnection) Point(org.eclipse.draw2d.geometry.Point) Point(org.eclipse.draw2d.geometry.Point) AddDiagramModelReferenceCommand(com.archimatetool.editor.diagram.commands.AddDiagramModelReferenceCommand) AddDiagramObjectCommand(com.archimatetool.editor.diagram.commands.AddDiagramObjectCommand) CreateNestedArchimateConnectionsWithDialogCommand(com.archimatetool.editor.diagram.commands.CreateNestedArchimateConnectionsWithDialogCommand) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) NonNotifyingCompoundCommand(com.archimatetool.editor.model.commands.NonNotifyingCompoundCommand) Command(org.eclipse.gef.commands.Command) IDiagramModelArchimateComponent(com.archimatetool.model.IDiagramModelArchimateComponent) IDiagramModelArchimateObject(com.archimatetool.model.IDiagramModelArchimateObject) IArchimateModelObject(com.archimatetool.model.IArchimateModelObject) EObject(org.eclipse.emf.ecore.EObject) IDiagramModelArchimateObject(com.archimatetool.model.IDiagramModelArchimateObject)

Example 34 with CompoundCommand

use of org.eclipse.gef.commands.CompoundCommand in project archi by archimatetool.

the class ArchimateDiagramConnectionPolicy method getReconnectCommand.

/**
 * Create a ReconnectCommand
 */
protected Command getReconnectCommand(ReconnectRequest request, boolean isSourceCommand) {
    IDiagramModelConnection connection = (IDiagramModelConnection) request.getConnectionEditPart().getModel();
    // The re-connected object
    IConnectable newObject = (IConnectable) getHost().getModel();
    // Get the type of connection (plain) or relationship (if archimate connection) and check if it is valid
    EClass type = connection.eClass();
    if (connection instanceof IDiagramModelArchimateConnection) {
        type = ((IDiagramModelArchimateConnection) connection).getArchimateRelationship().eClass();
    }
    if (isSourceCommand) {
        if (!isValidConnection(newObject, connection.getTarget(), type)) {
            return null;
        }
    } else {
        if (!isValidConnection(connection.getSource(), newObject, type)) {
            return null;
        }
    }
    /*
         * Re-connect ArchiMate Connection to Archimate Component
         * In this case we have to check for matching occurences on all diagrams
         */
    if (connection instanceof IDiagramModelArchimateConnection && newObject instanceof IDiagramModelArchimateComponent) {
        IArchimateRelationship relationship = ((IDiagramModelArchimateConnection) connection).getArchimateRelationship();
        IArchimateConcept newConcept = ((IDiagramModelArchimateComponent) newObject).getArchimateConcept();
        // Compound Command
        CompoundCommand result = new CompoundCommand();
        // Check for matching connections in this and other diagrams
        for (IDiagramModel diagramModel : newConcept.getArchimateModel().getDiagramModels()) {
            for (IDiagramModelArchimateConnection matchingConnection : DiagramModelUtils.findDiagramModelConnectionsForRelation(diagramModel, relationship)) {
                IDiagramModelArchimateComponent matchingComponent = null;
                // Same Diagram so use the new target
                if (newObject.getDiagramModel() == diagramModel) {
                    matchingComponent = (IDiagramModelArchimateComponent) newObject;
                } else // Different Diagram so find a match
                {
                    List<IDiagramModelArchimateComponent> list = DiagramModelUtils.findDiagramModelComponentsForArchimateConcept(diagramModel, newConcept);
                    if (!list.isEmpty()) {
                        matchingComponent = list.get(0);
                    }
                }
                // Does the new object exist on the diagram? Yes, reconnect
                if (matchingComponent != null) {
                    ReconnectDiagramConnectionCommand cmd = new ReconnectDiagramConnectionCommand(matchingConnection);
                    if (isSourceCommand) {
                        cmd.setNewSource(matchingComponent);
                    } else {
                        cmd.setNewTarget(matchingComponent);
                    }
                    result.add(cmd);
                } else // No, so delete the matching connection
                {
                    result.add(DiagramCommandFactory.createDeleteDiagramConnectionCommand(matchingConnection));
                }
            }
        }
        return result.unwrap();
    } else // Re-connect other cases
    {
        ReconnectDiagramConnectionCommand cmd = new ReconnectDiagramConnectionCommand(connection);
        if (isSourceCommand) {
            cmd.setNewSource(newObject);
        } else {
            cmd.setNewTarget(newObject);
        }
        return cmd;
    }
}
Also used : IConnectable(com.archimatetool.model.IConnectable) EClass(org.eclipse.emf.ecore.EClass) ReconnectDiagramConnectionCommand(com.archimatetool.editor.diagram.commands.ReconnectDiagramConnectionCommand) IDiagramModel(com.archimatetool.model.IDiagramModel) IDiagramModelArchimateConnection(com.archimatetool.model.IDiagramModelArchimateConnection) IDiagramModelConnection(com.archimatetool.model.IDiagramModelConnection) IDiagramModelArchimateComponent(com.archimatetool.model.IDiagramModelArchimateComponent) IArchimateConcept(com.archimatetool.model.IArchimateConcept) IArchimateRelationship(com.archimatetool.model.IArchimateRelationship) CompoundCommand(org.eclipse.gef.commands.CompoundCommand)

Example 35 with CompoundCommand

use of org.eclipse.gef.commands.CompoundCommand in project archi by archimatetool.

the class FormatPainterTool method createCommand.

protected CompoundCommand createCommand(PaintFormat pf, IDiagramModelComponent targetComponent) {
    CompoundCommand result = new CompoundCommand(Messages.FormatPainterTool_0);
    // IFontAttribute
    if (pf.getSourceComponent() instanceof IFontAttribute && targetComponent instanceof IFontAttribute) {
        IFontAttribute source = (IFontAttribute) pf.getSourceComponent();
        IFontAttribute target = (IFontAttribute) targetComponent;
        Command cmd = new FontStyleCommand(target, source.getFont());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
        cmd = new FontColorCommand(target, source.getFontColor());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
    }
    // ILineObject
    if (pf.getSourceComponent() instanceof ILineObject && targetComponent instanceof ILineObject) {
        ILineObject source = (ILineObject) pf.getSourceComponent();
        ILineObject target = (ILineObject) targetComponent;
        Command cmd = new LineColorCommand(target, source.getLineColor());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
        cmd = new LineWidthCommand(target, source.getLineWidth());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
    }
    // IBorderObject
    if (pf.getSourceComponent() instanceof IBorderObject && targetComponent instanceof IBorderObject) {
        IBorderObject source = (IBorderObject) pf.getSourceComponent();
        IBorderObject target = (IBorderObject) targetComponent;
        Command cmd = new BorderColorCommand(target, source.getBorderColor());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
    }
    // ITextPosition
    if (pf.getSourceComponent() instanceof ITextPosition && targetComponent instanceof ITextPosition) {
        ITextPosition source = (ITextPosition) pf.getSourceComponent();
        ITextPosition target = (ITextPosition) targetComponent;
        Command cmd = new TextPositionCommand(target, source.getTextPosition());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
    }
    // ITextAlignment
    if (pf.getSourceComponent() instanceof ITextAlignment && targetComponent instanceof ITextAlignment) {
        ITextAlignment source = (ITextAlignment) pf.getSourceComponent();
        ITextAlignment target = (ITextAlignment) targetComponent;
        Command cmd = new TextAlignmentCommand(target, source.getTextAlignment());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
    }
    // IDiagramModelObject
    if (pf.getSourceComponent() instanceof IDiagramModelObject && targetComponent instanceof IDiagramModelObject) {
        IDiagramModelObject source = (IDiagramModelObject) pf.getSourceComponent();
        IDiagramModelObject target = (IDiagramModelObject) targetComponent;
        // Source fill colour is null which is "default"
        String fillColorString = source.getFillColor();
        if (fillColorString == null) {
            fillColorString = ColorFactory.convertColorToString(ColorFactory.getDefaultFillColor(source));
        }
        Command cmd = new FillColorCommand(target, fillColorString);
        if (cmd.canExecute()) {
            result.add(cmd);
        }
        // Alpha opacity
        cmd = new DiagramModelObjectAlphaCommand(target, source.getAlpha());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
    }
    // IDiagramModelConnection
    if (pf.getSourceComponent() instanceof IDiagramModelConnection && targetComponent instanceof IDiagramModelConnection) {
        IDiagramModelConnection source = (IDiagramModelConnection) pf.getSourceComponent();
        IDiagramModelConnection target = (IDiagramModelConnection) targetComponent;
        // Connection text position
        Command cmd = new ConnectionTextPositionCommand(target, source.getTextPosition());
        if (cmd.canExecute()) {
            result.add(cmd);
        }
    }
    return result;
}
Also used : TextAlignmentCommand(com.archimatetool.editor.diagram.commands.TextAlignmentCommand) LineColorCommand(com.archimatetool.editor.diagram.commands.LineColorCommand) ITextPosition(com.archimatetool.model.ITextPosition) FillColorCommand(com.archimatetool.editor.diagram.commands.FillColorCommand) IDiagramModelConnection(com.archimatetool.model.IDiagramModelConnection) IDiagramModelObject(com.archimatetool.model.IDiagramModelObject) DiagramModelObjectAlphaCommand(com.archimatetool.editor.diagram.commands.DiagramModelObjectAlphaCommand) ILineObject(com.archimatetool.model.ILineObject) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) BorderColorCommand(com.archimatetool.editor.diagram.commands.BorderColorCommand) IBorderObject(com.archimatetool.model.IBorderObject) FontColorCommand(com.archimatetool.editor.diagram.commands.FontColorCommand) ITextAlignment(com.archimatetool.model.ITextAlignment) FontStyleCommand(com.archimatetool.editor.diagram.commands.FontStyleCommand) DiagramModelObjectAlphaCommand(com.archimatetool.editor.diagram.commands.DiagramModelObjectAlphaCommand) ConnectionTextPositionCommand(com.archimatetool.editor.diagram.commands.ConnectionTextPositionCommand) BorderColorCommand(com.archimatetool.editor.diagram.commands.BorderColorCommand) TextPositionCommand(com.archimatetool.editor.diagram.commands.TextPositionCommand) LineWidthCommand(com.archimatetool.editor.diagram.commands.LineWidthCommand) FontColorCommand(com.archimatetool.editor.diagram.commands.FontColorCommand) TextAlignmentCommand(com.archimatetool.editor.diagram.commands.TextAlignmentCommand) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) FillColorCommand(com.archimatetool.editor.diagram.commands.FillColorCommand) LineColorCommand(com.archimatetool.editor.diagram.commands.LineColorCommand) Command(org.eclipse.gef.commands.Command) IFontAttribute(com.archimatetool.model.IFontAttribute) ConnectionTextPositionCommand(com.archimatetool.editor.diagram.commands.ConnectionTextPositionCommand) TextPositionCommand(com.archimatetool.editor.diagram.commands.TextPositionCommand) LineWidthCommand(com.archimatetool.editor.diagram.commands.LineWidthCommand) FontStyleCommand(com.archimatetool.editor.diagram.commands.FontStyleCommand) ConnectionTextPositionCommand(com.archimatetool.editor.diagram.commands.ConnectionTextPositionCommand)

Aggregations

CompoundCommand (org.eclipse.gef.commands.CompoundCommand)148 Command (org.eclipse.gef.commands.Command)63 EObject (org.eclipse.emf.ecore.EObject)28 ArrayList (java.util.ArrayList)23 AbstractWidgetModel (org.csstudio.opibuilder.model.AbstractWidgetModel)22 EObjectFeatureCommand (com.archimatetool.editor.model.commands.EObjectFeatureCommand)17 List (java.util.List)16 EditPart (org.eclipse.gef.EditPart)16 IElementParameter (org.talend.core.model.process.IElementParameter)16 PropertyChangeCommand (org.talend.designer.core.ui.editor.cmd.PropertyChangeCommand)15 Node (org.talend.designer.core.ui.editor.nodes.Node)15 SetWidgetPropertyCommand (org.csstudio.opibuilder.commands.SetWidgetPropertyCommand)14 Point (org.eclipse.draw2d.geometry.Point)14 Rectangle (org.eclipse.draw2d.geometry.Rectangle)14 INode (org.talend.core.model.process.INode)14 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)14 RepositoryNode (org.talend.repository.model.RepositoryNode)13 SelectionEvent (org.eclipse.swt.events.SelectionEvent)12 ConnectionItem (org.talend.core.model.properties.ConnectionItem)12 IDiagramModelObject (com.archimatetool.model.IDiagramModelObject)11