Search in sources :

Example 6 with HL7MultiSchemaUI

use of org.talend.designer.hl7.ui.HL7MultiSchemaUI in project tdi-studio-se by Talend.

the class HL7MetadataEmfToolbarEditor method createMoveDownPushButton.

@Override
protected MoveDownPushButton createMoveDownPushButton() {
    return new MoveDownPushButtonForExtendedTable(toolbar, extendedTableViewer) {

        @Override
        protected void afterCommandExecution(Command executedCommand) {
            MetadataEmfTableEditor tableEditorModel = (MetadataEmfTableEditor) getExtendedTableViewer().getExtendedControlModel();
            IStructuredSelection selection = (IStructuredSelection) ((HL7MultiSchemaUI) linker.getMainui()).getMetaTableViewer().getSelection();
            Object selectedObj = selection.getFirstElement();
            if (selectedObj != null) {
                String key = ((IModel) selectedObj).getDisplayName();
                List<MetadataColumn> metadataColumnList = tableEditorModel.getMetadataColumnList();
                Map<String, List<MetadataColumn>> schemaRelationMap = linker.getManager().getSchemaRelationMap();
                if (schemaRelationMap != null) {
                    List<MetadataColumn> schemas = new ArrayList<MetadataColumn>();
                    schemas.addAll(metadataColumnList);
                    schemaRelationMap.put(key, schemas);
                }
            }
            linker.getMainui().redrawLinkers();
            linker.getBackgroundRefresher().refreshBackground();
        }

        @Override
        public boolean getEnabledState() {
            // 13749
            return super.getEnabledState() && !isRepository;
        }
    };
}
Also used : IModel(org.talend.designer.hl7.model.IModel) MoveDownPushButtonForExtendedTable(org.talend.commons.ui.swt.advanced.dataeditor.button.MoveDownPushButtonForExtendedTable) ArrayList(java.util.ArrayList) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) MetadataColumn(org.talend.core.model.metadata.builder.connection.MetadataColumn) MetadataEmfExportXmlCommand(org.talend.core.ui.metadata.extended.command.MetadataEmfExportXmlCommand) MetadataEmfPasteCommand(org.talend.core.ui.metadata.extended.command.MetadataEmfPasteCommand) ExtendedTableResetDBTypesCommand(org.talend.core.ui.metadata.extended.command.ExtendedTableResetDBTypesCommand) MetadataEmfImportXmlCommand(org.talend.core.ui.metadata.extended.command.MetadataEmfImportXmlCommand) Command(org.eclipse.gef.commands.Command) MetadataEmfTableEditor(org.talend.core.ui.metadata.editor.MetadataEmfTableEditor) HL7MultiSchemaUI(org.talend.designer.hl7.ui.HL7MultiSchemaUI) ArrayList(java.util.ArrayList) List(java.util.List)

Example 7 with HL7MultiSchemaUI

use of org.talend.designer.hl7.ui.HL7MultiSchemaUI in project tdi-studio-se by Talend.

the class HL7Main method createUI.

/**
     * create UI".
     * 
     * @param parent
     * @return
     */
public void createUI(Composite parent) {
    if (connector.isHL7Output()) {
        generatorUI = new HL7OutputLinkUI(parent, this.hl7Manager);
        generatorUI.init();
        return;
    }
    generatorUI = new HL7MultiSchemaUI(parent, hl7Manager);
    generatorUI.init();
}
Also used : HL7OutputLinkUI(org.talend.designer.hl7.ui.HL7OutputLinkUI) HL7MultiSchemaUI(org.talend.designer.hl7.ui.HL7MultiSchemaUI)

Aggregations

HL7MultiSchemaUI (org.talend.designer.hl7.ui.HL7MultiSchemaUI)7 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)6 MetadataColumn (org.talend.core.model.metadata.builder.connection.MetadataColumn)6 IModel (org.talend.designer.hl7.model.IModel)6 MetadataEmfTableEditor (org.talend.core.ui.metadata.editor.MetadataEmfTableEditor)5 Command (org.eclipse.gef.commands.Command)4 ExtendedTableResetDBTypesCommand (org.talend.core.ui.metadata.extended.command.ExtendedTableResetDBTypesCommand)4 MetadataEmfExportXmlCommand (org.talend.core.ui.metadata.extended.command.MetadataEmfExportXmlCommand)4 MetadataEmfImportXmlCommand (org.talend.core.ui.metadata.extended.command.MetadataEmfImportXmlCommand)4 MetadataEmfPasteCommand (org.talend.core.ui.metadata.extended.command.MetadataEmfPasteCommand)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 ExtendedTableModel (org.talend.commons.ui.swt.extended.table.ExtendedTableModel)2 File (java.io.File)1 AddPushButtonForExtendedTable (org.talend.commons.ui.swt.advanced.dataeditor.button.AddPushButtonForExtendedTable)1 ImportPushButtonForExtendedTable (org.talend.commons.ui.swt.advanced.dataeditor.button.ImportPushButtonForExtendedTable)1 MoveDownPushButtonForExtendedTable (org.talend.commons.ui.swt.advanced.dataeditor.button.MoveDownPushButtonForExtendedTable)1 MoveUpPushButtonForExtendedTable (org.talend.commons.ui.swt.advanced.dataeditor.button.MoveUpPushButtonForExtendedTable)1 PastePushButtonForExtendedTable (org.talend.commons.ui.swt.advanced.dataeditor.button.PastePushButtonForExtendedTable)1 IBeanPropertyAccessors (org.talend.commons.utils.data.bean.IBeanPropertyAccessors)1