diff -r 03cd1b3e2e70 -r 6c04b26f9a9a ko/bck2brwsr/src/main/java/org/apidesign/bck2brwsr/ko2brwsr/BrwsrCtxPrvdr.java --- a/ko/bck2brwsr/src/main/java/org/apidesign/bck2brwsr/ko2brwsr/BrwsrCtxPrvdr.java Tue Feb 11 10:48:24 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator - * Copyright (C) 2012 Jaroslav Tulach - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. Look for COPYING file in the top folder. - * If not, see http://opensource.org/licenses/GPL-2.0. - */ -package org.apidesign.bck2brwsr.ko2brwsr; - -import org.apidesign.bck2brwsr.core.JavaScriptBody; -import org.apidesign.html.context.spi.Contexts; -import org.apidesign.html.json.spi.Technology; -import org.apidesign.html.json.spi.Transfer; -import org.apidesign.html.json.spi.WSTransfer; -import org.openide.util.lookup.ServiceProvider; - -/** This is an implementation package - just - * include its JAR on classpath and use official {@link Context} API - * to access the functionality. - *

- * Provides binding between models and - * Bck2Brwsr VM. - * Registers {@link ContextProvider}, so {@link ServiceLoader} can find it. - * - * @author Jaroslav Tulach - */ -@ServiceProvider(service = Contexts.Provider.class) -public final class BrwsrCtxPrvdr implements Contexts.Provider { - - @Override - public void fillContext(Contexts.Builder context, Class requestor) { - if (bck2BrwsrVM()) { - context.register(Technology.class, BrwsrCtxImpl.DEFAULT, 50). - register(Transfer.class, BrwsrCtxImpl.DEFAULT, 50). - register(WSTransfer.class, BrwsrCtxImpl.DEFAULT, 50); - } - } - - @JavaScriptBody(args = { }, body = "return true;") - private static boolean bck2BrwsrVM() { - return false; - } -}