<commit_before>/*
 Copyright (c) 2014 Ahomé Innovation Technologies. All rights reserved.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
package com.ait.toolkit.sencha.touch.client.core;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * This class is used to bootstrap the Sencha Touch library or get the current version of the Touch4j library. The bootstrap mechanisism should nt be called directly instead one
 * should extends the {@link com.ait.toolkit.sencha.touch.client.core.TouchEntryPoint} or the {@link com.ait.toolkit.sencha.touch.client.core.ConfigurableTouchEntryPoint} class.
 * 
 */
public class Touch {

	private static final String VERSION = "1.0.0";

	public static void init(InitHandler handler) {
		// setPlugingBasePath(GWT.getModuleBaseURL() + "plugins");
		init(handler.getJsoPeer());
	}

	public static void init(TouchConfig config) {
		// setPlugingBasePath(GWT.getModuleBaseURL() + "plugins");
		init(config.getJsObj());
	}

	private static native void init(JavaScriptObject handler)/*-{
		if (typeof ($wnd) != 'undefined' && typeof ($wnd.Ext) != 'undefined') {
			$wnd.Ext.setup({
				onReady : handler
			});
		}

	}-*/;

	private static native void init2(JavaScriptObject config)/*-{
		if (typeof ($wnd) != 'undefined' && typeof ($wnd.Ext) != 'undefined') {
			$wnd.Ext.setup(config);
		}
	}-*/;

	/**
	 * gets the current version of Touch4j. note this is not the version of the underlying Sencha Touch library.
	 * 
	 * @return, the current version of Touch4j
	 */
	public static String getVersion() {
		return VERSION;
	}

	private static native void setPlugingBasePath(String path)/*-{
		if (typeof ($wnd) != 'undefined' && typeof ($wnd.Ext) != 'undefined') {
			$wnd.Ext.Loader.setPath({
				'Ext.plugin' : path, // add class path   
			});
		}

	}-*/;

}<commit_msg>cleanes to Touch class<commit_after>/*
 Copyright (c) 2014 Ahomé Innovation Technologies. All rights reserved.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
package com.ait.toolkit.sencha.touch.client.core;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * This class is used to bootstrap the Sencha Touch library or get the current version of the Touch4j library. The class might not be called directly instead one should extends the
 * {@link com.ait.toolkit.sencha.touch.client.core.TouchEntryPoint} or the {@link com.ait.toolkit.sencha.touch.client.core.ConfigurableTouchEntryPoint} class.
 * 
 */
public class Touch {

	private static final String VERSION = "4.0.0";

	public static void init(InitHandler handler) {
		init(handler.getJsoPeer());
	}

	public static void init(TouchConfig config) {
		init(config.getJsObj());
	}

	private static native void init(JavaScriptObject handler)/*-{
		if (typeof ($wnd) != 'undefined' && typeof ($wnd.Ext) != 'undefined') {
			$wnd.Ext.setup({
				onReady : handler
			});
		}

	}-*/;

	private static native void init2(JavaScriptObject config)/*-{
		if (typeof ($wnd) != 'undefined' && typeof ($wnd.Ext) != 'undefined') {
			$wnd.Ext.setup(config);
		}
	}-*/;

	/**
	 * gets the current version of Touch4j. note this is not the version of the underlying Sencha Touch library.
	 * 
	 * @return, the current version of Touch4j
	 */
	public static String getVersion() {
		return VERSION;
	}

}
{'fraction_non_alphanumeric': 0.11195087387812942, 'fraction_numerical': 0.007085498346717053, 'mean_word_length': 3.930151338766007, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3316108', 'n_tokens_mistral': 1317, 'n_tokens_neox': 1210, 'n_words': 449}