<commit_before>/*******************************************************************************
 * Copyright (c) 2014-2015 Codenvy, S.A.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   <NAME>. - initial API and implementation
 *******************************************************************************/
package com.codenvy.ide.editor.codemirror.client;

import com.codenvy.ide.Resources;
import com.codenvy.ide.api.parts.WorkspaceAgent;
import com.codenvy.ide.debug.BreakpointManager;
import com.codenvy.ide.jseditor.client.JsEditorConstants;
import com.codenvy.ide.jseditor.client.codeassist.CodeAssistantFactory;
import com.codenvy.ide.jseditor.client.debug.BreakpointRendererFactory;
import com.codenvy.ide.jseditor.client.document.DocumentStorage;
import com.codenvy.ide.jseditor.client.filetype.FileTypeIdentifier;
import com.codenvy.ide.jseditor.client.quickfix.QuickAssistantFactory;
import com.codenvy.ide.jseditor.client.texteditor.EditorModule;
import com.codenvy.ide.jseditor.client.texteditor.EditorWidgetFactory;
import com.codenvy.ide.jseditor.client.texteditor.EmbeddedTextEditorPartView;
import com.codenvy.ide.jseditor.client.texteditor.EmbeddedTextEditorPresenter;
import com.codenvy.ide.ui.dialogs.DialogFactory;
import com.google.inject.assistedinject.Assisted;
import com.google.inject.assistedinject.AssistedInject;
import com.google.web.bindery.event.shared.EventBus;

/**
 * {@link EmbeddedTextEditorPresenter} using codemirror.
 * This class is only defined to allow the Gin binding to be performed.
 */
public class CodeMirrorEditorPresenter extends EmbeddedTextEditorPresenter<CodeMirrorEditorWidget> {

    @AssistedInject
    public CodeMirrorEditorPresenter(final CodeAssistantFactory codeAssistantFactory,
                                     final BreakpointManager breakpointManager,
                                     final BreakpointRendererFactory breakpointRendererFactory,
                                     final DialogFactory dialogFactory,
                                     final DocumentStorage documentStorage,
                                     final JsEditorConstants constant,
                                     @Assisted final EditorWidgetFactory<CodeMirrorEditorWidget> editorWigetFactory,
                                     final EditorModule<CodeMirrorEditorWidget> editorModule,
                                     final EmbeddedTextEditorPartView editorView,
                                     final EventBus eventBus,
                                     final FileTypeIdentifier fileTypeIdentifier,
                                     final QuickAssistantFactory quickAssistantFactory,
                                     final Resources resources,
                                     final WorkspaceAgent workspaceAgent) {
        super(codeAssistantFactory, breakpointManager, breakpointRendererFactory, dialogFactory, documentStorage, constant, editorWigetFactory,
              editorModule, editorView, eventBus, fileTypeIdentifier, quickAssistantFactory, resources, workspaceAgent);
    }



}<commit_msg>Add the HasMinimap interface to the editor presenter<commit_after>/*******************************************************************************
 * Copyright (c) 2014-2015 <NAME>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   <NAME>. - initial API and implementation
 *******************************************************************************/
package com.codenvy.ide.editor.codemirror.client;

import com.codenvy.ide.Resources;
import com.codenvy.ide.api.parts.WorkspaceAgent;
import com.codenvy.ide.debug.BreakpointManager;
import com.codenvy.ide.jseditor.client.JsEditorConstants;
import com.codenvy.ide.jseditor.client.codeassist.CodeAssistantFactory;
import com.codenvy.ide.jseditor.client.debug.BreakpointRendererFactory;
import com.codenvy.ide.jseditor.client.document.DocumentStorage;
import com.codenvy.ide.jseditor.client.filetype.FileTypeIdentifier;
import com.codenvy.ide.jseditor.client.minimap.HasMinimap;
import com.codenvy.ide.jseditor.client.minimap.Minimap;
import com.codenvy.ide.jseditor.client.quickfix.QuickAssistantFactory;
import com.codenvy.ide.jseditor.client.texteditor.EditorModule;
import com.codenvy.ide.jseditor.client.texteditor.EditorWidget;
import com.codenvy.ide.jseditor.client.texteditor.EditorWidgetFactory;
import com.codenvy.ide.jseditor.client.texteditor.EmbeddedTextEditorPartView;
import com.codenvy.ide.jseditor.client.texteditor.EmbeddedTextEditorPresenter;
import com.codenvy.ide.ui.dialogs.DialogFactory;
import com.google.inject.assistedinject.Assisted;
import com.google.inject.assistedinject.AssistedInject;
import com.google.web.bindery.event.shared.EventBus;

/**
 * {@link EmbeddedTextEditorPresenter} using codemirror.
 * This class is only defined to allow the Gin binding to be performed.
 */
public class CodeMirrorEditorPresenter extends EmbeddedTextEditorPresenter<CodeMirrorEditorWidget> implements HasMinimap {

    @AssistedInject
    public CodeMirrorEditorPresenter(final CodeAssistantFactory codeAssistantFactory,
                                     final BreakpointManager breakpointManager,
                                     final BreakpointRendererFactory breakpointRendererFactory,
                                     final DialogFactory dialogFactory,
                                     final DocumentStorage documentStorage,
                                     final JsEditorConstants constant,
                                     @Assisted final EditorWidgetFactory<CodeMirrorEditorWidget> editorWigetFactory,
                                     final EditorModule<CodeMirrorEditorWidget> editorModule,
                                     final EmbeddedTextEditorPartView editorView,
                                     final EventBus eventBus,
                                     final FileTypeIdentifier fileTypeIdentifier,
                                     final QuickAssistantFactory quickAssistantFactory,
                                     final Resources resources,
                                     final WorkspaceAgent workspaceAgent) {
        super(codeAssistantFactory, breakpointManager, breakpointRendererFactory, dialogFactory, documentStorage, constant, editorWigetFactory,
              editorModule, editorView, eventBus, fileTypeIdentifier, quickAssistantFactory, resources, workspaceAgent);
    }

    @Override
    public Minimap getMinimap() {
        final EditorWidget editorWidget = getEditorWidget();
        if (editorWidget instanceof HasMinimap) {
            return ((HasMinimap)editorWidget).getMinimap();
        } else {
            throw new IllegalStateException("incorrect editor state");
        }
    }
}
{'fraction_non_alphanumeric': 0.10767516367182059, 'fraction_numerical': 0.003343083994985374, 'mean_word_length': 3.033707865168539, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2897126', 'n_tokens_mistral': 1780, 'n_tokens_neox': 1700, 'n_words': 352}