<commit_before>package com.codenvy.ide.ext.datasource.client.sqllauncher;

import com.codenvy.ide.api.ui.action.Action;
import com.codenvy.ide.api.ui.action.ActionEvent;
import com.codenvy.ide.api.ui.workspace.PartStackType;
import com.codenvy.ide.api.ui.workspace.WorkspaceAgent;
import com.google.inject.Inject;

/**
 * Action to launch and show a SQL editor.
 * 
 * @author "<NAME>"
 */
public class SqlRequestLauncherAction extends Action {

    /** The workspace agent. */
    private final WorkspaceAgent            workspaceAgent;

    /** The factory to create new SQL editors. */
    private final SqlRequestLauncherFactory requestLauncherFactory;

    @Inject
    public SqlRequestLauncherAction(final SqlRequestLauncherConstants constants,
                                    final WorkspaceAgent workspaceAgent,
                                    final SqlRequestLauncherFactory requestLauncherFactory) {
        super(constants.menuEntryOpenSqlEditor());
        this.workspaceAgent = workspaceAgent;
        this.requestLauncherFactory = requestLauncherFactory;
    }

    @Override
    public void actionPerformed(final ActionEvent e) {
        SqlRequestLauncherAdapter requestLauncher = this.requestLauncherFactory.createSqlRequestLauncherAdapter();
        this.workspaceAgent.openPart(requestLauncher, PartStackType.EDITING);<commit_msg>The sql launcher action opens a Sql...Presenter instead of an Sql... Adapter<commit_after>package com.codenvy.ide.ext.datasource.client.sqllauncher;

import com.codenvy.ide.api.ui.action.Action;
import com.codenvy.ide.api.ui.action.ActionEvent;
import com.codenvy.ide.api.ui.workspace.PartStackType;
import com.codenvy.ide.api.ui.workspace.WorkspaceAgent;
import com.google.inject.Inject;

/**
 * Action to launch and show a SQL editor.
 * 
 * @author "<NAME>"
 */
public class SqlRequestLauncherAction extends Action {

    /** The workspace agent. */
    private final WorkspaceAgent            workspaceAgent;

    /** The factory to create new SQL editors. */
    private final SqlRequestLauncherFactory requestLauncherFactory;

    @Inject
    public SqlRequestLauncherAction(final SqlRequestLauncherConstants constants,
                                    final WorkspaceAgent workspaceAgent,
                                    final SqlRequestLauncherFactory requestLauncherFactory) {
        super(constants.menuEntryOpenSqlEditor());
        this.workspaceAgent = workspaceAgent;
        this.requestLauncherFactory = requestLauncherFactory;
    }

    @Override
    public void actionPerformed(final ActionEvent e) {
        SqlRequestLauncherPresenter requestLauncher = this.requestLauncherFactory.createSqlRequestLauncherPresenter();
        this.workspaceAgent.openPart(requestLauncher, PartStackType.EDITING);
{'fraction_non_alphanumeric': 0.07910823444804027, 'fraction_numerical': 0.0, 'mean_word_length': 3.401898734177215, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4561556', 'n_tokens_mistral': 738, 'n_tokens_neox': 727, 'n_words': 154}