Package com.dci.intellij.dbn.editor.data.options

Examples of com.dci.intellij.dbn.editor.data.options.DataEditorSettings


    public void actionPerformed(AnActionEvent e) {
        Project project = ActionUtil.getProject(e);
        if (project != null) {
            GlobalProjectSettingsDialog globalSettingsDialog = new GlobalProjectSettingsDialog(project);
            DataEditorSettings settings = DataEditorSettings.getInstance(project);
            globalSettingsDialog.focusSettings(settings);
            globalSettingsDialog.show();
        }
    }
View Full Code Here


    }

    public void actionPerformed(AnActionEvent e) {
        DatasetEditor datasetEditor = getDatasetEditor(e);
        if (datasetEditor != null) {
            DataEditorSettings settings = DataEditorSettings.getInstance(datasetEditor.getProject());
            datasetEditor.fetchNextRecords(settings.getGeneralSettings().getFetchBlockSize().value());
        }
    }
View Full Code Here

        presentation.setText("Fetch next records");

        DatasetEditor datasetEditor = getDatasetEditor(e);
        Project project = ActionUtil.getProject(e);
        if (project != null) {
            DataEditorSettings settings = DataEditorSettings.getInstance(project);
            presentation.setText("Fetch next " + settings.getGeneralSettings().getFetchBlockSize().value() + " records");
        }
        boolean enabled =
                datasetEditor != null &&
                datasetEditor.getEditorTable() != null &&
                datasetEditor.getActiveConnection().isConnected() &&
View Full Code Here

            MessageUtil.showErrorDialog("Could not load record details", e);
        }
    }

    public void navigateToRecord(DatasetFilterInput filterInput, InputEvent inputEvent) {
        DataEditorSettings settings = DataEditorSettings.getInstance(getProject());
        RecordNavigationTarget navigationTarget = settings.getRecordNavigationSettings().getNavigationTarget();
        if (navigationTarget == RecordNavigationTarget.EDITOR) {
            openDataEditor(filterInput);
        } else if (navigationTarget == RecordNavigationTarget.VIEWER) {
            openRecordViewer(filterInput);
        } else if (navigationTarget == RecordNavigationTarget.ASK) {
View Full Code Here

        DBNativeDataType nativeDataType = dataType.getNativeDataType();
        if (nativeDataType != null) {
            DataTypeDefinition dataTypeDefinition = nativeDataType.getDataTypeDefinition();
            GenericDataType genericDataType = dataTypeDefinition.getGenericDataType();

            DataEditorSettings dataEditorSettings = DataEditorSettings.getInstance(project);

            long dataLength = dataType.getLength();

            if (genericDataType.is(GenericDataType.DATE_TIME, GenericDataType.LITERAL)) {
                TextFieldWithPopup textFieldWithPopup = new TextFieldWithPopup(project);

                textFieldWithPopup.setPreferredSize(new Dimension(200, -1));
                JTextField valueTextField = textFieldWithPopup.getTextField();
                valueTextField.getDocument().addDocumentListener(documentListener);
                valueTextField.addKeyListener(keyAdapter);
                valueTextField.addFocusListener(focusListener);

                if (cell.getRow().getModel().isEditable()) {
                    if (genericDataType == GenericDataType.DATE_TIME) {
                        textFieldWithPopup.createCalendarPopup(false);
                    }

                    if (genericDataType == GenericDataType.LITERAL) {
                        if (dataLength > 20 && !column.isPrimaryKey() && !column.isForeignKey())
                            textFieldWithPopup.createTextAreaPopup(false);
                        DataEditorValueListPopupSettings valueListPopupSettings = dataEditorSettings.getValueListPopupSettings();

                        if (column.isForeignKey() || (dataLength <= valueListPopupSettings.getDataLengthThreshold() &&
                                (!column.isSinglePrimaryKey() || valueListPopupSettings.isActiveForPrimaryKeyColumns()))) {
                            ListPopupValuesProvider valuesProvider = new ListPopupValuesProvider() {
                                public List<String> getValues() {
View Full Code Here

        GlobalConnectionSettings connectionSettings = globalSettings.getConnectionSettings();
        DatabaseBrowserSettings browserSettings = globalSettings.getBrowserSettings();
        NavigationSettings navigationSettings = globalSettings.getNavigationSettings();
        CodeCompletionSettings codeCompletionSettings = globalSettings.getCodeCompletionSettings();
        //ProjectCodeStyleSettings codeStyleSettings = globalSettings.getCodeStyleSettings();
        DataEditorSettings dataEditorSettings = globalSettings.getDataEditorSettings();
        ExecutionEngineSettings executionEngineSettings = globalSettings.getExecutionEngineSettings();
        DDLFileSettings ddlFileSettings = globalSettings.getDdlFileSettings();
        GeneralProjectSettings generalSettings = globalSettings.getGeneralSettings();

        addSettingsPanel(connectionSettings);
View Full Code Here

                DBDataset dataset = (DBDataset) object;
                DatasetFilterManager filterManager = DatasetFilterManager.getInstance(project);
                DatasetFilter filter = filterManager.getActiveFilter(dataset);

                if (filter == null) {
                    DataEditorSettings settings = DataEditorSettings.getInstance(project);
                    if (settings.getFilterSettings().isPromptFilterDialog()) {
                        int exitCode = filterManager.openFiltersDialog(dataset, true, false, settings.getFilterSettings().getDefaultFilterType());
                        return exitCode != DialogWrapper.CANCEL_EXIT_CODE;
                    }
                }
            }
            else if (contentType.isOneOf(DBContentType.CODE, DBContentType.CODE_SPEC_AND_BODY)) {
View Full Code Here

        super(project);
        generalSettings = new GeneralProjectSettings(project);
        browserSettings = new DatabaseBrowserSettings(project);
        navigationSettings = new NavigationSettings(project);
        codeStyleSettings = new ProjectCodeStyleSettings(project);
        dataEditorSettings = new DataEditorSettings(project);
        codeCompletionSettings = new CodeCompletionSettings(project);
        executionEngineSettings = new ExecutionEngineSettings(project);
        ddlFileSettings = new DDLFileSettings(project);
        connectionSettings = new GlobalConnectionSettings(project);
    }
View Full Code Here

                } else {
                    values = DatasetEditorUtils.loadDistinctColumnValues(column);
                }

                if (values != null) {
                    DataEditorSettings dataEditorSettings = DataEditorSettings.getInstance(column.getProject());
                    int maxElementCount = dataEditorSettings.getValueListPopupSettings().getElementCountThreshold();
                    if (values.size() > maxElementCount) values.clear();
                    possibleValues = values;
                }
            }
        }
View Full Code Here

            DBDataset dataset = datasetEditor.getDataset();
            if (dataset != null) {
                DatasetFilterManager filterManager = DatasetFilterManager.getInstance(dataset.getProject());
                DatasetFilter activeFilter = filterManager.getActiveFilter(dataset);
                if (activeFilter == null || activeFilter.getFilterType() == DatasetFilterType.NONE) {
                    DataEditorSettings settings = DataEditorSettings.getInstance(dataset.getProject());
                    DatasetFilterType filterType = settings.getFilterSettings().getDefaultFilterType();
                    if (filterType == null || filterType == DatasetFilterType.NONE) {
                        filterType = DatasetFilterType.BASIC;
                    }

View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.editor.data.options.DataEditorSettings

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.