Search in sources :

Example 1 with MagicConnectionModelFactory

use of com.archimatetool.editor.diagram.tools.MagicConnectionModelFactory in project archi by archimatetool.

the class ArchimateDiagramEditorPalette method createArchimateRelationsGroup.

/**
 * Relations Types
 */
private void createArchimateRelationsGroup() {
    PaletteGroup group = new PaletteGroup(Messages.ArchimateDiagramEditorPalette_13);
    add(1, group);
    fEntries.add(group);
    // Magic Connector
    ConnectionCreationToolEntry magicConnectionEntry = new ConnectionCreationToolEntry(Messages.ArchimateDiagramEditorPalette_14, Messages.ArchimateDiagramEditorPalette_15, new MagicConnectionModelFactory(), IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_MAGIC_CONNECTION), IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_MAGIC_CONNECTION));
    magicConnectionEntry.setToolClass(MagicConnectionCreationTool.class);
    magicConnectionEntry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINISHED, true);
    group.add(magicConnectionEntry);
    // Relations
    for (EClass eClass : ArchimateModelUtils.getRelationsClasses()) {
        ToolEntry entry = createConnectionCreationToolEntry(eClass, null);
        group.add(entry);
    }
    // Junctions
    for (EClass eClass : ArchimateModelUtils.getConnectorClasses()) {
        ToolEntry entry = createElementCreationToolEntry(eClass, null);
        group.add(entry);
    }
}
Also used : EClass(org.eclipse.emf.ecore.EClass) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) MagicConnectionModelFactory(com.archimatetool.editor.diagram.tools.MagicConnectionModelFactory) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) ToolEntry(org.eclipse.gef.palette.ToolEntry) FormatPainterToolEntry(com.archimatetool.editor.diagram.tools.FormatPainterToolEntry) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) PaletteGroup(org.eclipse.gef.palette.PaletteGroup)

Aggregations

FormatPainterToolEntry (com.archimatetool.editor.diagram.tools.FormatPainterToolEntry)1 MagicConnectionModelFactory (com.archimatetool.editor.diagram.tools.MagicConnectionModelFactory)1 EClass (org.eclipse.emf.ecore.EClass)1 ConnectionCreationToolEntry (org.eclipse.gef.palette.ConnectionCreationToolEntry)1 PaletteGroup (org.eclipse.gef.palette.PaletteGroup)1 PanningSelectionToolEntry (org.eclipse.gef.palette.PanningSelectionToolEntry)1 ToolEntry (org.eclipse.gef.palette.ToolEntry)1