<commit_before>/*
 * CODENVY CONFIDENTIAL
 * __________________
 *
 * [2013] - [2014] Codenvy, S.A.
 * All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Codenvy S.A. and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Codenvy S.A.
 * and its suppliers and may be covered by U.S. and Foreign Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Codenvy S.A..
 */
package com.codenvy.ide.ext.datasource.client.properties;

import com.codenvy.ide.api.ui.workspace.AbstractPartPresenter;
import com.codenvy.ide.ext.datasource.shared.DatabaseDTO;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.inject.Inject;

/**
 * The presenter part for the datasource properties display.
 * 
 * @author "<NAME>"
 */
public class DatasourcePropertiesPresenter extends AbstractPartPresenter {

    /** The view component. */
    private DatasourcePropertiesView view;

    @Inject
    public DatasourcePropertiesPresenter(final DatasourcePropertiesView view) {
        super();
        this.view = view;
    }

    @Override
    public void go(final AcceptsOneWidget container) {
        container.setWidget(view);
    }

    @Override
    public String getTitle() {
        return "Datasource properties";
    }

    @Override
    public ImageResource getTitleImage() {
        return null;
    }

    @Override
    public String getTitleToolTip() {
        return null;
    }

    public void onDataSourceSelectionChanged(final DatabaseDTO databaseDto) {
        this.view.setDatasourceName(databaseDto.getName());
    }<commit_msg>DatasourcePropertiesPresenter is an ActionDelegate for its view<commit_after>/*
 * CODENVY CONFIDENTIAL
 * __________________
 *
 * [2013] - [2014] Codenvy, S.A.
 * All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Codenvy S.A. and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Codenvy S.A.
 * and its suppliers and may be covered by U.S. and Foreign Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Codenvy S.A..
 */
package com.codenvy.ide.ext.datasource.client.properties;

import com.codenvy.ide.api.ui.workspace.AbstractPartPresenter;
import com.codenvy.ide.ext.datasource.shared.DatabaseDTO;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.inject.Inject;

/**
 * The presenter part for the datasource properties display.
 * 
 * @author "<NAME>"
 */
public class DatasourcePropertiesPresenter extends AbstractPartPresenter implements DatasourcePropertiesView.ActionDelegate {

    /** The view component. */
    private DatasourcePropertiesView view;

    @Inject
    public DatasourcePropertiesPresenter(final DatasourcePropertiesView view) {
        super();
        this.view = view;
        this.view.setDelegate(this);
    }

    @Override
    public void go(final AcceptsOneWidget container) {
        container.setWidget(view);
    }

    @Override
    public String getTitle() {
        return "Datasource properties";
    }

    @Override
    public ImageResource getTitleImage() {
        return null;
    }

    @Override
    public String getTitleToolTip() {
        return null;
    }

    public void onDataSourceSelectionChanged(final DatabaseDTO databaseDto) {
        this.view.setDatasourceName(databaseDto.getName());
    }
{'fraction_non_alphanumeric': 0.08294930875576037, 'fraction_numerical': 0.00409626216077829, 'mean_word_length': 3.5377468060394888, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '540543', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1071, 'n_words': 325}