Package com.dci.intellij.dbn.data.export.processor

Examples of com.dci.intellij.dbn.data.export.processor.DataExportProcessor


            DataExportInstructions instructions,
            ConnectionHandler connectionHandler) {
        boolean isSelection = instructions.getScope() == DataExportInstructions.Scope.SELECTION;
        DataExportModel exportModel = new SortableTableExportModel(isSelection, table);
        try {
            DataExportProcessor processor = DataExportProcessor.getExportProcessor(instructions.getFormat());
            processor.export(exportModel, instructions, connectionHandler);
            DataExportInstructions.Destination destination = instructions.getDestination();
            if (destination == DataExportInstructions.Destination.CLIPBOARD) {
                Messages.showInfoMessage(
                        "Content exported to clipboard.",
                        Constants.DBN_TITLE_PREFIX + "Export info");
View Full Code Here


            enableDisableFields();
        }
    };

    private void enableDisableFields() {
        DataExportProcessor processor = DataExportProcessor.getExportProcessor(getExportInstructions().getFormat());

        boolean canCreateHeader = processor != null && processor.canCreateHeader();
        boolean canQuoteValues = processor != null && processor.canQuoteValues();
        boolean canExportToClipboard = processor != null && processor.canExportToClipboard();

        destinationClipboardRadioButton.setEnabled(canExportToClipboard);
        quoteValuesCheckBox.setEnabled(canQuoteValues);
        quoteAllValuesCheckBox.setEnabled(canQuoteValues);
        createHeaderCheckBox.setEnabled(canCreateHeader);

        if (!destinationClipboardRadioButton.isEnabled() && destinationClipboardRadioButton.isSelected()) {
            destinationFileRadioButton.setSelected(true);
        }

        valueSeparatorTextField.setEnabled(formatCustomRadioButton.isSelected());
        fileNameTextField.setEnabled(destinationFileRadioButton.isSelected());
        fileLocationTextField.setEnabled(destinationFileRadioButton.isSelected());

        String fileNameBase = sourceObject == null ? instructions.getBaseName() : sourceObject.getName();
        if (fileNameBase != null && processor != null) {
            String fileName = fileNameBase + "." + processor.getFileExtension();
            fileNameTextField.setText(fileName);
        }
    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.data.export.processor.DataExportProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.