Search in sources :

Example 1 with DiagramConnectionEditPart

use of com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart in project archi by archimatetool.

the class SketchEditPartFactoryTests method testLineConnectionEditPart.

@Test
public void testLineConnectionEditPart() {
    IDiagramModelConnection conn = IArchimateFactory.eINSTANCE.createDiagramModelConnection();
    EditPart editPart = editPartFactory.createEditPart(null, conn);
    assertTrue(editPart instanceof DiagramConnectionEditPart);
    assertEquals(conn, editPart.getModel());
}
Also used : IDiagramModelConnection(com.archimatetool.model.IDiagramModelConnection) DiagramConnectionEditPart(com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart) EditPart(org.eclipse.gef.EditPart) EmptyEditPart(com.archimatetool.editor.diagram.editparts.diagram.EmptyEditPart) DiagramConnectionEditPart(com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart) Test(org.junit.Test)

Example 2 with DiagramConnectionEditPart

use of com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart in project archi by archimatetool.

the class CanvasModelEditPartFactoryTests method testCanvasConnectionEditPart.

@Test
public void testCanvasConnectionEditPart() {
    IDiagramModelConnection conn = ICanvasFactory.eINSTANCE.createCanvasModelConnection();
    EditPart editPart = editPartFactory.createEditPart(null, conn);
    assertTrue(editPart instanceof DiagramConnectionEditPart);
    assertEquals(conn, editPart.getModel());
}
Also used : IDiagramModelConnection(com.archimatetool.model.IDiagramModelConnection) DiagramImageEditPart(com.archimatetool.editor.diagram.editparts.diagram.DiagramImageEditPart) DiagramConnectionEditPart(com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart) EditPart(org.eclipse.gef.EditPart) EmptyEditPart(com.archimatetool.editor.diagram.editparts.diagram.EmptyEditPart) DiagramConnectionEditPart(com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart) Test(org.junit.Test)

Example 3 with DiagramConnectionEditPart

use of com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart in project archi by archimatetool.

the class CanvasLineConnectionUIProviderTests method testCreateEditPart.

@Override
public void testCreateEditPart() {
    EditPart editPart = provider.createEditPart();
    assertTrue(editPart instanceof DiagramConnectionEditPart);
}
Also used : EditPart(org.eclipse.gef.EditPart) DiagramConnectionEditPart(com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart) DiagramConnectionEditPart(com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart)

Aggregations

DiagramConnectionEditPart (com.archimatetool.editor.diagram.editparts.DiagramConnectionEditPart)3 EditPart (org.eclipse.gef.EditPart)3 EmptyEditPart (com.archimatetool.editor.diagram.editparts.diagram.EmptyEditPart)2 IDiagramModelConnection (com.archimatetool.model.IDiagramModelConnection)2 Test (org.junit.Test)2 DiagramImageEditPart (com.archimatetool.editor.diagram.editparts.diagram.DiagramImageEditPart)1